Write a test for bug 940446

RESOLVED FIXED in Firefox 29

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: smacleod, Assigned: smacleod)

Tracking

Trunk
Firefox 29
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
(Assignee)

Comment 1

5 years ago
Created attachment 8342174 [details] [diff] [review]
Patch - Add a test for ignoring an invalid engine loaded from a dir

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+
(Assignee)

Comment 3

5 years ago
Created attachment 8345992 [details] [diff] [review]
b943571.patch
Attachment #8342174 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1e3bcdef8157
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
You need to log in before you can comment on or make changes to this bug.