From 9205867efd02711bc7e9af0574cee1f7dc1d0815 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 7 Feb 2011 02:26:54 -0500 Subject: [PATCH 1/4] Import fix from groups branch. --- common/content/marks.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/content/marks.js b/common/content/marks.js index 729e23ac..3b469d8f 100644 --- a/common/content/marks.js +++ b/common/content/marks.js @@ -288,17 +288,17 @@ var Marks = Module("marks", { function matchhost(url) !host || util.isDomainURL(url, host); function match(marks) (k for ([k, v] in Iterator(marks)) if (timespan.contains(v.timestamp) && matchhost(v.location))); - for (let [url, local] in storage["local-marks"]) + for (let [url, local] in marks._localMarks) if (matchhost(url)) { for (let key in match(local)) delete local[key]; if (!Object.keys(local).length) - storage["local-marks"].remove(url); + marks._localMarks.remove(url); } - storage["local-marks"].changed(); + marks._localMarks.changed(); - for (let key in match(storage["url-marks"])) - storage["url-marks"].remove(key); + for (let key in match(marks._urlMarks)) + marks._urlMarks.remove(key); } }); } From 6331a0c532813b91caba5d7481536b97ef0d59da Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 7 Feb 2011 21:16:00 +1100 Subject: [PATCH 2/4] 'Fix' :delcommand testCommands test. This was failing due to *evil* test dependencies. --- common/tests/functional/testCommands.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/common/tests/functional/testCommands.js b/common/tests/functional/testCommands.js index 60fc7b8f..2b1b733c 100644 --- a/common/tests/functional/testCommands.js +++ b/common/tests/functional/testCommands.js @@ -137,9 +137,16 @@ var tests = { ] }, delbmarks: { anyOutput: ["", "about:pentadactyl"] }, - delcommand: { - noOutput: ["foo"] // TODO: Why is this failing? "Unexpected command output: delcommand foo" - }, + delcommand: [ + { + init: ["comclear", "command foo bar"], + noOutput: ["foo"] + }, + { + init: ["comclear"], + error: ["foo"] + } + ], delmacros: { error: [""], noOutput: ["x"], From 858b01e63e8df976b27c8f70cfe98cc8de606f11 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 7 Feb 2011 21:37:39 +1100 Subject: [PATCH 3/4] Call a host of uncalled testCommands completion and error tests. --- common/tests/functional/testCommands.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/common/tests/functional/testCommands.js b/common/tests/functional/testCommands.js index 2b1b733c..618b688f 100644 --- a/common/tests/functional/testCommands.js +++ b/common/tests/functional/testCommands.js @@ -115,7 +115,7 @@ var tests = { completions: ["", "~/"] }, colorscheme: { - error: ["", "some-non-existent-scheme"] + error: ["", "some-nonexistent-scheme"] }, command: { init: ["comclear"], @@ -303,7 +303,7 @@ var tests = { loadplugins: {}, macros: { multiOutput: [""], - completeions: [""] + completions: [""] }, map: { multiOutput: ["", "i"], @@ -320,7 +320,7 @@ var tests = { "-mode=some-nonexistent-mode ", "-gtroup=some-nonexistent-group " ], - completeions: [ + completions: [ ["", hasItems], ["-", hasItems], ["-mode=ex ", hasItems], @@ -333,7 +333,7 @@ var tests = { }, mapclear: { noOutput: [""], - completeions: [""] + completions: [""] }, mapgroup: { multiOutput: [""], @@ -347,7 +347,7 @@ var tests = { "some-nonexistent-group", "foo -d='foo group' -nopersist 'bar.com,http://bar/*,http://bar,^http:'" ], - completeions: [ + completions: [ "", "foo " ], @@ -356,13 +356,13 @@ var tests = { mark: { error: ["", "#", "xy"], noOutput: ["y"], - completeions: [""] + completions: [""] }, marks: { init: ["delmarks q"], multiOutput: ["", "y"], error: ["q", "#"], - completeions: [""] + completions: [""] }, messages: { anyOutput: ["messages"] @@ -377,7 +377,7 @@ var tests = { "! some-nonexistent-rc.penta" ], error: ["some-nonexistent-rc.penta"], - completeions: [""], + completions: [""], cleanup: ["silent !rm some-nonexistent-rc.penta"] }, mksyntax: { @@ -391,7 +391,7 @@ var tests = { "some-nonexistent-pentadactyl-dir/", "some-nonexistent-pentadactyl-dir/foo.vim" ], - completeions: [ + completions: [ ["", hasItems] ], cleanup: ["silent !rm -r some-nonexistent-pentadactyl-dir/"] @@ -476,7 +476,7 @@ var tests = { "some-nonexistent/good.js", "some-nonexistent/good.penta" ], - errors: [ + error: [ "some-nonexistent/bad.js", "some-nonexistent/bad.penta" ], @@ -563,7 +563,7 @@ var tests = { ".pentadactyl/some-nonexistent/good.js", ".pentadactyl/some-nonexistent/good.penta" ], - errors: [ + error: [ "~/.pentadactyl/some-nonexistent/bad.js", "~/.pentadactyl/some-nonexistent/bad.penta", "./.pentadactyl/some-nonexistent/bad.js", From bb0b6f8bdb703085e343d98cc9cac4cebf710958 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 7 Feb 2011 14:24:02 -0500 Subject: [PATCH 4/4] Fix eternally gray input boxes when trying to edit with a nonexistent 'editor'. --- common/modules/io.jsm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/modules/io.jsm b/common/modules/io.jsm index 9b5f1492..de126f50 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -424,6 +424,8 @@ var IO = Module("io", { if (!file || !file.exists()) { util.dactyl.echoerr("Command not found: " + program); + if (callable(blocking)) + util.trapErrors(blocking); return -1; }