Open Bug 1350948 Opened 5 years ago Updated 3 years ago

Support setting of unknown prefs for reftests


(Testing :: Reftest, enhancement)

Not set


(Not tracked)


(Reporter: jwatt, Unassigned)


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:

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!)
Flags: needinfo?(ahal)
Keywords: leave-open
You need to log in before you can comment on or make changes to this bug.