Bug 1352204 Fix test issues with non-MPC extensions r=kmag
☠☠ backed out by 51ed3d07846d ☠ ☠
authorAndrew Swan <aswan@mozilla.com>
Mon, 01 May 2017 10:34:27 -0700
changeset 406540 46dd4a4338a1af4088898b31692b49363ec44fc8
parent 406539 5c15d347dabbd647954d5266606420e15fbf6823
child 406541 cd801baf418d7124bb0a7f1d665eae989caa73dd
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1352204
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1352204 Fix test issues with non-MPC extensions r=kmag Continue to allow non-multiprocessCompatible extensions in automation. There are a ton of places that would need to be changed, many of which will be changing soon anyway with the non-webextensions change in 57 so this is mostly the expedient route to keeping the tree green. MozReview-Commit-ID: EZZoDVdhLfy
dom/plugins/test/testaddon/install.rdf
layout/tools/reftest/reftest-preferences.js
testing/firefox-ui/tests/puppeteer/test_notifications.py
testing/marionette/harness/marionette_harness/tests/unit/mn-restartless-unsigned.xpi
testing/profiles/prefs_general.js
toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
toolkit/mozapps/extensions/test/xpcshell/head_addons.js
--- a/dom/plugins/test/testaddon/install.rdf
+++ b/dom/plugins/test/testaddon/install.rdf
@@ -13,11 +13,12 @@
       <Description>
         <em:id>toolkit@mozilla.org</em:id>
         <em:minVersion>0</em:minVersion>
         <em:maxVersion>*</em:maxVersion>
       </Description>
     </em:targetApplication>
 
     <em:unpack>true</em:unpack>
+    <em:multiprocessCompatible>true</em:multiprocessCompatible>
 
   </Description>
 </RDF>
--- a/layout/tools/reftest/reftest-preferences.js
+++ b/layout/tools/reftest/reftest-preferences.js
@@ -15,16 +15,18 @@ user_pref("dom.max_script_run_time", 0);
 user_pref("dom.max_chrome_script_run_time", 0);
 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);
 // 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/testing/firefox-ui/tests/puppeteer/test_notifications.py
+++ b/testing/firefox-ui/tests/puppeteer/test_notifications.py
@@ -13,23 +13,25 @@ from marionette_harness import Marionett
 
 
 class TestNotifications(PuppeteerMixin, MarionetteTestCase):
 
     def setUp(self):
         super(TestNotifications, self).setUp()
 
         self.marionette.set_pref('extensions.install.requireSecureOrigin', False)
+        self.marionette.set_pref('extensions.allow-non-mpc-extensions', True)
 
         self.addons_url = self.marionette.absolute_url('addons/extensions/')
         self.puppeteer.utils.permissions.add(self.marionette.baseurl, 'install')
 
     def tearDown(self):
         try:
             self.marionette.clear_pref('extensions.install.requireSecureOrigin')
+            self.marionette.clear_pref('extensions.allow-non-mpc-extensions')
             self.marionette.clear_pref('xpinstall.signatures.required')
 
             self.puppeteer.utils.permissions.remove(self.addons_url, 'install')
 
             if self.browser.notification:
                 self.browser.notification.close(force=True)
         finally:
             super(TestNotifications, self).tearDown()
index c8877b55dec371fa6417fc626ef1a6f3113cc2bc..cee4295cbdb1d39a68a3a53329c3922174e7296f
GIT binary patch
literal 1433
zc$^FHW@Zs#U|`^2xSN>e&XKXBU5t@|;S&(^Fvu_@<>!|amlP!y=w%g$hHx@4I|ev~
zed}kAEUn;XU}X6UR0h_)w*Pe2VFLl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_OPxNK<9W9+b
zr`Tq5wtfAO{eQBbcf77m$2E^DmB(!#h$pk;-+c7sm(#O|JLXxs{|ffh-%pDB(&M$R
z&j0t`wV(VOBag0&ESvXOcn3?G|55hf#y`gePB(}%Z>c(bEZIk9i(C6N$*!^n2Azc-
zCmj{c!?ynm+n<$L^Rv0Z_0#;CPX}{?f2g}o4iE5VWRhdXRcuIr(-n}(u%r>hLM=pC
zA%zH96eF96nOTrci~&-ZS%(#pb+DR>E1e^o`W<d6QmSW#q<TC~#Z1)5hQ>27peAuv
WND{{|kd+Oji3JG#fP$thARYjaJOFzD
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -83,16 +83,17 @@ user_pref("extensions.enabledScopes", 5)
 user_pref("extensions.autoDisableScopes", 0);
 // Disable metadata caching for installed add-ons by default
 user_pref("extensions.getAddons.cache.enabled", false);
 // Disable intalling any distribution add-ons
 user_pref("extensions.installDistroAddons", false);
 // XPI extensions are required for test harnesses to load
 user_pref("extensions.defaultProviders.enabled", true);
 user_pref("xpinstall.signatures.required", false);
+user_pref("extensions.allow-non-mpc-extensions", true);
 
 user_pref("geo.wifi.uri", "http://%(server)s/tests/dom/tests/mochitest/geolocation/network_geolocation.sjs");
 user_pref("geo.wifi.timeToWaitBeforeSending", 2000);
 user_pref("geo.wifi.scan", false);
 user_pref("geo.wifi.logging.enabled", true);
 
 // Prevent connection to the push server for tests.
 user_pref("dom.push.connection.enabled", false);
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ -848,16 +848,19 @@ add_task(function* setup() {
   gHttpRoot = "http://localhost:" + port + "/";
   gDataRoot = gHttpRoot + "data/";
   gHttpServer.registerDirectory("/data/", do_get_cwd());
   do_register_cleanup(() => gHttpServer.stop(() => {}));
 
   // Spoof the the hotfixVersion
   Preferences.set("extensions.hotfix.lastVersion", APP_HOTFIX_VERSION);
 
+  // Allow non-multiprocessCompatible extensions
+  Preferences.set("extensions.allow-non-mpc-extensions", true);
+
   // Create the attribution data file, so that settings.attribution will exist.
   // The attribution functionality only exists in Firefox.
   if (AppConstants.MOZ_BUILD_APP == "browser") {
     spoofAttributionData();
     do_register_cleanup(cleanupAttributionData);
   }
 
   yield spoofProfileReset();
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -18,16 +18,17 @@ const PREF_EM_STRICT_COMPATIBILITY    = 
 const PREF_EM_MIN_COMPAT_APP_VERSION      = "extensions.minCompatibleAppVersion";
 const PREF_EM_MIN_COMPAT_PLATFORM_VERSION = "extensions.minCompatiblePlatformVersion";
 const PREF_GETADDONS_BYIDS               = "extensions.getAddons.get.url";
 const PREF_GETADDONS_BYIDS_PERFORMANCE   = "extensions.getAddons.getWithPerformance.url";
 const PREF_XPI_SIGNATURES_REQUIRED    = "xpinstall.signatures.required";
 const PREF_SYSTEM_ADDON_SET           = "extensions.systemAddonSet";
 const PREF_SYSTEM_ADDON_UPDATE_URL    = "extensions.systemAddon.update.url";
 const PREF_APP_UPDATE_ENABLED         = "app.update.enabled";
+const PREF_ALLOW_NON_MPC              = "extensions.allow-non-mpc-extensions";
 
 // Forcibly end the test if it runs longer than 15 minutes
 const TIMEOUT_MS = 900000;
 
 // Maximum error in file modification times. Some file systems don't store
 // modification times exactly. As long as we are closer than this then it
 // still passes.
 const MAX_TIME_DIFFERENCE = 3000;
@@ -1084,16 +1085,19 @@ Services.prefs.setBoolPref("extensions.s
 
 // By default, set min compatible versions to 0
 Services.prefs.setCharPref(PREF_EM_MIN_COMPAT_APP_VERSION, "0");
 Services.prefs.setCharPref(PREF_EM_MIN_COMPAT_PLATFORM_VERSION, "0");
 
 // Ensure signature checks are enabled by default
 Services.prefs.setBoolPref(PREF_XPI_SIGNATURES_REQUIRED, true);
 
+// Allow non-multiprocessCompatible extensions for now
+Services.prefs.setBoolPref(PREF_ALLOW_NON_MPC, true);
+
 
 // Copies blocklistFile (an nsIFile) to gProfD/blocklist.xml.
 function copyBlocklistToProfile(blocklistFile) {
   var dest = gProfD.clone();
   dest.append("blocklist.xml");
   if (dest.exists())
     dest.remove(false);
   blocklistFile.copyTo(gProfD, "blocklist.xml");