Bug 1494145 follow-up: Add the contentblocking prefs to one more test as well a=test-only
☠☠ backed out by 79125b42f1be ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 27 Sep 2018 03:01:52 -0400
changeset 490083 a5e0c4e767747994f72b53e8b6073395663f72f1
parent 490082 41b9ef81d9fa1af3f8d0c9529ffe30db449aed62
child 490084 79125b42f1bed8dc198be2d5f8a0cf37a089cf3a
push id9899
push usereakhgari@mozilla.com
push dateThu, 27 Sep 2018 07:02:27 +0000
treeherdermozilla-beta@a5e0c4e76774 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs1494145
milestone63.0
Bug 1494145 follow-up: Add the contentblocking prefs to one more test as well a=test-only
browser/components/enterprisepolicies/tests/browser/browser_policy_cookie_settings.js
--- a/browser/components/enterprisepolicies/tests/browser/browser_policy_cookie_settings.js
+++ b/browser/components/enterprisepolicies/tests/browser/browser_policy_cookie_settings.js
@@ -7,21 +7,26 @@ const {UrlClassifierTestUtils} = ChromeU
 XPCOMUtils.defineLazyServiceGetter(Services, "cookies",
                                    "@mozilla.org/cookieService;1",
                                    "nsICookieService");
 XPCOMUtils.defineLazyServiceGetter(Services, "cookiemgr",
                                    "@mozilla.org/cookiemanager;1",
                                    "nsICookieManager");
 
 function restore_prefs() {
+  Services.prefs.clearUserPref("browser.contentblocking.enabled");
+  Services.prefs.clearUserPref("browser.contentblocking.ui.enabled");
   Services.prefs.clearUserPref("network.cookie.cookieBehavior");
   Services.prefs.clearUserPref("network.cookie.lifetimePolicy");
 }
 registerCleanupFunction(restore_prefs);
 
+Services.prefs.setBoolPref("browser.contentblocking.enabled", true);
+Services.prefs.setBoolPref("browser.contentblocking.ui.enabled", true);
+
 async function fake_profile_change() {
   await new Promise(resolve => {
     Services.obs.addObserver(function waitForDBClose() {
       Services.obs.removeObserver(waitForDBClose, "cookie-db-closed");
       resolve();
     }, "cookie-db-closed");
     Services.cookies.QueryInterface(Ci.nsIObserver).observe(null, "profile-before-change", "shutdown-persist");
   });