1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 15:57:57 +01:00

Fix failing tests.

--HG--
branch : groups
This commit is contained in:
Kris Maglione
2011-02-05 03:37:20 -05:00
parent 3b5f2fc07f
commit 01935dbb64
4 changed files with 11 additions and 14 deletions

View File

@@ -306,15 +306,10 @@ var Buffer = Module("buffer", {
statusline.updateUrl(message); statusline.updateUrl(message);
}), }),
onProgressChange: util.wrapCallback(function onProgressChange(webProgress, request, curSelfProgress, maxSelfProgress, curTotalProgress, maxTotalProgress) { onProgressChange: util.wrapCallback(function onProgressChange(webProgress, request, curSelfProgress, maxSelfProgress, curTotalProgress, maxTotalProgress) {
try {
onProgressChange.superapply(this, arguments); onProgressChange.superapply(this, arguments);
if (webProgress && webProgress.DOMWindow) if (webProgress && webProgress.DOMWindow)
webProgress.DOMWindow.dactylProgress = curTotalProgress / maxTotalProgress; webProgress.DOMWindow.dactylProgress = curTotalProgress / maxTotalProgress;
statusline.progress = curTotalProgress / maxTotalProgress; statusline.progress = curTotalProgress / maxTotalProgress;
}
catch (e) {
util.reportError(e);
}
}), }),
// happens when the users switches tabs // happens when the users switches tabs
onLocationChange: util.wrapCallback(function onLocationChange(webProgress, request, uri) { onLocationChange: util.wrapCallback(function onLocationChange(webProgress, request, uri) {

View File

@@ -18,7 +18,7 @@ var Group = Class("Group", {
get toStringParams() [this.name], get toStringParams() [this.name],
get builtin() dactyl.builtinGroups.indexOf(this) >= 0, get builtin() contexts.builtinGroups.indexOf(this) >= 0,
subGroups: {} subGroups: {}
@@ -58,8 +58,10 @@ var Contexts = Module("contexts", {
this.groupList = []; this.groupList = [];
this.groupMap = {}; this.groupMap = {};
this.subGroupProto = {}; this.subGroupProto = {};
this.builtinGroups = [this.addGroup("builtin", "Builtin items"),
this.addGroup("user", "User-defined items", null, true)]; this.system = this.addGroup("builtin", "Builtin items");
this.user = this.addGroup("user", "User-defined items", null, true);
this.builtinGroups = [this.system, this.user];
}, },
context: null, context: null,

View File

@@ -250,7 +250,7 @@ var History = Module("history", {
context.generate = function () [ context.generate = function () [
Array.slice(row.rev_host).reverse().join("").slice(1) Array.slice(row.rev_host).reverse().join("").slice(1)
for (row in iter(services.history.DBConnection for (row in iter(services.history.DBConnection
.createStatement("SELECT DISTINCT rev_host FROM moz_places;"))) .createStatement("SELECT DISTINCT rev_host FROM moz_places WHERE rev_host IS NOT NULL;")))
].slice(2); ].slice(2);
}; };

View File

@@ -434,7 +434,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
bang: true, bang: true,
completer: function (context) { completer: function (context) {
context.title = ["Privacy Item", "Description"]; context.title = ["Privacy Item", "Description"];
context.completions = modules.options.get("sanitizeitems").completer(); context.completions = modules.options.get("sanitizeitems").values;
}, },
domains: function (args) args["-host"] || [], domains: function (args) args["-host"] || [],
options: [ options: [