Bug 1494737 - Don't check browser.contentblocking.ui.enabled in AntiTrackingCommon::ShouldHonorContentBlockingCookieRestrictions(); r=baku a=pascalc
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 27 Sep 2018 14:25:20 -0400
changeset 492743 7c608659a5efe64710a8334945213961289b7b81
parent 492742 0b63e03cfae87795bc1f3b24fa46054d0a6b74f2
child 492744 7a94cbe00b3355a553bb11914a3691881a18a971
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku, pascalc
bugs1494737
milestone63.0
Bug 1494737 - Don't check browser.contentblocking.ui.enabled in AntiTrackingCommon::ShouldHonorContentBlockingCookieRestrictions(); r=baku a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D7117
toolkit/components/antitracking/AntiTrackingCommon.cpp
toolkit/components/antitracking/test/browser/head.js
--- a/toolkit/components/antitracking/AntiTrackingCommon.cpp
+++ b/toolkit/components/antitracking/AntiTrackingCommon.cpp
@@ -255,18 +255,17 @@ ReportBlockingToConsole(nsPIDOMWindowOut
                                   message,
                                   params, ArrayLength(params));
 }
 } // anonymous
 
 /* static */ bool
 AntiTrackingCommon::ShouldHonorContentBlockingCookieRestrictions()
 {
-  return StaticPrefs::browser_contentblocking_enabled() &&
-         StaticPrefs::browser_contentblocking_ui_enabled();
+  return StaticPrefs::browser_contentblocking_enabled();
 }
 
 /* static */ RefPtr<AntiTrackingCommon::StorageAccessGrantPromise>
 AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor(const nsAString& aOrigin,
                                                          nsPIDOMWindowInner* aParentWindow)
 {
   MOZ_ASSERT(aParentWindow);
 
--- a/toolkit/components/antitracking/test/browser/head.js
+++ b/toolkit/components/antitracking/test/browser/head.js
@@ -517,18 +517,17 @@ this.AntiTracking = {
 
   async _setupTest(win, cookieBehavior, blockingByContentBlocking,
                    blockingByContentBlockingUI, blockingByContentBlockingRTUI,
                    extraPrefs) {
     await SpecialPowers.flushPrefEnv();
     await SpecialPowers.pushPrefEnv({"set": [
       ["browser.contentblocking.allowlist.annotations.enabled", blockingByContentBlockingRTUI],
       ["browser.contentblocking.allowlist.storage.enabled", blockingByContentBlockingRTUI],
-      ["browser.contentblocking.enabled", blockingByContentBlocking],
-      ["browser.contentblocking.ui.enabled", blockingByContentBlockingUI],
+      ["browser.contentblocking.enabled", blockingByContentBlocking && blockingByContentBlockingUI],
       ["network.cookie.cookieBehavior", cookieBehavior],
       ["privacy.trackingprotection.enabled", false],
       ["privacy.trackingprotection.pbmode.enabled", false],
       ["privacy.trackingprotection.annotate_channels", cookieBehavior != BEHAVIOR_ACCEPT],
       [win.ContentBlocking.prefIntroCount, win.ContentBlocking.MAX_INTROS],
     ]});
 
     if (extraPrefs && Array.isArray(extraPrefs) && extraPrefs.length) {