If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Support setting of unknown prefs for reftests

NEW
Unassigned

Status

Testing
Reftest
6 months ago
6 months ago

People

(Reporter: jwatt, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

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.
You need to log in before you can comment on or make changes to this bug.