Bug 1356826: Part 5 - Allow unsigned add-ons in automation. r=rhelmer

MozReview-Commit-ID: BkRzdEajc5l

--HG--
extra : rebase_source : ab31719cb8e954dfc828644128f5ffd5da6f0e02
This commit is contained in:
Kris Maglione 2017-04-15 18:53:51 -07:00
Родитель 602cb201f5
Коммит 5a09f33f66
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -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);