diff options
author | Doug Kearns <dougkearns@gmail.com> | 2011-06-27 14:18:05 +1000 |
---|---|---|
committer | Doug Kearns <dougkearns@gmail.com> | 2011-06-27 14:18:05 +1000 |
commit | e4c388ff9bbf23d290403862656d861d8e09c133 (patch) | |
tree | 9b894fe40d9ce4ded428ba807c1eb19c3526880e /common | |
parent | ad64e494720663e39c163b5d9ef6e02753551e47 (diff) | |
download | pentadactyl-e4c388ff9bbf23d290403862656d861d8e09c133.tar.gz |
Don't hide error generated for :time :no-such-cmd.
--HG--
extra : rebase_source : 100b8c4d6ac54f8bfb983afd1b8064d5fd7b7e8e
Diffstat (limited to 'common')
-rw-r--r-- | common/content/dactyl.js | 8 | ||||
-rw-r--r-- | common/tests/functional/testCommands.js | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/common/content/dactyl.js b/common/content/dactyl.js index c93705a7..276fc93b 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1960,9 +1960,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { args = args[0] || ""; if (args[0] == ":") - var method = function () commands.execute(args, null, true); + var func = function () commands.execute(args, null, false); else - method = dactyl.userFunc(args); + func = dactyl.userFunc(args); try { if (count > 1) { @@ -1971,7 +1971,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { for (let i in util.interruptibleRange(0, count, 500)) { let now = Date.now(); - method(); + func(); total += Date.now() - now; } @@ -2006,7 +2006,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { } else { let beforeTime = Date.now(); - method(); + func(); if (special) return; diff --git a/common/tests/functional/testCommands.js b/common/tests/functional/testCommands.js index 58fbe681..c01e1c58 100644 --- a/common/tests/functional/testCommands.js +++ b/common/tests/functional/testCommands.js @@ -690,7 +690,11 @@ var tests = { tabopen: {}, tabprevious: {}, tabrewind: {}, - time: {}, + time: { + error: ["", ":some-nonexistent-command"/*, "some_nonexistent_reference"*/], // FIXME + singleOutput: [":js null", "null"] + + }, toolbarhide: { init: [ ["tbs Navigation Toolbar", toolbarState("#nav-bar", true)], |