Closed Bug 1436213 Opened 7 years ago Closed 7 years ago

test_bug1274685_unowned_list.js doesn't do anything when pver4 is the default

Categories

(Toolkit :: Safe Browsing, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: francois, Assigned: francois)

References

Details

Attachments

(1 file)

While fixing the broken test that caused bug 1435098 to get backed out, I noticed that toolkit/components/url-classifier/tests/unit/test_bug1274685_unowned_list.js assumes a V2 stack and doesn't actually test anything if V4 is the default.
After fixing the broken test that caused bug 1435098 to get backed out, also noticed these console errors:

"CONSOLE_MESSAGE: (error) [JavaScript Error: "formatURLPref: Couldn't get pref: browser.safebrowsing.provider.test.updateURL" {file: "file:///home/francois/devel/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/bin/components/nsURLFormatter.js" line: 141}]
uf_formatURLPref@file:///home/francois/devel/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/bin/components/nsURLFormatter.js:141:7
updateProviderURLs/<@resource://gre/modules/SafeBrowsing.jsm:346:23
updateProviderURLs@resource://gre/modules/SafeBrowsing.jsm:345:5
readPrefs@resource://gre/modules/SafeBrowsing.jsm:296:5
init@resource://gre/modules/SafeBrowsing.jsm:71:5
run_test@/home/francois/devel/mozilla-unified/obj-x86_64-pc-linux-gnu/_tests/xpcshell/toolkit/components/url-classifier/tests/unit/test_bug1274685_unowned_list.js:10:3
_execute_test@/home/francois/devel/mozilla-unified/testing/xpcshell/head.js:540:7
@-e:1:1
"
"CONSOLE_MESSAGE: (error) [JavaScript Error: "formatURLPref: Couldn't get pref: browser.safebrowsing.provider.test.gethashURL" {file: "file:///home/francois/devel/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/bin/components/nsURLFormatter.js" line: 141}]
uf_formatURLPref@file:///home/francois/devel/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/bin/components/nsURLFormatter.js:141:7
updateProviderURLs/<@resource://gre/modules/SafeBrowsing.jsm:348:24
updateProviderURLs@resource://gre/modules/SafeBrowsing.jsm:345:5
readPrefs@resource://gre/modules/SafeBrowsing.jsm:296:5
init@resource://gre/modules/SafeBrowsing.jsm:71:5
run_test@/home/francois/devel/mozilla-unified/obj-x86_64-pc-linux-gnu/_tests/xpcshell/toolkit/components/url-classifier/tests/unit/test_bug1274685_unowned_list.js:10:3
_execute_test@/home/francois/devel/mozilla-unified/testing/xpcshell/head.js:540:7
@-e:1:1
"
...

This is due to Services.urlFormatter.formatURLPref() not being able to handle non-existent prefs (the test provider's updateURL and gethashURL).
Comment on attachment 8948846 [details]
Bug 1436213 - Make test_bug1274685_unowned_list.js work on pver2 and pver4.

https://reviewboard.mozilla.org/r/218224/#review224728
Attachment #8948846 - Flags: review?(gpascutto) → review+
Pushed by fmarier@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0cdfcf8734a9
Make test_bug1274685_unowned_list.js work on pver2 and pver4. r=gcp
https://hg.mozilla.org/mozilla-central/rev/0cdfcf8734a9
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: