Bug 1352204 Fix test issues with non-MPC extensions
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
--- 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..9634245716224a6e63d260f8d448a9479441df62
GIT binary patch
literal 1575
zc$^FHW@Zs#U|`^2xSN>e&XKXBU5t@|;S&(^Fvu_@<>!|amlP!y=w%g$hHx@4I|ev~
zZGX=hSz5u(z{v6ys0^%oZU5=4!v+Gb-~V-ahxvIdy_D({-sq&*>ahD|(6r+lo7Na!
zTA|4M^ZO~yFI(Svy*M|wSYq!1@ApFUEZx0t6nIxWuvn0yY0kchDbd4Upv#%5{Q7y}
z{nqb!%XWS|7Z#E5TBp^;dynRwmC>!o`Pil%zkK~%UiV^84xNnHNiSyUTzT|jiGFL+
zn>ov$vQ$6i$!6Li`1q7Chuekj9__X5{@WkzxZb+5+gDqsBs7xGv%pR4`DL!zJ>2h3
z2Of^#aJ;l@)h?Me7JME_i=J$p_c&%@$W-mM8eh+Ro5()P=Aqi9t<N-7V;=-5>{5Rp
zDSOFa_WIM$o}~Dn`n+#npI6n-moGPOsp0vrb<24B+0K6}Vs_rEu%D@SKa+3&C;k9n
z*m5y|fLKJ9I|CA62Zn8OMp1rlsy;Ya*N8ZUX#s;4609$nfx!wQ0^pG&=8)wcZ+Iak
z5Xj2_VgZB!8L2rr`M~(eg_{JzXc46CtrJwx%khDqtFW|_zwb-wr|+C$8$vt6PI;U?
zc{2P`V1U>8^ZuTzd_udnKGR~>V(VrO)o4u*ak5mET<N;9%S)hgMbQMV?MD_}DO$ia
zL4*O}w_y7$_sQ3E^yPtU5ax$FO)obwFEcH*xCHDnJ)o=fFkP0MpI4HaSE7)cr&|P6
znpjkllUiJ?0QDRfA_%nY7kh>JCj6NQ)L8%w9B!aJnR!4RIXQYoDQRFkE&`M0Ma<+`
zI@ve>wgFGu`+uTM)zT08EA}2KxWf0kO}0#fDaTgZ>@nA6ag|-3-(G94-u7n8Y=5Jl
zd!Bf6WxYEWG(mhrU-njS^U9g`E~;dH<G<f|USqrWd_mt>k>!^)?Q73%ecOGuY`5;I
zRV!AVDLZ~9R%BE0vOB)BCVb>RB=ux!*sJ|99AaD{sg=<UGFQ!4=DT}*W>~lN&VucZ
zHyrtQc(bp5<r!N1bOPr@&t*RZWvZ^;SjiaqxzB5Aq<o4Pt3|o}_N=WrUFJ%cF0a^f
z#$3_-zq^AWXUYDM-;7Q#)N@_Me@y5r*uEn!n`4gPm5AvwTU94T*0Z=Myii>CD<Dg^
zPc)jFXY11YA?HOKz8X|+*(DwIL|;bV(bCy-ifuM$+t&}-|0nx-$Lrd3T=Te6dEEAa
zcrr`=%|}muIX#QGW1gk^uV7F8{iL`rJzneT{D1FV`^mpC^60wAvU!h%cd(@SA7u}2
z{BvC3bb~nama4<Yl6_>hxV2A{>?&(u&{^nl(ow-YZ2P~k{aKkcKbsp|Kh3ZCbTB9Q
zhq~+J@BnW{COKwY<&Fe6T>+U4OBz8e)KZ8QQVO9(F~me%xlIDf5@2}i7z5M-&wH$p
z9D|YX5YEHQdC1P2i!cl+AEKCw)rpvy2H8{#CI-wb#0tqmSPjLMLy!$!05lXOzpz5`
V3x<KLY#>dnKsXyHSjGb40RRg^77G9X
--- 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/testing/talos/talos/run_tests.py
+++ b/testing/talos/talos/run_tests.py
@@ -115,16 +115,18 @@ def run_tests(config, browser_config):
# instance
if browser_config['develop']:
browser_config['extra_args'] = '--no-remote'
# with addon signing for production talos, we want to develop without it
if browser_config['develop'] or browser_config['branch_name'] == 'Try':
browser_config['preferences']['xpinstall.signatures.required'] = False
+ browser_config['preferences']['extensions.allow-non-mpc-extensions'] = True
+
# set defaults
testdate = config.get('testdate', '')
# get the process name from the path to the browser
if not browser_config['process']:
browser_config['process'] = \
os.path.basename(browser_config['browser_path'])
--- 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");