Bug 1369525: Make sure reftests still run when legacy extensions are disabled draft
authorAndrew Swan <aswan@mozilla.com>
Thu, 01 Jun 2017 21:18:33 -0700
changeset 588089 fc00f2bafadc297dcd95a21e506682cfaca9ad6b
parent 587781 62005e6aecdf95c9cffe5fb825d93123ec49c4b3
child 631459 88d2100b94e459e7087e8e0a1f3d234c7b5cf6e5
push id61907
push useraswan@mozilla.com
push dateFri, 02 Jun 2017 05:32:33 +0000
bugs1369525
milestone55.0a1
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
layout/tools/reftest/reftest-preferences.js
layout/tools/reftest/runreftest.py
--- 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):