From 5a09f33f6696a1d3886545fd5cda4bd0a3c79788 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 15 Apr 2017 18:53:51 -0700 Subject: [PATCH] Bug 1356826: Part 5 - Allow unsigned add-ons in automation. r=rhelmer MozReview-Commit-ID: BkRzdEajc5l --HG-- extra : rebase_source : ab31719cb8e954dfc828644128f5ffd5da6f0e02 --- toolkit/mozapps/extensions/internal/XPIProvider.jsm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 23de3459457e..4b305abdba6b 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -290,7 +290,9 @@ const TEMP_INSTALL_ID_GEN_SESSION = function mustSign(aType) { if (!SIGNED_TYPES.has(aType)) return false; - return REQUIRE_SIGNING || Preferences.get(PREF_XPI_SIGNATURES_REQUIRED, false); + + return ((REQUIRE_SIGNING && !Cu.isInAutomation) || + Preferences.get(PREF_XPI_SIGNATURES_REQUIRED, false)); } // Keep track of where we are in startup for telemetry @@ -2822,7 +2824,7 @@ this.XPIProvider = { Services.prefs.addObserver(PREF_EM_MIN_COMPAT_PLATFORM_VERSION, this); Services.prefs.addObserver(PREF_E10S_ADDON_BLOCKLIST, this); Services.prefs.addObserver(PREF_E10S_ADDON_POLICY, this); - if (!REQUIRE_SIGNING) + if (!REQUIRE_SIGNING || Cu.isInAutomation) Services.prefs.addObserver(PREF_XPI_SIGNATURES_REQUIRED, this); Services.prefs.addObserver(PREF_ALLOW_NON_MPC, this); Services.obs.addObserver(this, NOTIFICATION_FLUSH_PERMISSIONS);