Open Bug 1350948 Opened 5 years ago Updated 3 years ago
Support setting of unknown prefs for reftests
I don't really want to advertise the pref svg.context-properties.content.enabled introduced in bug 1058040 by putting it in modules/libpref/init/all.js but if I don't then I can't set the pref in reftest.list files. Reftest complains: REFTEST TEST-UNEXPECTED-FAIL | file:///Users/jwatt/mozilla/trees/i3/layout/reftests/svg/as-image/context-stroke-02.svg == file:///Users/jwatt/mozilla/trees/i3/layout/reftests/svg/as-image/lime100x100-ref.html | boolean preference 'svg.context-properties.content.enabled' not known or wrong type Looking at: https://dxr.mozilla.org/mozilla-central/rev/e03e0c60462c775c7558a1dc9d5cf2076c3cd1f9/layout/tools/reftest/reftest.jsm#1308 this seems to be because the reftest harness gets upset if getBoolPref (in order to store the old value) fails. Instead it could simply store null and when restoring call nsIPrefBranch::clearUserPref. If we're worried people might accidentally misspell a pref, we could print a warning out.
Sorry, disregard Comment 1 -- that was my mis-paste in the commit message. That was really a followup for bug 1379332, to work around an instance of this bug here.
(Ah, and RyanVM backed out & re-landed that commit with the correct bug number. Great!)
You need to log in before you can comment on or make changes to this bug.