Backed out 8 changesets (bug 1491061, bug 1493682, bug 1494145) for mochitest-bc failures on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 27 Sep 2018 06:32:17 -0400
changeset 490084 79125b42f1bed8dc198be2d5f8a0cf37a089cf3a
parent 490083 a5e0c4e767747994f72b53e8b6073395663f72f1
child 490085 7b90b8e04295c01a650a7cccbb055eac0c66cf06
push id9900
push userryanvm@gmail.com
push dateThu, 27 Sep 2018 10:33:15 +0000
treeherdermozilla-beta@79125b42f1be [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1491061, 1493682, 1494145
milestone63.0
backs outa5e0c4e767747994f72b53e8b6073395663f72f1
41b9ef81d9fa1af3f8d0c9529ffe30db449aed62
ed8bf630148784ce92932e138e8cff676794956d
bf1fb942d5ccc1588a7053429c86e15d20ba930e
26775fc457272e9ad5320b70f590b8f96b6929af
ae17f86c72f9c2eefd08a5d90e5641dd36bd557e
cda57041cc59e00cb1abb612fdbc2da48ad82826
725bd7c9fefd617fded177ed20f42239cb3802ee
Backed out 8 changesets (bug 1491061, bug 1493682, bug 1494145) for mochitest-bc failures on a CLOSED TREE. Backed out changeset a5e0c4e76774 (bug 1494145) Backed out changeset 41b9ef81d9fa (bug 1494145) Backed out changeset ed8bf6301487 (bug 1493682) Backed out changeset bf1fb942d5cc (bug 1493682) Backed out changeset 26775fc45727 (bug 1493682) Backed out changeset ae17f86c72f9 (bug 1491061) Backed out changeset cda57041cc59 (bug 1491061) Backed out changeset 725bd7c9fefd (bug 1491061)
browser/app/profile/firefox.js
browser/components/enterprisepolicies/tests/browser/browser_policy_cookie_settings.js
dom/base/nsDocument.cpp
dom/indexedDB/test/test_third_party.html
dom/serviceworkers/test/test_third_party_iframes.html
dom/tests/mochitest/bugs/test_bug1171215.html
dom/tests/mochitest/general/storagePermissionsUtils.js
dom/tests/mochitest/localstorage/test_localStorageCookieSettings.html
dom/workers/RuntimeService.cpp
dom/workers/test/test_sharedWorker_thirdparty.html
extensions/cookie/test/file_testcommon.js
extensions/cookie/test/unit/test_cookies_thirdparty.js
modules/libpref/init/StaticPrefList.h
netwerk/base/nsChannelClassifier.cpp
toolkit/components/antitracking/AntiTrackingCommon.cpp
toolkit/components/antitracking/AntiTrackingCommon.h
toolkit/components/antitracking/test/browser/browser.ini
toolkit/components/antitracking/test/browser/browser_backgroundImageAssertion.js
toolkit/components/antitracking/test/browser/browser_existingCookiesForSubresources.js
toolkit/components/antitracking/test/browser/browser_imageCache1-1.js
toolkit/components/antitracking/test/browser/browser_imageCache1-2.js
toolkit/components/antitracking/test/browser/browser_imageCache1.js
toolkit/components/antitracking/test/browser/browser_imageCache10-1.js
toolkit/components/antitracking/test/browser/browser_imageCache10-2.js
toolkit/components/antitracking/test/browser/browser_imageCache10.js
toolkit/components/antitracking/test/browser/browser_imageCache11-1.js
toolkit/components/antitracking/test/browser/browser_imageCache11-2.js
toolkit/components/antitracking/test/browser/browser_imageCache11.js
toolkit/components/antitracking/test/browser/browser_imageCache13-1.js
toolkit/components/antitracking/test/browser/browser_imageCache13-2.js
toolkit/components/antitracking/test/browser/browser_imageCache13.js
toolkit/components/antitracking/test/browser/browser_imageCache14-1.js
toolkit/components/antitracking/test/browser/browser_imageCache14-2.js
toolkit/components/antitracking/test/browser/browser_imageCache14.js
toolkit/components/antitracking/test/browser/browser_imageCache2-1.js
toolkit/components/antitracking/test/browser/browser_imageCache2-2.js
toolkit/components/antitracking/test/browser/browser_imageCache2.js
toolkit/components/antitracking/test/browser/browser_imageCache3.js
toolkit/components/antitracking/test/browser/browser_imageCache4-1.js
toolkit/components/antitracking/test/browser/browser_imageCache4-2.js
toolkit/components/antitracking/test/browser/browser_imageCache4.js
toolkit/components/antitracking/test/browser/browser_imageCache5-1.js
toolkit/components/antitracking/test/browser/browser_imageCache5-2.js
toolkit/components/antitracking/test/browser/browser_imageCache5.js
toolkit/components/antitracking/test/browser/browser_imageCache6-1.js
toolkit/components/antitracking/test/browser/browser_imageCache6-2.js
toolkit/components/antitracking/test/browser/browser_imageCache6.js
toolkit/components/antitracking/test/browser/browser_imageCache8.js
toolkit/components/antitracking/test/browser/browser_imageCache9.js
toolkit/components/antitracking/test/browser/browser_onBeforeRequestNotificationForTrackingResources.js
toolkit/components/antitracking/test/browser/browser_onModifyRequestNotificationForTrackingResources.js
toolkit/components/antitracking/test/browser/browser_script.js
toolkit/components/antitracking/test/browser/browser_subResources.js
toolkit/components/antitracking/test/browser/head.js
toolkit/components/antitracking/test/browser/imageCacheWorker.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1489,17 +1489,22 @@ pref("toolkit.telemetry.hybridContent.en
 pref("browser.ping-centre.telemetry", true);
 pref("browser.ping-centre.log", false);
 pref("browser.ping-centre.staging.endpoint", "https://onyx_tiles.stage.mozaws.net/v3/links/ping-centre");
 pref("browser.ping-centre.production.endpoint", "https://tiles.services.mozilla.com/v3/links/ping-centre");
 
 // Enable GMP support in the addon manager.
 pref("media.gmp-provider.enabled", true);
 
-pref("browser.contentblocking.allowlist.storage.enabled", true);
+// Enable the new Content Blocking UI only on Nightly.
+#ifdef NIGHTLY_BUILD
+pref("browser.contentblocking.ui.enabled", true);
+#else
+pref("browser.contentblocking.ui.enabled", false);
+#endif
 
 pref("browser.contentblocking.global-toggle.enabled", true);
 
 // Define a set of default features for the Content Blocking UI
 pref("browser.contentblocking.fastblock.ui.enabled", true);
 pref("browser.contentblocking.fastblock.control-center.ui.enabled", true);
 pref("browser.contentblocking.trackingprotection.ui.enabled", true);
 pref("browser.contentblocking.trackingprotection.control-center.ui.enabled", true);
--- a/browser/components/enterprisepolicies/tests/browser/browser_policy_cookie_settings.js
+++ b/browser/components/enterprisepolicies/tests/browser/browser_policy_cookie_settings.js
@@ -7,26 +7,21 @@ 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");
   });
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -12520,17 +12520,17 @@ nsIDocument::SetDocTreeHadPlayRevoked()
   }
 }
 
 void
 nsIDocument::MaybeAllowStorageForOpener()
 {
   if (StaticPrefs::network_cookie_cookieBehavior() !=
         nsICookieService::BEHAVIOR_REJECT_TRACKER ||
-      !AntiTrackingCommon::ShouldHonorContentBlockingCookieRestrictions()) {
+      !StaticPrefs::browser_contentblocking_enabled()) {
     return;
   }
 
   // This will probably change for project fission, but currently this document
   // and the opener are on the same process. In the future, we should make this
   // part async.
 
   nsPIDOMWindowInner* inner = GetInnerWindow();
--- a/dom/indexedDB/test/test_third_party.html
+++ b/dom/indexedDB/test/test_third_party.html
@@ -57,21 +57,17 @@
     function setiframe() {
       let iframe = document.getElementById("iframe1");
 
       if (!testRunning) {
         testRunning = true;
         iframe.addEventListener("load", iframeLoaded);
       }
       SpecialPowers.pushPrefEnv({
-        "set": [
-          ["browser.contentblocking.enabled", true],
-          ["browser.contentblocking.ui.enabled", true],
-          ["network.cookie.cookieBehavior", testData[testIndex].cookieBehavior],
-        ]
+        "set": [["network.cookie.cookieBehavior", testData[testIndex].cookieBehavior]]
       }, () => {
         iframe.src = testData[testIndex].host + iframe1Path;
       });
       // SpecialPowers.setIntPref("network.cookie.cookieBehavior", testData[testIndex].cookieBehavior);
     }
 
     function messageListener(event) {
       // eslint-disable-next-line no-eval
--- a/dom/serviceworkers/test/test_third_party_iframes.html
+++ b/dom/serviceworkers/test/test_third_party_iframes.html
@@ -79,18 +79,16 @@ function runTest(aExpectedResponses) {
     responsesIndex++;
   };
 }
 
 // Verify that we can register and intercept a 3rd party iframe with
 // the given cookie policy.
 function testShouldIntercept(behavior, lifetime, done) {
   SpecialPowers.pushPrefEnv({"set": [
-      ["browser.contentblocking.enabled", true],
-      ["browser.contentblocking.ui.enabled", true],
       ["network.cookie.cookieBehavior", behavior],
       ["network.cookie.lifetimePolicy", lifetime],
   ]}, function() {
     runTest([{
       status: "ok"
     }, {
       status: "registrationdone",
       next: function() {
--- a/dom/tests/mochitest/bugs/test_bug1171215.html
+++ b/dom/tests/mochitest/bugs/test_bug1171215.html
@@ -22,21 +22,18 @@ https://bugzilla.mozilla.org/show_bug.cg
     document.cookie = "a=b";
 
     // Set a cookie in example.org so we can test that we can't read it in
     // third-party cases.
     f.contentWindow.location =
         "http://example.org/tests/dom/tests/mochitest/bugs/file_prime_cookie.html";
     waitForLoad().then(function() {
         // Cookies are set up, disallow third-party cookies and start the test.
-        SpecialPowers.pushPrefEnv({ set: [
-            ["browser.contentblocking.enabled", true],
-            ["browser.contentblocking.ui.enabled", true],
-            ["network.cookie.cookieBehavior", 1],
-          ]}, () => { continueTest(); });
+        SpecialPowers.pushPrefEnv({ set: [[ 'network.cookie.cookieBehavior', 1 ]] },
+                                  () => { continueTest(); });
     }).catch((e) => { ok(false, `Got exception: ${e}`) });
   }
 
   function waitForLoad() {
     return new Promise((resolve) => {
       window.addEventListener("message", function(msg) {
         info(`got message ${msg.data}`);
         resolve(msg.data);
--- a/dom/tests/mochitest/general/storagePermissionsUtils.js
+++ b/dom/tests/mochitest/general/storagePermissionsUtils.js
@@ -21,21 +21,17 @@ if (inFrame) {
   };
 } else {
   finishTest = function() {
     SimpleTest.finish();
   };
 }
 
 function setCookieBehavior(behavior) {
-  return SpecialPowers.pushPrefEnv({"set": [
-    ["browser.contentblocking.enabled", true],
-    ["browser.contentblocking.ui.enabled", true],
-    [kPrefName, behavior],
-  ]});
+  return SpecialPowers.pushPrefEnv({"set": [[kPrefName, behavior]]});
 }
 
 function runIFrame(url) {
   return new Promise((resolve, reject) => {
     function onMessage(e)  {
       if (e.data == "done") {
         resolve();
         window.removeEventListener('message', onMessage);
--- a/dom/tests/mochitest/localstorage/test_localStorageCookieSettings.html
+++ b/dom/tests/mochitest/localstorage/test_localStorageCookieSettings.html
@@ -10,21 +10,18 @@
 <body>
 <iframe></iframe>
 
 <script type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
 // Set cookies behavior to "always reject".
-SpecialPowers.pushPrefEnv({"set": [
-  ["browser.contentblocking.enabled", true],
-  ["browser.contentblocking.ui.enabled", true],
-  ["network.cookie.cookieBehavior", 2],
-]}, test1);
+SpecialPowers.pushPrefEnv({"set": [["network.cookie.cookieBehavior", 2]]},
+                          test1);
 
 function test1() {
   try {
     localStorage.setItem("contentkey", "test-value");
     ok(false, "Setting localStorageItem should throw a security exception");
   }
   catch(ex) {
     is(ex.name, "SecurityError");
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -26,17 +26,16 @@
 #include "nsPIDOMWindow.h"
 
 #include <algorithm>
 #include "mozilla/ipc/BackgroundChild.h"
 #include "GeckoProfiler.h"
 #include "jsfriendapi.h"
 #include "js/LocaleSensitive.h"
 #include "mozilla/AbstractThread.h"
-#include "mozilla/AntiTrackingCommon.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/AsyncEventDispatcher.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/CycleCollectedJSContext.h"
 #include "mozilla/CycleCollectedJSRuntime.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/dom/asmjscache/AsmJSCache.h"
@@ -2268,17 +2267,17 @@ RuntimeService::ResumeWorkersForWindow(n
 
 void
 RuntimeService::PropagateFirstPartyStorageAccessGranted(nsPIDOMWindowInner* aWindow)
 {
   AssertIsOnMainThread();
   MOZ_ASSERT(aWindow);
   MOZ_ASSERT(StaticPrefs::network_cookie_cookieBehavior() ==
                nsICookieService::BEHAVIOR_REJECT_TRACKER &&
-             AntiTrackingCommon::ShouldHonorContentBlockingCookieRestrictions());
+             StaticPrefs::browser_contentblocking_enabled());
 
   nsTArray<WorkerPrivate*> workers;
   GetWorkersForWindow(aWindow, workers);
 
   for (uint32_t index = 0; index < workers.Length(); index++) {
     workers[index]->PropagateFirstPartyStorageAccessGranted();
   }
 }
@@ -2883,17 +2882,17 @@ ResumeWorkersForWindow(nsPIDOMWindowInne
 }
 
 void
 PropagateFirstPartyStorageAccessGrantedToWorkers(nsPIDOMWindowInner* aWindow)
 {
   AssertIsOnMainThread();
   MOZ_ASSERT(StaticPrefs::network_cookie_cookieBehavior() ==
                nsICookieService::BEHAVIOR_REJECT_TRACKER &&
-             AntiTrackingCommon::ShouldHonorContentBlockingCookieRestrictions());
+             StaticPrefs::browser_contentblocking_enabled());
 
   RuntimeService* runtime = RuntimeService::GetService();
   if (runtime) {
     runtime->PropagateFirstPartyStorageAccessGranted(aWindow);
   }
 }
 
 WorkerPrivate*
--- a/dom/workers/test/test_sharedWorker_thirdparty.html
+++ b/dom/workers/test/test_sharedWorker_thirdparty.html
@@ -42,18 +42,16 @@
     ]});
     let result = await testThirdPartyFrame('allowed');
     ok(result === 'allowed',
        'SharedWorker should be allowed when 3rd party iframes can access storage');
   });
 
   add_task(async function blocked() {
     await SpecialPowers.pushPrefEnv({ set: [
-      ["browser.contentblocking.enabled", true],
-      ["browser.contentblocking.ui.enabled", true],
       ["network.cookie.cookieBehavior", COOKIE_BEHAVIOR_REJECTFOREIGN]
     ]});
     let result = await testThirdPartyFrame('blocked');
     ok(result === 'blocked',
        'SharedWorker should not be allowed when 3rd party iframes are denied storage');
   });
 
   </script>
--- a/extensions/cookie/test/file_testcommon.js
+++ b/extensions/cookie/test/file_testcommon.js
@@ -8,21 +8,17 @@ var gPopup;
 var gScript;
 
 var gLoads = 0;
 
 function setupTest(uri, cookies, loads) {
   SimpleTest.waitForExplicitFinish();
 
   var prefSet = new Promise(resolve => {
-    SpecialPowers.pushPrefEnv({ set: [
-      ["browser.contentblocking.enabled", true],
-      ["browser.contentblocking.ui.enabled", true],
-      ["network.cookie.cookieBehavior", 1],
-    ]}, resolve);
+    SpecialPowers.pushPrefEnv({ set: [["network.cookie.cookieBehavior", 1]] }, resolve);
   });
 
   gScript = SpecialPowers.loadChromeScript(SCRIPT_URL);
   gExpectedCookies = cookies;
   gExpectedLoads = loads;
 
   // Listen for MessageEvents.
   window.addEventListener("message", messageReceiver);
--- a/extensions/cookie/test/unit/test_cookies_thirdparty.js
+++ b/extensions/cookie/test/unit/test_cookies_thirdparty.js
@@ -1,20 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // test third party cookie blocking, for the cases:
 // 1) with null channel
 // 2) with channel, but with no docshell parent
 
 function run_test() {
-  // Set the needed content blocking prefs
-  Services.prefs.setBoolPref("browser.contentblocking.enabled", true);
-  Services.prefs.setBoolPref("browser.contentblocking.ui.enabled", true);
-
   // Create URIs and channels pointing to foo.com and bar.com.
   // We will use these to put foo.com into first and third party contexts.
   var spec1 = "http://foo.com/foo.html";
   var spec2 = "http://bar.com/bar.html";
   var uri1 = NetUtil.newURI(spec1);
   var uri2 = NetUtil.newURI(spec2);
   var channel1 = NetUtil.newChannel({uri: uri1, loadUsingSystemPrincipal: true});
   var channel2 = NetUtil.newChannel({uri: uri2, loadUsingSystemPrincipal: true});
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -1272,48 +1272,25 @@ VARCACHE_PREF(
 
 PREF("preferences.allow.omt-write", bool, true)
 
 //---------------------------------------------------------------------------
 // Privacy prefs
 //---------------------------------------------------------------------------
 
 // Whether Content Blocking has been enabled.
+// Please note that privacy protections provided by Gecko may depend on this preference.
+// Turning this off may disable some protections.  Please do not turn this pref off without
+// realizing the implications of what you're doing.
 VARCACHE_PREF(
   "browser.contentblocking.enabled",
    browser_contentblocking_enabled,
   bool, true
 )
 
-#ifdef NIGHTLY_BUILD
-# define PREF_VALUE true
-#else
-# define PREF_VALUE false
-#endif
-// Whether Content Blocking UI has been enabled.
-VARCACHE_PREF(
-  "browser.contentblocking.ui.enabled",
-   browser_contentblocking_ui_enabled,
-  bool, PREF_VALUE
-)
-#undef PREF_VALUE
-
-// Whether Content Blocking Third-Party Cookies UI has been enabled.
-VARCACHE_PREF(
-  "browser.contentblocking.allowlist.storage.enabled",
-   browser_contentblocking_allowlist_storage_enabled,
-  bool, false
-)
-
-VARCACHE_PREF(
-  "browser.contentblocking.allowlist.annotations.enabled",
-   browser_contentblocking_allowlist_annotations_enabled,
-  bool, true
-)
-
 // Whether FastBlock has been enabled.
 VARCACHE_PREF(
   "browser.fastblock.enabled",
   browser_fastblock_enabled,
   bool, false
 )
 
 // Anti-tracking permission expiration
--- a/netwerk/base/nsChannelClassifier.cpp
+++ b/netwerk/base/nsChannelClassifier.cpp
@@ -512,21 +512,17 @@ nsChannelClassifier::ShouldEnableTrackin
 
     if (!topWinURI && CachedPrefs::GetInstance()->IsAllowListExample()) {
       LOG(("nsChannelClassifier[%p]: Allowlisting test domain\n", this));
       rv = ios->NewURI(NS_LITERAL_CSTRING("http://allowlisted.example.com"),
                        nullptr, nullptr, getter_AddRefs(topWinURI));
       NS_ENSURE_SUCCESS(rv, rv);
     }
 
-    rv = AntiTrackingCommon::IsOnContentBlockingAllowList(topWinURI,
-                                                          aAnnotationsOnly ?
-                                                            AntiTrackingCommon::eTrackingAnnotations :
-                                                            AntiTrackingCommon::eTrackingProtection,
-                                                          mIsAllowListed);
+    rv = AntiTrackingCommon::IsOnContentBlockingAllowList(topWinURI, mIsAllowListed);
     if (NS_FAILED(rv)) {
       return rv; // normal for some loads, no need to print a warning
     }
 
     if (mIsAllowListed) {
       *result = false;
       if (LOG_ENABLED()) {
         nsCString chanSpec = chanURI->GetSpecOrDefault();
--- a/toolkit/components/antitracking/AntiTrackingCommon.cpp
+++ b/toolkit/components/antitracking/AntiTrackingCommon.cpp
@@ -139,19 +139,17 @@ CookiesBehavior(nsIPrincipal* aPrincipal
   return StaticPrefs::network_cookie_cookieBehavior();
 }
 
 bool
 CheckContentBlockingAllowList(nsIURI* aTopWinURI)
 {
   bool isAllowed = false;
   nsresult rv =
-    AntiTrackingCommon::IsOnContentBlockingAllowList(aTopWinURI,
-                                                     AntiTrackingCommon::eStorageChecks,
-                                                     isAllowed);
+    AntiTrackingCommon::IsOnContentBlockingAllowList(aTopWinURI, isAllowed);
   if (NS_SUCCEEDED(rv) && isAllowed) {
     LOG_SPEC(("The top-level window (%s) is on the content blocking allow list, "
               "bail out early", _spec), aTopWinURI);
     return true;
   }
   if (NS_FAILED(rv)) {
     LOG_SPEC(("Checking the content blocking allow list for %s failed with %" PRIx32,
               _spec, static_cast<uint32_t>(rv)), aTopWinURI);
@@ -196,17 +194,17 @@ ReportBlockingToConsole(nsPIDOMWindowOut
 {
   MOZ_ASSERT(aWindow && aChannel);
   MOZ_ASSERT(aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_BY_PERMISSION ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_ALL ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_FOREIGN ||
              aRejectedReason == nsIWebProgressListener::STATE_BLOCKED_SLOW_TRACKING_CONTENT);
 
-  if (!AntiTrackingCommon::ShouldHonorContentBlockingCookieRestrictions()) {
+  if (!StaticPrefs::browser_contentblocking_enabled()) {
     return;
   }
 
   nsCOMPtr<nsIDocShell> docShell = aWindow->GetDocShell();
   if (NS_WARN_IF(!docShell)) {
     return;
   }
 
@@ -252,40 +250,33 @@ ReportBlockingToConsole(nsPIDOMWindowOut
                                   NS_LITERAL_CSTRING("Content Blocking"),
                                   doc,
                                   nsContentUtils::eNECKO_PROPERTIES,
                                   message,
                                   params, ArrayLength(params));
 }
 } // anonymous
 
-/* static */ bool
-AntiTrackingCommon::ShouldHonorContentBlockingCookieRestrictions()
-{
-  return StaticPrefs::browser_contentblocking_enabled() &&
-         StaticPrefs::browser_contentblocking_ui_enabled();
-}
-
 /* static */ RefPtr<AntiTrackingCommon::StorageAccessGrantPromise>
 AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor(const nsAString& aOrigin,
                                                          nsPIDOMWindowInner* aParentWindow)
 {
   MOZ_ASSERT(aParentWindow);
 
   LOG(("Adding a first-party storage exception for %s...",
        NS_ConvertUTF16toUTF8(aOrigin).get()));
 
   if (StaticPrefs::network_cookie_cookieBehavior() !=
         nsICookieService::BEHAVIOR_REJECT_TRACKER) {
     LOG(("Disabled by network.cookie.cookieBehavior pref (%d), bailing out early",
          StaticPrefs::network_cookie_cookieBehavior()));
     return StorageAccessGrantPromise::CreateAndResolve(true, __func__);
   }
 
-  if (!ShouldHonorContentBlockingCookieRestrictions()) {
+  if (!StaticPrefs::browser_contentblocking_enabled()) {
     LOG(("The content blocking pref has been disabled, bail out early"));
     return StorageAccessGrantPromise::CreateAndResolve(true, __func__);
   }
 
   if (CheckContentBlockingAllowList(aParentWindow)) {
     return StorageAccessGrantPromise::CreateAndResolve(true, __func__);
   }
 
@@ -472,17 +463,17 @@ AntiTrackingCommon::IsFirstPartyStorageA
   // Let's check if this is a 3rd party context.
   if (!nsContentUtils::IsThirdPartyWindowOrChannel(aWindow, nullptr, aURI)) {
     LOG(("Our window isn't a third-party window"));
     return true;
   }
 
   if (behavior == nsICookieService::BEHAVIOR_REJECT_FOREIGN) {
     // Now, we have to also honour the Content Blocking pref.
-    if (!ShouldHonorContentBlockingCookieRestrictions()) {
+    if (!StaticPrefs::browser_contentblocking_enabled()) {
       LOG(("The content blocking pref has been disabled, bail out early by "
            "by pretending our window isn't a third-party window"));
       return true;
     }
 
     if (CheckContentBlockingAllowList(aWindow)) {
       LOG(("Allowing access even though our behavior is reject foreign"));
       return true;
@@ -498,17 +489,17 @@ AntiTrackingCommon::IsFirstPartyStorageA
     LOG(("Nothing more to do due to the behavior code %d", int(behavior)));
     *aRejectedReason = nsIWebProgressListener::STATE_COOKIES_BLOCKED_FOREIGN;
     return false;
   }
 
   MOZ_ASSERT(behavior == nsICookieService::BEHAVIOR_REJECT_TRACKER);
 
   // Now, we have to also honour the Content Blocking pref.
-  if (!ShouldHonorContentBlockingCookieRestrictions()) {
+  if (!StaticPrefs::browser_contentblocking_enabled()) {
     LOG(("The content blocking pref has been disabled, bail out early by "
          "by pretending our window isn't a tracking window"));
     return true;
   }
 
   if (CheckContentBlockingAllowList(aWindow)) {
     return true;
   }
@@ -679,17 +670,17 @@ AntiTrackingCommon::IsFirstPartyStorageA
   // system principal...
   if (NS_SUCCEEDED(rv) && !thirdParty) {
     LOG(("Our channel isn't a third-party channel"));
     return true;
   }
 
   if (behavior == nsICookieService::BEHAVIOR_REJECT_FOREIGN) {
     // Now, we have to also honour the Content Blocking pref.
-    if (!ShouldHonorContentBlockingCookieRestrictions()) {
+    if (!StaticPrefs::browser_contentblocking_enabled()) {
       LOG(("The content blocking pref has been disabled, bail out early by "
            "by pretending our window isn't a third-party window"));
       return true;
     }
 
     if (CheckContentBlockingAllowList(aChannel)) {
       LOG(("Allowing access even though our behavior is reject foreign"));
       return true;
@@ -705,17 +696,17 @@ AntiTrackingCommon::IsFirstPartyStorageA
     LOG(("Nothing more to do due to the behavior code %d", int(behavior)));
     *aRejectedReason = nsIWebProgressListener::STATE_COOKIES_BLOCKED_FOREIGN;
     return false;
   }
 
   MOZ_ASSERT(behavior == nsICookieService::BEHAVIOR_REJECT_TRACKER);
 
   // Now, we have to also honour the Content Blocking pref.
-  if (!ShouldHonorContentBlockingCookieRestrictions()) {
+  if (!StaticPrefs::browser_contentblocking_enabled()) {
     LOG(("The content blocking pref has been disabled, bail out early by "
          "pretending our channel isn't a tracking channel"));
     return true;
   }
 
   if (CheckContentBlockingAllowList(aChannel)) {
     return true;
   }
@@ -828,17 +819,17 @@ AntiTrackingCommon::MaybeIsFirstPartySto
   if (StaticPrefs::network_cookie_cookieBehavior() !=
         nsICookieService::BEHAVIOR_REJECT_TRACKER) {
     LOG(("Disabled by the pref (%d), bail out early",
          StaticPrefs::network_cookie_cookieBehavior()));
     return true;
   }
 
   // Now, we have to also honour the Content Blocking pref.
-  if (!ShouldHonorContentBlockingCookieRestrictions()) {
+  if (!StaticPrefs::browser_contentblocking_enabled()) {
     LOG(("The content blocking pref has been disabled, bail out early"));
     return true;
   }
 
   if (CheckContentBlockingAllowList(aFirstPartyWindow)) {
     return true;
   }
 
@@ -895,33 +886,20 @@ AntiTrackingCommon::MaybeIsFirstPartySto
             result == nsIPermissionManager::ALLOW_ACTION ?
               "success" : "failure"), parentPrincipalURI);
 
   return result == nsIPermissionManager::ALLOW_ACTION;
 }
 
 nsresult
 AntiTrackingCommon::IsOnContentBlockingAllowList(nsIURI* aTopWinURI,
-  AntiTrackingCommon::ContentBlockingAllowListPurpose aPurpose,
-  bool& aIsAllowListed)
+                                                 bool& aIsAllowListed)
 {
   aIsAllowListed = false;
 
-  // For storage checks, check the storage pref, and for annotations checks,
-  // check the corresponding pref as well.  This allows each set of checks to
-  // be disabled individually if needed.
-  if ((aPurpose == eStorageChecks &&
-       !StaticPrefs::browser_contentblocking_allowlist_storage_enabled()) ||
-      (aPurpose == eTrackingAnnotations &&
-       !StaticPrefs::browser_contentblocking_allowlist_annotations_enabled())) {
-    LOG(("Attempting to check the content blocking allow list aborted because "
-         "the third-party cookies UI has been disabled."));
-    return NS_OK;
-  }
-
   LOG_SPEC(("Deciding whether the user has overridden content blocking for %s",
             _spec), aTopWinURI);
 
   nsCOMPtr<nsIIOService> ios = services::GetIOService();
   NS_ENSURE_TRUE(ios, NS_ERROR_FAILURE);
 
   // Take the host/port portion so we can allowlist by site. Also ignore the
   // scheme, since users who put sites on the allowlist probably don't expect
--- a/toolkit/components/antitracking/AntiTrackingCommon.h
+++ b/toolkit/components/antitracking/AntiTrackingCommon.h
@@ -24,29 +24,16 @@ class AntiTrackingCommon final
 public:
   // Normally we would include PContentParent.h here and use the
   // ipc::FirstPartyStorageAccessGrantedForOriginResolver type which maps to
   // the same underlying type, but that results in Windows compilation errors,
   // so we use the underlying type to avoid the #include here.
   typedef std::function<void(const bool&)>
     FirstPartyStorageAccessGrantedForOriginResolver;
 
-  // This function should be called to determine whether we need to honour the
-  // content blocking cookie restrictions.  It takes into account whether
-  // content blocking itself is active, and also whether the UI for it is being
-  // shown to the user.  The reason we make this depend on whether the UI is being
-  // shown is to avoid confusing scenarios where the user's privacy choices will
-  // be overridden by the invisible prefs that cannot be controlled in the UI.
-  //
-  // Please note that this function doesn't perform any special checks on _what_
-  // kind of restrictions the consumer is expected to follow.  The consumer is
-  // still responsible to perform further checks to determine that.
-  static bool
-  ShouldHonorContentBlockingCookieRestrictions();
-
   // This method returns true if the URI has first party storage access when
   // loaded inside the passed 3rd party context tracking resource window.
   // If the window is first party context, please use
   // MaybeIsFirstPartyStorageAccessGrantedFor();
   //
   // aRejectedReason could be set to one of these values if passed and if the
   // storage permission is not granted:
   //  * nsIWebProgressListener::STATE_COOKIES_BLOCKED_BY_PERMISSION
@@ -103,27 +90,20 @@ public:
 
   // For IPC only.
   static void
   SaveFirstPartyStorageAccessGrantedForOriginOnParentProcess(nsIPrincipal* aPrincipal,
                                                              const nsCString& aParentOrigin,
                                                              const nsCString& aGrantedOrigin,
                                                              FirstPartyStorageAccessGrantedForOriginResolver&& aResolver);
 
-  enum ContentBlockingAllowListPurpose {
-    eStorageChecks,
-    eTrackingProtection,
-    eTrackingAnnotations,
-  };
 
   // Check whether a top window URI is on the content blocking allow list.
   static nsresult
-  IsOnContentBlockingAllowList(nsIURI* aTopWinURI,
-                               ContentBlockingAllowListPurpose aPurpose,
-                               bool& aIsAllowListed);
+  IsOnContentBlockingAllowList(nsIURI* aTopWinURI, bool& aIsAllowListed);
 
   // This method can be called on the parent process or on the content process.
   // The notification is propagated to the child channel if aChannel is a parent
   // channel proxy.
   //
   // aRejectedReason must be one of these values:
   //  * nsIWebProgressListener::STATE_COOKIES_BLOCKED_BY_PERMISSION
   //  * nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER
--- a/toolkit/components/antitracking/test/browser/browser.ini
+++ b/toolkit/components/antitracking/test/browser/browser.ini
@@ -19,44 +19,21 @@ support-files =
 support-files = server.sjs
 [browser_blockingIndexedDb.js]
 [browser_blockingStorage.js]
 [browser_blockingWorkers.js]
 [browser_blockingMessaging.js]
 [browser_blockingNoOpener.js]
 [browser_existingCookiesForSubresources.js]
 [browser_imageCache1.js]
-[browser_imageCache1-1.js]
-[browser_imageCache1-2.js]
 [browser_imageCache2.js]
-[browser_imageCache2-1.js]
-[browser_imageCache2-2.js]
+[browser_imageCache3.js]
 [browser_imageCache4.js]
-[browser_imageCache4-1.js]
-[browser_imageCache4-2.js]
 [browser_imageCache5.js]
-[browser_imageCache5-1.js]
-[browser_imageCache5-2.js]
-[browser_imageCache6-1.js]
-[browser_imageCache6-2.js]
 [browser_imageCache6.js]
-[browser_imageCache8.js]
-[browser_imageCache9.js]
-[browser_imageCache10.js]
-[browser_imageCache10-1.js]
-[browser_imageCache10-2.js]
-[browser_imageCache11.js]
-[browser_imageCache11-1.js]
-[browser_imageCache11-2.js]
-[browser_imageCache13.js]
-[browser_imageCache13-1.js]
-[browser_imageCache13-2.js]
-[browser_imageCache14.js]
-[browser_imageCache14-1.js]
-[browser_imageCache14-2.js]
 [browser_onBeforeRequestNotificationForTrackingResources.js]
 [browser_onModifyRequestNotificationForTrackingResources.js]
 [browser_permissionInNormalWindows.js]
 [browser_permissionInPrivateWindows.js]
 [browser_subResources.js]
 support-files = subResources.sjs
 [browser_script.js]
 support-files = tracker.js
--- a/toolkit/components/antitracking/test/browser/browser_backgroundImageAssertion.js
+++ b/toolkit/components/antitracking/test/browser/browser_backgroundImageAssertion.js
@@ -1,19 +1,16 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 add_task(async function() {
   info("Starting subResources test");
 
   await SpecialPowers.flushPrefEnv();
   await SpecialPowers.pushPrefEnv({"set": [
-    ["browser.contentblocking.allowlist.annotations.enabled", true],
-    ["browser.contentblocking.allowlist.storage.enabled", true],
     ["browser.contentblocking.enabled", true],
-    ["browser.contentblocking.ui.enabled", true],
     ["network.cookie.cookieBehavior", Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER],
     ["privacy.trackingprotection.enabled", false],
     ["privacy.trackingprotection.pbmode.enabled", false],
     ["privacy.trackingprotection.annotate_channels", true],
   ]});
 
   await UrlClassifierTestUtils.addTestTrackers();
 
--- a/toolkit/components/antitracking/test/browser/browser_existingCookiesForSubresources.js
+++ b/toolkit/components/antitracking/test/browser/browser_existingCookiesForSubresources.js
@@ -68,20 +68,17 @@ add_task(async function() {
 
   info("Removing the tab");
   BrowserTestUtils.removeTab(tab);
 
   Services.perms.removeAll();
 
   // Now set up our prefs
   await SpecialPowers.pushPrefEnv({"set": [
-    ["browser.contentblocking.allowlist.annotations.enabled", true],
-    ["browser.contentblocking.allowlist.storage.enabled", true],
     ["browser.contentblocking.enabled", true],
-    ["browser.contentblocking.ui.enabled", true],
     ["network.cookie.cookieBehavior", Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER],
   ]});
 
   info("Creating a new tab");
   tab = BrowserTestUtils.addTab(gBrowser, TEST_TOP_PAGE);
   gBrowser.selectedTab = tab;
 
   browser = gBrowser.getBrowserForTab(tab);
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache1-1.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = true;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache1-2.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
--- a/toolkit/components/antitracking/test/browser/browser_imageCache1.js
+++ b/toolkit/components/antitracking/test/browser/browser_imageCache1.js
@@ -1,16 +1,13 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
 let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = true;
 let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
 
 let rootDir = getRootDirectory(gTestPath);
 let jar = getJar(rootDir);
 if (jar) {
   let tmpdir = extractJarToTmp(jar);
   rootDir = "file://" + tmpdir.path + "/";
 }
 /* import-globals-from imageCacheWorker.js */
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache10-1.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
-let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = true;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache10-2.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
-let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache10.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
-let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = true;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache11-1.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = true;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache11-2.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache11.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = true;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache13-1.js
+++ /dev/null
@@ -1,21 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-/* Setting a custom permission for this website */
-let uriObj = Services.io.newURI(TEST_DOMAIN);
-Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = true;
-let expectedBlockingNotifications = false;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache13-2.js
+++ /dev/null
@@ -1,21 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-/* Setting a custom permission for this website */
-let uriObj = Services.io.newURI(TEST_DOMAIN);
-Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = false;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache13.js
+++ /dev/null
@@ -1,21 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-/* Setting a custom permission for this website */
-let uriObj = Services.io.newURI(TEST_DOMAIN);
-Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = true;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = false;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache14-1.js
+++ /dev/null
@@ -1,21 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-/* Setting a custom permission for this website */
-let uriObj = Services.io.newURI(TEST_DOMAIN);
-Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = true;
-let expectedBlockingNotifications = false;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache14-2.js
+++ /dev/null
@@ -1,21 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-/* Setting a custom permission for this website */
-let uriObj = Services.io.newURI(TEST_DOMAIN);
-Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = false;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache14.js
+++ /dev/null
@@ -1,21 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-/* Setting a custom permission for this website */
-let uriObj = Services.io.newURI(TEST_DOMAIN);
-Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = true;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = false;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache2-1.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = true;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache2-2.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
--- a/toolkit/components/antitracking/test/browser/browser_imageCache2.js
+++ b/toolkit/components/antitracking/test/browser/browser_imageCache2.js
@@ -1,16 +1,13 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
 let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = true;
 let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
 
 let rootDir = getRootDirectory(gTestPath);
 let jar = getJar(rootDir);
 if (jar) {
   let tmpdir = extractJarToTmp(jar);
   rootDir = "file://" + tmpdir.path + "/";
 }
 /* import-globals-from imageCacheWorker.js */
rename from toolkit/components/antitracking/test/browser/browser_imageCache5-2.js
rename to toolkit/components/antitracking/test/browser/browser_imageCache3.js
--- a/toolkit/components/antitracking/test/browser/browser_imageCache5-2.js
+++ b/toolkit/components/antitracking/test/browser/browser_imageCache3.js
@@ -1,16 +1,13 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
 let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = false;
 let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
 
 let rootDir = getRootDirectory(gTestPath);
 let jar = getJar(rootDir);
 if (jar) {
   let tmpdir = extractJarToTmp(jar);
   rootDir = "file://" + tmpdir.path + "/";
 }
 /* import-globals-from imageCacheWorker.js */
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache4-1.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = true;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache4-2.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
--- a/toolkit/components/antitracking/test/browser/browser_imageCache4.js
+++ b/toolkit/components/antitracking/test/browser/browser_imageCache4.js
@@ -1,16 +1,13 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
 let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = true;
 let blockingByAllowList = true;
-let expectedBlockingNotifications = true;
 
 let rootDir = getRootDirectory(gTestPath);
 let jar = getJar(rootDir);
 if (jar) {
   let tmpdir = extractJarToTmp(jar);
   rootDir = "file://" + tmpdir.path + "/";
 }
 /* import-globals-from imageCacheWorker.js */
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache5-1.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = true;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
--- a/toolkit/components/antitracking/test/browser/browser_imageCache5.js
+++ b/toolkit/components/antitracking/test/browser/browser_imageCache5.js
@@ -1,16 +1,13 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
 let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = true;
 let blockingByAllowList = true;
-let expectedBlockingNotifications = true;
 
 let rootDir = getRootDirectory(gTestPath);
 let jar = getJar(rootDir);
 if (jar) {
   let tmpdir = extractJarToTmp(jar);
   rootDir = "file://" + tmpdir.path + "/";
 }
 /* import-globals-from imageCacheWorker.js */
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache6-1.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = true;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache6-2.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = false;
-let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
--- a/toolkit/components/antitracking/test/browser/browser_imageCache6.js
+++ b/toolkit/components/antitracking/test/browser/browser_imageCache6.js
@@ -1,16 +1,13 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
 let blockingByContentBlocking = false;
-let blockingByContentBlockingUI = false;
-let blockingByContentBlockingRTUI = true;
 let blockingByAllowList = false;
-let expectedBlockingNotifications = true;
 
 let rootDir = getRootDirectory(gTestPath);
 let jar = getJar(rootDir);
 if (jar) {
   let tmpdir = extractJarToTmp(jar);
   rootDir = "file://" + tmpdir.path + "/";
 }
 /* import-globals-from imageCacheWorker.js */
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache8.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = true;
-let blockingByAllowList = true;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_imageCache9.js
+++ /dev/null
@@ -1,18 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
-let blockingByContentBlocking = true;
-let blockingByContentBlockingUI = true;
-let blockingByContentBlockingRTUI = true;
-let blockingByAllowList = true;
-let expectedBlockingNotifications = true;
-
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from imageCacheWorker.js */
-Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);
-
--- a/toolkit/components/antitracking/test/browser/browser_onBeforeRequestNotificationForTrackingResources.js
+++ b/toolkit/components/antitracking/test/browser/browser_onBeforeRequestNotificationForTrackingResources.js
@@ -47,20 +47,17 @@ add_task(async function() {
   await extension.awaitMessage("ready");
 });
 
 add_task(async function() {
   info("Starting subResources test");
 
   await SpecialPowers.flushPrefEnv();
   await SpecialPowers.pushPrefEnv({"set": [
-    ["browser.contentblocking.allowlist.annotations.enabled", true],
-    ["browser.contentblocking.allowlist.storage.enabled", true],
     ["browser.contentblocking.enabled", true],
-    ["browser.contentblocking.ui.enabled", true],
     ["privacy.trackingprotection.enabled", true],
     // the test doesn't open a private window, so we don't care about this pref's value
     ["privacy.trackingprotection.pbmode.enabled", false],
     // tracking annotations aren't needed in this test, only TP is needed
     ["privacy.trackingprotection.annotate_channels", false],
     // prevent the content blocking on-boarding UI to start mid-way through the test!
     [ContentBlocking.prefIntroCount, ContentBlocking.MAX_INTROS],
   ]});
--- a/toolkit/components/antitracking/test/browser/browser_onModifyRequestNotificationForTrackingResources.js
+++ b/toolkit/components/antitracking/test/browser/browser_onModifyRequestNotificationForTrackingResources.js
@@ -42,20 +42,17 @@ async function onModifyRequest() {
   });
 }
 
 add_task(async function() {
   info("Starting subResources test");
 
   await SpecialPowers.flushPrefEnv();
   await SpecialPowers.pushPrefEnv({"set": [
-    ["browser.contentblocking.allowlist.annotations.enabled", true],
-    ["browser.contentblocking.allowlist.storage.enabled", true],
     ["browser.contentblocking.enabled", true],
-    ["browser.contentblocking.ui.enabled", true],
     ["privacy.trackingprotection.enabled", true],
     // the test doesn't open a private window, so we don't care about this pref's value
     ["privacy.trackingprotection.pbmode.enabled", false],
     // tracking annotations aren't needed in this test, only TP is needed
     ["privacy.trackingprotection.annotate_channels", false],
     // prevent the content blocking on-boarding UI to start mid-way through the test!
     [ContentBlocking.prefIntroCount, ContentBlocking.MAX_INTROS],
   ]});
--- a/toolkit/components/antitracking/test/browser/browser_script.js
+++ b/toolkit/components/antitracking/test/browser/browser_script.js
@@ -1,19 +1,16 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 add_task(async function() {
   info("Starting subResources test");
 
   await SpecialPowers.flushPrefEnv();
   await SpecialPowers.pushPrefEnv({"set": [
-    ["browser.contentblocking.allowlist.annotations.enabled", true],
-    ["browser.contentblocking.allowlist.storage.enabled", true],
     ["browser.contentblocking.enabled", true],
-    ["browser.contentblocking.ui.enabled", true],
     ["network.cookie.cookieBehavior", Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER],
     ["privacy.trackingprotection.enabled", false],
     ["privacy.trackingprotection.pbmode.enabled", false],
     ["privacy.trackingprotection.annotate_channels", true],
   ]});
 
   await UrlClassifierTestUtils.addTestTrackers();
 
--- a/toolkit/components/antitracking/test/browser/browser_subResources.js
+++ b/toolkit/components/antitracking/test/browser/browser_subResources.js
@@ -1,19 +1,16 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 add_task(async function() {
   info("Starting subResources test");
 
   await SpecialPowers.flushPrefEnv();
   await SpecialPowers.pushPrefEnv({"set": [
-    ["browser.contentblocking.allowlist.annotations.enabled", true],
-    ["browser.contentblocking.allowlist.storage.enabled", true],
     ["browser.contentblocking.enabled", true],
-    ["browser.contentblocking.ui.enabled", true],
     ["network.cookie.cookieBehavior", Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER],
     ["privacy.trackingprotection.enabled", false],
     ["privacy.trackingprotection.pbmode.enabled", false],
     ["privacy.trackingprotection.annotate_channels", true],
   ]});
 
   await UrlClassifierTestUtils.addTestTrackers();
 
--- a/toolkit/components/antitracking/test/browser/head.js
+++ b/toolkit/components/antitracking/test/browser/head.js
@@ -15,486 +15,167 @@ const TEST_3RD_PARTY_PAGE_WITH_SVG = TES
 const BEHAVIOR_ACCEPT         = Ci.nsICookieService.BEHAVIOR_ACCEPT;
 const BEHAVIOR_REJECT_FOREIGN = Ci.nsICookieService.BEHAVIOR_REJECT_FOREIGN;
 const BEHAVIOR_REJECT_TRACKER = Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER;
 
 var gFeatures = undefined;
 
 let {UrlClassifierTestUtils} = ChromeUtils.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
 
-requestLongerTimeout(3);
-
 this.AntiTracking = {
   runTest(name, callbackTracking, callbackNonTracking, cleanupFunction, extraPrefs,
           windowOpenTest = true, userInteractionTest = true, expectedBlockingNotifications = true,
           runInPrivateWindow = false) {
     // Here we want to test that a 3rd party context is simply blocked.
     this._createTask({
       name,
       cookieBehavior: BEHAVIOR_REJECT_TRACKER,
       blockingByContentBlocking: true,
-      blockingByContentBlockingUI: true,
-      blockingByContentBlockingRTUI: true,
       allowList: false,
       callback: callbackTracking,
       extraPrefs,
       expectedBlockingNotifications,
       runInPrivateWindow,
     });
     this._createCleanupTask(cleanupFunction);
 
-    this._createTask({
-      name,
-      cookieBehavior: BEHAVIOR_REJECT_TRACKER,
-      blockingByContentBlocking: true,
-      blockingByContentBlockingUI: true,
-      blockingByContentBlockingRTUI: false,
-      allowList: true,
-      callback: callbackTracking,
-      extraPrefs,
-      expectedBlockingNotifications,
-      runInPrivateWindow,
-    });
-    this._createCleanupTask(cleanupFunction);
-
     if (callbackNonTracking) {
       let runExtraTests = true;
       let options = {};
       if (typeof callbackNonTracking == "object") {
-        options.callback = callbackNonTracking.callback;
+        callbackNonTracking = callbackNonTracking.callback;
         runExtraTests = callbackNonTracking.runExtraTests;
         if ("cookieBehavior" in callbackNonTracking) {
           options.cookieBehavior = callbackNonTracking.cookieBehavior;
         } else {
           options.cookieBehavior = BEHAVIOR_ACCEPT;
         }
         if ("blockingByContentBlocking" in callbackNonTracking) {
           options.blockingByContentBlocking =
             callbackNonTracking.blockingByContentBlocking;
         } else {
           options.blockingByContentBlocking = false;
         }
-        if ("blockingByContentBlockingUI" in callbackNonTracking) {
-          options.blockingByContentBlockingUI =
-            callbackNonTracking.blockingByContentBlockingUI;
-        } else {
-          options.blockingByContentBlockingUI = false;
-        }
-        if ("blockingByContentBlockingRTUI" in callbackNonTracking) {
-          options.blockingByContentBlockingRTUI =
-            callbackNonTracking.blockingByContentBlockingRTUI;
-        } else {
-          options.blockingByContentBlockingRTUI = false;
-        }
         if ("blockingByAllowList" in callbackNonTracking) {
           options.blockingByAllowList =
             callbackNonTracking.blockingByAllowList;
         } else {
           options.blockingByAllowList = false;
         }
-        callbackNonTracking = options.callback;
       }
 
       // Phase 1: Here we want to test that a 3rd party context is not blocked if pref is off.
       if (runExtraTests) {
-        // There are six ways in which the third-party context may not be blocked:
+        // There are four ways in which the third-party context may not be blocked:
         //   * If the cookieBehavior pref causes it to not be blocked.
         //   * If the contentBlocking pref causes it to not be blocked.
-        //   * If the contentBlocking UI pref causes it to not be blocked.
         //   * If both of these prefs cause it to not be blocked.
         //   * If the top-level page is on the content blocking allow list.
-        //   * If the contentBlocking third-party cookies UI pref is off, the allow list will be ignored.
         // All of these cases are tested here.
         this._createTask({
           name,
           cookieBehavior: BEHAVIOR_ACCEPT,
           blockingByContentBlocking: true,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: true,
-          allowList: false,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_ACCEPT,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: false,
-          allowList: true,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_ACCEPT,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: false,
           allowList: false,
           callback: callbackNonTracking,
           extraPrefs: [],
           expectedBlockingNotifications: false,
           runInPrivateWindow,
         });
         this._createCleanupTask(cleanupFunction);
 
         this._createTask({
           name,
           cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
           blockingByContentBlocking: false,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: true,
-          allowList: false,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
-          blockingByContentBlocking: false,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: false,
-          allowList: true,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
-          blockingByContentBlocking: false,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: false,
-          allowList: false,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: false,
-          blockingByContentBlockingRTUI: true,
-          allowList: false,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: false,
-          blockingByContentBlockingRTUI: false,
-          allowList: true,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: false,
-          blockingByContentBlockingRTUI: false,
           allowList: false,
           callback: callbackNonTracking,
           extraPrefs: [],
           expectedBlockingNotifications: false,
           runInPrivateWindow,
         });
         this._createCleanupTask(cleanupFunction);
 
         this._createTask({
           name,
           cookieBehavior: BEHAVIOR_REJECT_TRACKER,
           blockingByContentBlocking: false,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: true,
-          allowList: false,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_TRACKER,
-          blockingByContentBlocking: false,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: false,
-          allowList: true,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_TRACKER,
-          blockingByContentBlocking: false,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: false,
-          allowList: false,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_TRACKER,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: false,
-          blockingByContentBlockingRTUI: true,
-          allowList: false,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_TRACKER,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: false,
-          blockingByContentBlockingRTUI: false,
-          allowList: true,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_TRACKER,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: false,
-          blockingByContentBlockingRTUI: false,
           allowList: false,
           callback: callbackNonTracking,
           extraPrefs: [],
           expectedBlockingNotifications: false,
           runInPrivateWindow,
         });
         this._createCleanupTask(cleanupFunction);
 
         this._createTask({
           name,
           cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
           blockingByContentBlocking: false,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: true,
-          allowList: true,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: false,
-          blockingByContentBlockingRTUI: true,
           allowList: true,
           callback: callbackNonTracking,
           extraPrefs: [],
           expectedBlockingNotifications: false,
           runInPrivateWindow,
         });
         this._createCleanupTask(cleanupFunction);
 
         this._createTask({
           name,
           cookieBehavior: BEHAVIOR_REJECT_TRACKER,
           blockingByContentBlocking: false,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: true,
-          allowList: true,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_REJECT_TRACKER,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: false,
-          blockingByContentBlockingRTUI: true,
           allowList: true,
           callback: callbackNonTracking,
           extraPrefs: [],
           expectedBlockingNotifications: false,
           runInPrivateWindow,
         });
         this._createCleanupTask(cleanupFunction);
 
         this._createTask({
           name,
           cookieBehavior: BEHAVIOR_ACCEPT,
           blockingByContentBlocking: false,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: true,
-          allowList: false,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_ACCEPT,
-          blockingByContentBlocking: false,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: false,
-          allowList: true,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_ACCEPT,
-          blockingByContentBlocking: false,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: false,
-          allowList: false,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_ACCEPT,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: false,
-          blockingByContentBlockingRTUI: true,
-          allowList: false,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_ACCEPT,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: false,
-          blockingByContentBlockingRTUI: false,
-          allowList: true,
-          callback: callbackNonTracking,
-          extraPrefs: [],
-          expectedBlockingNotifications: false,
-          runInPrivateWindow,
-        });
-        this._createCleanupTask(cleanupFunction);
-
-        this._createTask({
-          name,
-          cookieBehavior: BEHAVIOR_ACCEPT,
-          blockingByContentBlocking: true,
-          blockingByContentBlockingUI: false,
-          blockingByContentBlockingRTUI: false,
           allowList: false,
           callback: callbackNonTracking,
           extraPrefs: [],
           expectedBlockingNotifications: false,
           runInPrivateWindow,
         });
         this._createCleanupTask(cleanupFunction);
 
         // Try testing using the allow list with both reject foreign and reject tracker cookie behaviors
         this._createTask({
           name,
           cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
           blockingByContentBlocking: true,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: true,
           allowList: true,
           callback: callbackNonTracking,
           extraPrefs: [],
           expectedBlockingNotifications: false,
           runInPrivateWindow,
         });
         this._createCleanupTask(cleanupFunction);
 
         this._createTask({
           name,
           cookieBehavior: BEHAVIOR_REJECT_TRACKER,
           blockingByContentBlocking: true,
-          blockingByContentBlockingUI: true,
-          blockingByContentBlockingRTUI: true,
           allowList: true,
           callback: callbackNonTracking,
           extraPrefs: [],
           expectedBlockingNotifications: false,
           runInPrivateWindow,
         });
         this._createCleanupTask(cleanupFunction);
-      } else if (!options.blockingByContentBlocking ||
-                 !options.blockingByContentBlockingUI) {
-        // Don't run this extra test if we are in blocking mode!
+      } else {
         this._createTask({
           name,
           cookieBehavior: options.cookieBehavior,
           blockingByContentBlocking: options.blockingByContentBlocking,
-          blockingByContentBlockingUI: options.blockingByContentBlockingUI,
-          blockingByContentBlockingRTUI: options.blockingByContentBlockingRTUI,
           allowList: options.blockingByAllowList,
           callback: callbackNonTracking,
           extraPrefs: [],
           expectedBlockingNotifications: false,
           runInPrivateWindow,
         });
         this._createCleanupTask(cleanupFunction);
       }
@@ -510,25 +191,20 @@ this.AntiTracking = {
       // get blocked with user interaction present
       if (userInteractionTest) {
         this._createUserInteractionTask(name, callbackTracking, callbackNonTracking, runInPrivateWindow, extraPrefs);
         this._createCleanupTask(cleanupFunction);
       }
     }
   },
 
-  async _setupTest(win, cookieBehavior, blockingByContentBlocking,
-                   blockingByContentBlockingUI, blockingByContentBlockingRTUI,
-                   extraPrefs) {
+  async _setupTest(win, cookieBehavior, blockingByContentBlocking, 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],
       ["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) {
@@ -536,34 +212,30 @@ this.AntiTracking = {
     }
 
     await UrlClassifierTestUtils.addTestTrackers();
   },
 
   _createTask(options) {
     add_task(async function() {
       info("Starting " + (options.cookieBehavior != BEHAVIOR_ACCEPT ? "blocking" : "non-blocking") + " cookieBehavior (" + options.cookieBehavior + ") and " +
-                         (options.blockingByContentBlocking ? "blocking" : "non-blocking") + " contentBlocking and " +
-                         (options.blockingByContentBlockingUI ? "" : "no") + " contentBlocking UI and " +
-                         (options.blockingByContentBlockingRTUI ? "" : "no") + " contentBlocking third-party cookies UI with" +
+                         (options.blockingByContentBlocking ? "blocking" : "non-blocking") + " contentBlocking with" +
                          (options.allowList ? "" : "out") + " allow list test " + options.name +
                          " running in a " + (options.runInPrivateWindow ? "private" : "normal") + " window");
 
       requestLongerTimeout(2);
 
       let win = window;
       if (options.runInPrivateWindow) {
         win = OpenBrowserWindow({private: true});
         await TestUtils.topicObserved("browser-delayed-startup-finished");
       }
 
       await AntiTracking._setupTest(win, options.cookieBehavior,
                                     options.blockingByContentBlocking,
-                                    options.blockingByContentBlockingUI,
-                                    options.blockingByContentBlockingRTUI,
                                     options.extraPrefs);
 
       let cookieBlocked = 0;
       let listener = {
         onSecurityChange(webProgress, request, stateFlags, status) {
           if (stateFlags & Ci.nsIWebProgressListener.STATE_COOKIES_BLOCKED_TRACKER) {
             ++cookieBlocked;
           }
@@ -660,17 +332,17 @@ this.AntiTracking = {
       requestLongerTimeout(2);
 
       let win = window;
       if (runInPrivateWindow) {
         win = OpenBrowserWindow({private: true});
         await TestUtils.topicObserved("browser-delayed-startup-finished");
       }
 
-      await AntiTracking._setupTest(win, BEHAVIOR_REJECT_TRACKER, true, true, true, extraPrefs);
+      await AntiTracking._setupTest(win, BEHAVIOR_REJECT_TRACKER, true, extraPrefs);
 
       info("Creating a new tab");
       let tab = BrowserTestUtils.addTab(win.gBrowser, TEST_TOP_PAGE);
       win.gBrowser.selectedTab = tab;
 
       let browser = win.gBrowser.getBrowserForTab(tab);
       await BrowserTestUtils.browserLoaded(browser);
 
@@ -734,17 +406,17 @@ this.AntiTracking = {
       requestLongerTimeout(2);
 
       let win = window;
       if (runInPrivateWindow) {
         win = OpenBrowserWindow({private: true});
         await TestUtils.topicObserved("browser-delayed-startup-finished");
       }
 
-      await AntiTracking._setupTest(win, BEHAVIOR_REJECT_TRACKER, true, true, true, extraPrefs);
+      await AntiTracking._setupTest(win, BEHAVIOR_REJECT_TRACKER, true, extraPrefs);
 
       info("Creating a new tab");
       let tab = BrowserTestUtils.addTab(win.gBrowser, TEST_TOP_PAGE);
       win.gBrowser.selectedTab = tab;
 
       let browser = win.gBrowser.getBrowserForTab(tab);
       await BrowserTestUtils.browserLoaded(browser);
 
--- a/toolkit/components/antitracking/test/browser/imageCacheWorker.js
+++ b/toolkit/components/antitracking/test/browser/imageCacheWorker.js
@@ -1,13 +1,13 @@
 /* import-globals-from head.js */
 /* import-globals-from browser_imageCache1.js */
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-AntiTracking.runTest("Image cache - should load the image three times.",
+AntiTracking.runTest("Image cache - should load the image twice.",
   // blocking callback
   async _ => {
     // Let's load the image twice here.
     let img = document.createElement("img");
     document.body.appendChild(img);
     img.src = "https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/image.sjs";
     await new Promise(resolve => { img.onload = resolve; });
     ok(true, "Image 1 loaded");
@@ -19,18 +19,16 @@ AntiTracking.runTest("Image cache - shou
     ok(true, "Image 2 loaded");
   },
 
   // non-blocking callback
   {
     runExtraTests: false,
     cookieBehavior,
     blockingByContentBlocking,
-    blockingByContentBlockingUI,
-    blockingByContentBlockingRTUI,
     blockingByAllowList,
     callback: async _ => {
       // Let's load the image twice here as well.
       let img = document.createElement("img");
       document.body.appendChild(img);
       img.src = "https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/image.sjs";
       await new Promise(resolve => { img.onload = resolve; });
       ok(true, "Image 3 loaded");
@@ -40,28 +38,23 @@ AntiTracking.runTest("Image cache - shou
       img.src = "https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/image.sjs";
       await new Promise(resolve => { img.onload = resolve; });
       ok(true, "Image 4 loaded");
     },
   },
   null, // cleanup function
   null, // no extra prefs
   false, // no window open test
-  false, // no user-interaction test
-  expectedBlockingNotifications
+  false // no user-interaction test
 );
 
-// If we didn't run the non-blocking test, only expect to have seen two images.
-// Otherwise, expect to have seen three images.
-let expected = (blockingByContentBlocking && blockingByContentBlockingUI) ? 2 : 3;
-
-// We still want to see just expected requests.
+// We still want to see just 2 requests.
 add_task(async _ => {
   await fetch("https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/image.sjs?result")
     .then(r => r.text())
     .then(text => {
-      is(text, expected, "The image should be loaded correctly.");
+      is(text, 2, "The image should be loaded correctly.");
     });
 
   await new Promise(resolve => {
     Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => resolve());
   });
 });