Bug 1369525: Make sure reftests still run when legacy extensions are disabled
This won't be an issue until the 57 release but at that time, the
reftest extensions will only load if the extensions.legacy.enabled
preference is set to true and Cu.isInAutomation, which depends on
another preference, is true. Set the appropriate prefs here for reftests.
MozReview-Commit-ID: JUWCPTsuJU
--- a/layout/tools/reftest/reftest-preferences.js
+++ b/layout/tools/reftest/reftest-preferences.js
@@ -17,16 +17,18 @@ user_pref("hangmonitor.timeout", 0);
// Ensure autoplay is enabled for all platforms.
user_pref("media.autoplay.enabled", true);
// Disable updates
user_pref("app.update.enabled", false);
user_pref("app.update.staging.enabled", false);
user_pref("app.update.url.android", "");
// Ensure we can load the reftest extension
user_pref("extensions.allow-non-mpc-extensions", true);
+user_pref("extensions.legacy.enabled", true);
+user_pref("security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", true);
// Disable addon updates and prefetching so we don't leak them
user_pref("extensions.update.enabled", false);
user_pref("extensions.systemAddon.update.url", "http://localhost/dummy-system-addons.xml");
user_pref("extensions.getAddons.cache.enabled", false);
// Disable blocklist updates so we don't have them reported as leaks
user_pref("extensions.blocklist.enabled", false);
// Make url-classifier updates so rare that they won't affect tests
user_pref("urlclassifier.updateinterval", 172800);
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -320,20 +320,16 @@ class RefTest(object):
addons = []
if not self.use_marionette:
addons.append(options.reftestExtensionPath)
if options.specialPowersExtensionPath is not None:
if not self.use_marionette:
addons.append(options.specialPowersExtensionPath)
- # SpecialPowers requires insecure automation-only features that we
- # put behind a pref.
- prefs['security.turn_off_all_security_so_that_viruses'
- '_can_take_over_this_computer'] = True
for pref in prefs:
prefs[pref] = mozprofile.Preferences.cast(prefs[pref])
# Install distributed extensions, if application has any.
distExtDir = os.path.join(options.app[:options.app.rfind(os.sep)],
"distribution", "extensions")
if os.path.isdir(distExtDir):