Closed Bug 943571 Opened 11 years ago Closed 11 years ago

Write a test for bug 940446

Categories

(Firefox :: Search, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 29

People

(Reporter: smacleod, Assigned: smacleod)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
This patch adds a test for the failure case using the engine dbaron provided.

The test fails before the patch in Bug 940446 and passes after it has been applied.
Attachment #8342174 - Flags: review?(gavin.sharp)
Comment on attachment 8342174 [details] [diff] [review]
Patch - Add a test for ignoring an invalid engine loaded from a dir

>diff --git a/toolkit/components/search/tests/xpcshell/data/old-sherlock-google.xml b/toolkit/components/search/tests/xpcshell/data/old-

>+# Mozilla/Google plug-in by amitp+mozilla@google.com
>+# File provided in Bug 940446

It's probably not necessary to copy this file exactly - any "invalid" file will do, so an xml file that is empty or is gibberish would be sufficient

>diff --git a/toolkit/components/search/tests/xpcshell/test_invalid_engine_from_dir.js b/toolkit/components/search/tests/xpcshell/test_invalid_engine_from_dir.js

>+function run_test() {

>+  do_load_manifest("data/chrome.manifest");
>+
>+  let url  = "chrome://testsearchplugin/locale/searchplugins/";
>+  Services.prefs.setCharPref("browser.search.jarURIs", url);
>+  Services.prefs.setBoolPref("browser.search.loadFromJars", false);

These lines have been treated as boilerplate but they're only necessary for testing JAR-loaded plugins - so they shouldn't be necessary here.

r=me with those addressed, sorry for the delay.
Attachment #8342174 - Flags: review?(gavin.sharp) → review+
Attached patch b943571.patchSplinter Review
Attachment #8342174 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1e3bcdef8157
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: