Bug 1613848 - Port bug 1602840 - add pref to disable adding new sideloaded addons. r=mkmelin DONTBUILD
authorGeoff Lankow <geoff@darktrojan.net>
Fri, 07 Feb 2020 21:05:30 +1300
changeset 37214 3fc1169f58c9ef46511cfc88bc86831297f6af79
parent 37213 dbc7f4937bb1a317544c21b5f3ed0a6684bcc30f
child 37215 a0dda319d59ba06c195aed2a30ef46eee5d8045e
push id2552
push userclokep@gmail.com
push dateMon, 10 Feb 2020 21:24:16 +0000
treeherdercomm-beta@f95a6f4408a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1613848, 1602840
Bug 1613848 - Port bug 1602840 - add pref to disable adding new sideloaded addons. r=mkmelin DONTBUILD
common/test/xpcshell/test_bootstrap.js
--- a/common/test/xpcshell/test_bootstrap.js
+++ b/common/test/xpcshell/test_bootstrap.js
@@ -18,16 +18,23 @@ const ID2 = "bootstrap2@tests.mozilla.or
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // Enable loading extensions from the user scopes
 Services.prefs.setIntPref(
   "extensions.enabledScopes",
   AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_USER
 );
 
+// Make Cu.isInAutomation true.
+Services.prefs.setBoolPref(
+  "security.turn_off_all_security_so_that_viruses_can_take_over_this_computer",
+  true
+);
+Services.prefs.setIntPref("extensions.sideloadScopes", AddonManager.SCOPE_ALL);
+
 BootstrapMonitor.init();
 
 createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 const userExtDir = gProfD.clone();
 userExtDir.append("extensions2");