Backed out 4 changesets (bug 1507769, bug 1505571) for browser_storageAccessWithHeuristics.js failures CLOSED TREE
authorCiure Andrei <aciure@mozilla.com>
Mon, 19 Nov 2018 22:06:24 +0200
changeset 503541 29ff944efa40e929995f6b2660383041738266f0
parent 503540 a03fb83d108c3495b61865943caafd259ab00dec
child 503542 c4aa7a5fe3e188220c21f4b478b49ad56a40a15a
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1507769, 1505571
milestone65.0a1
backs out401763b97e54cd99c6a5ad2a617379da011a57e5
838dfe679fddff427f3e8b8ded6e356437c6110e
88af3329ee16b19450f0c4638d4fb39019cdf928
be17a8b7aefa08d2ab6e7967314747073c087512
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 4 changesets (bug 1507769, bug 1505571) for browser_storageAccessWithHeuristics.js failures CLOSED TREE Backed out changeset 401763b97e54 (bug 1507769) Backed out changeset 838dfe679fdd (bug 1505571) Backed out changeset 88af3329ee16 (bug 1505571) Backed out changeset be17a8b7aefa (bug 1505571)
dom/base/nsDocument.cpp
dom/base/nsGlobalWindowInner.cpp
dom/base/nsGlobalWindowOuter.cpp
dom/base/nsIDocument.h
dom/base/nsPIDOMWindow.h
modules/libpref/init/all.js
toolkit/components/antitracking/AntiTrackingCommon.cpp
toolkit/components/antitracking/AntiTrackingCommon.h
toolkit/components/antitracking/test/browser/browser.ini
toolkit/components/antitracking/test/browser/browser_localStorageEvents.js
toolkit/components/antitracking/test/browser/head.js
toolkit/components/antitracking/test/browser/localStorage.html
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -12898,17 +12898,17 @@ nsIDocument::SetUserHasInteracted()
 
   mUserHasInteracted = true;
 
   nsCOMPtr<nsILoadInfo> loadInfo = mChannel ? mChannel->GetLoadInfo() : nullptr;
   if (loadInfo) {
     loadInfo->SetDocumentHasUserInteracted(true);
   }
 
-  MaybeAllowStorageForOpenerAfterUserInteraction();
+  MaybeAllowStorageForOpener();
 }
 
 void
 nsIDocument::NotifyUserGestureActivation()
 {
   // Activate this document and all documents up to the top level
   // content document.
   nsIDocument* doc = this;
@@ -12945,17 +12945,17 @@ nsIDocument::SetDocTreeHadPlayRevoked()
 {
   nsIDocument* topLevelDoc = GetTopLevelContentDocument();
   if (topLevelDoc) {
     topLevelDoc->mDocTreeHadPlayRevoked = true;
   }
 }
 
 void
-nsIDocument::MaybeAllowStorageForOpenerAfterUserInteraction()
+nsIDocument::MaybeAllowStorageForOpener()
 {
   if (StaticPrefs::network_cookie_cookieBehavior() !=
         nsICookieService::BEHAVIOR_REJECT_TRACKER) {
     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
@@ -13003,17 +13003,17 @@ nsIDocument::MaybeAllowStorageForOpenerA
       !nsContentUtils::IsThirdPartyWindowOrChannel(openerInner, nullptr,
                                                    nullptr)) {
     return;
   }
 
   // We don't care when the asynchronous work finishes here.
   Unused << AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor(NodePrincipal(),
                                                                      openerInner,
-                                                                     AntiTrackingCommon::eOpenerAfterUserInteraction);
+                                                                     AntiTrackingCommon::eHeuristic);
 }
 
 namespace {
 
 // Documents can stay alive for days. We don't want to update the permission
 // value at any user-interaction, and, using a timer triggered any X seconds
 // should be good enough. 'X' is taken from
 // privacy.userInteraction.document.interval pref.
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -8062,30 +8062,16 @@ nsPIDOMWindowInner::GetAutoplayPermissio
     window->mAutoplayPermissionManager =
       new AutoplayPermissionManager(nsGlobalWindowInner::Cast(window));
   }
   RefPtr<mozilla::AutoplayPermissionManager> manager =
     window->mAutoplayPermissionManager;
   return manager.forget();
 }
 
-void
-nsPIDOMWindowInner::SaveStorageAccessGranted(const nsACString& aPermissionKey)
-{
-  if (!HasStorageAccessGranted(aPermissionKey)) {
-    mStorageAccessGranted.AppendElement(aPermissionKey);
-  }
-}
-
-bool
-nsPIDOMWindowInner::HasStorageAccessGranted(const nsACString& aPermissionKey)
-{
-  return mStorageAccessGranted.Contains(aPermissionKey);
-}
-
 // XXX: Can we define this in a header instead of here?
 namespace mozilla {
 namespace dom {
 extern uint64_t
 NextWindowID();
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -7231,17 +7231,17 @@ nsGlobalWindowOuter::MaybeAllowStorageFo
   }
   nsCOMPtr<nsIPrincipal> principal =
     BasePrincipal::CreateCodebasePrincipal(aURI,
       doc->NodePrincipal()->OriginAttributesRef());
 
   // We don't care when the asynchronous work finishes here.
   Unused << AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor(principal,
                                                                      inner,
-                                                                     AntiTrackingCommon::eOpener);
+                                                                     AntiTrackingCommon::eHeuristic);
 }
 
 //*****************************************************************************
 // nsGlobalWindowOuter: Helper Functions
 //*****************************************************************************
 
 already_AddRefed<nsIDocShellTreeOwner>
 nsGlobalWindowOuter::GetTreeOwner()
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -3977,17 +3977,17 @@ protected:
   void UpdateFrameRequestCallbackSchedulingState(nsIPresShell* aOldShell = nullptr);
 
   // Helper for GetScrollingElement/IsScrollingElement.
   bool IsPotentiallyScrollable(mozilla::dom::HTMLBodyElement* aBody);
 
   // Return the same type parent docuement if exists, or return null.
   nsIDocument* GetSameTypeParentDocument();
 
-  void MaybeAllowStorageForOpenerAfterUserInteraction();
+  void MaybeAllowStorageForOpener();
 
   void MaybeStoreUserInteractionAsPermission();
 
   // Helpers for GetElementsByName.
   static bool MatchNameAttribute(mozilla::dom::Element* aElement,
                                  int32_t aNamespaceID,
                                  nsAtom* aAtom, void* aData);
   static void* UseExistingNameString(nsINode* aRootNode, const nsString* aName);
--- a/dom/base/nsPIDOMWindow.h
+++ b/dom/base/nsPIDOMWindow.h
@@ -641,22 +641,16 @@ public:
   UnregisterReportingObserver(mozilla::dom::ReportingObserver* aObserver);
 
   void
   BroadcastReport(mozilla::dom::Report* aReport);
 
   void
   NotifyReportingObservers();
 
-  void
-  SaveStorageAccessGranted(const nsACString& aPermissionKey);
-
-  bool
-  HasStorageAccessGranted(const nsACString& aPermissionKey);
-
 protected:
   void CreatePerformanceObjectIfNeeded();
 
   // Lazily instantiate an about:blank document if necessary, and if
   // we have what it takes to do so.
   void MaybeCreateDoc();
 
   void SetChromeEventHandlerInternal(mozilla::dom::EventTarget* aChromeEventHandler) {
@@ -745,21 +739,16 @@ protected:
 
   // The event dispatch code sets and unsets this while keeping
   // the event object alive.
   mozilla::dom::Event* mEvent;
 
   // List of Report objects for ReportingObservers.
   nsTArray<RefPtr<mozilla::dom::ReportingObserver>> mReportingObservers;
   nsTArray<RefPtr<mozilla::dom::Report>> mReportRecords;
-
-  // This is a list of storage access granted for the current window. These are
-  // also set as permissions, but it could happen that we need to access them
-  // synchronously in this context, and for this, we need a copy here.
-  nsTArray<nsCString> mStorageAccessGranted;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsPIDOMWindowInner, NS_PIDOMWINDOWINNER_IID)
 
 class nsPIDOMWindowOuter : public mozIDOMWindowProxy
 {
 protected:
   explicit nsPIDOMWindowOuter(uint64_t aWindowID);
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1370,20 +1370,16 @@ pref("content.sink.pending_event_mode", 
 //   1 = openControlled
 //   2 = openBlocked
 //   3 = openAbused
 pref("privacy.popups.disable_from_plugins", 3);
 
 // Enable Paritioned LocalStorage for a list of hosts.
 pref("privacy.restrict3rdpartystorage.partitionedHosts", "accounts.google.com/o/oauth2/");
 
-// If a host is contained in this pref list, user-interaction is required
-// before granting the storage access permission.
-pref("privacy.restrict3rdpartystorage.userInteractionRequiredForHosts", "");
-
 // Excessive reporting of blocked popups can be a DOS vector,
 // by overloading the main process as popups get blocked and when
 // users try to restore all popups, which is the most visible
 // option in our UI at the time of writing.
 // We will invisibly drop any popups from a page that has already
 // opened more than this number of popups.
 pref("privacy.popups.maxReported", 100);
 
--- a/toolkit/components/antitracking/AntiTrackingCommon.cpp
+++ b/toolkit/components/antitracking/AntiTrackingCommon.cpp
@@ -327,19 +327,17 @@ ReportUnblockingConsole(nsPIDOMWindowInn
   const char *messageWithSameOrigin = nullptr;
 
   switch (aReason) {
     case AntiTrackingCommon::eStorageAccessAPI:
       messageWithDifferentOrigin = "CookieAllowedForOriginOnTrackerByStorageAccessAPI";
       messageWithSameOrigin = "CookieAllowedForTrackerByStorageAccessAPI";
       break;
 
-    case AntiTrackingCommon::eOpenerAfterUserInteraction:
-      MOZ_FALLTHROUGH;
-    case AntiTrackingCommon::eOpener:
+    case AntiTrackingCommon::eHeuristic:
       messageWithDifferentOrigin = "CookieAllowedForOriginOnTrackerByHeuristic";
       messageWithSameOrigin = "CookieAllowedForTrackerByHeuristic";
       break;
   }
 
   if (aTrackingOrigin == aGrantedOrigin) {
     nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
                                     NS_LITERAL_CSTRING("Content Blocking"),
@@ -484,67 +482,40 @@ AntiTrackingCommon::AddFirstPartyStorage
                                                   getter_AddRefs(topLevelStoragePrincipal),
                                                   trackingOrigin,
                                                   getter_AddRefs(trackingURI),
                                                   getter_AddRefs(trackingPrincipal))) {
     LOG(("Error while computing the parent principal and tracking origin, bailing out early"));
     return StorageAccessGrantPromise::CreateAndReject(false, __func__);
   }
 
-  nsCOMPtr<nsPIDOMWindowOuter> topOuterWindow = outerParentWindow->GetTop();
-  nsGlobalWindowOuter* topWindow = nsGlobalWindowOuter::Cast(topOuterWindow);
-  if (NS_WARN_IF(!topWindow)) {
-    LOG(("No top outer window."));
-    return StorageAccessGrantPromise::CreateAndReject(false, __func__);
-  }
-
-  nsPIDOMWindowInner* topInnerWindow = topWindow->GetCurrentInnerWindow();
-  if (NS_WARN_IF(!topInnerWindow)) {
-    LOG(("No top inner window."));
-    return StorageAccessGrantPromise::CreateAndReject(false, __func__);
-  }
-
-  // We hardcode this block reason since the first-party storage access
-  // permission is granted for the purpose of blocking trackers.
-  // Note that if aReason is eOpenerAfterUserInteraction and the
-  // trackingPrincipal is not in a blacklist, we don't check the
-  // user-interaction state, because it could be that the current process has
-  // just sent the request to store the user-interaction permission into the
-  // parent, without having received the permission itself yet.
+  // We hardcode this block reason since the first-party storage access permission
+  // is granted for the purpose of blocking trackers.
   const uint32_t blockReason = nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER;
-  if ((aReason != eOpenerAfterUserInteraction ||
-       nsContentUtils::IsURIInPrefList(trackingURI,
-         "privacy.restrict3rdpartystorage.userInteractionRequiredForHosts")) &&
-      !HasUserInteraction(trackingPrincipal)) {
+  if (!HasUserInteraction(trackingPrincipal)) {
     LOG_SPEC(("Tracking principal (%s) hasn't been interacted with before, "
               "refusing to add a first-party storage permission to access it",
               _spec), trackingURI);
     NotifyRejection(aParentWindow, blockReason);
     return StorageAccessGrantPromise::CreateAndReject(false, __func__);
   }
 
   nsCOMPtr<nsPIDOMWindowOuter> pwin = GetTopWindow(parentWindow);
   if (!pwin) {
     LOG(("Couldn't get the top window"));
     return StorageAccessGrantPromise::CreateAndReject(false, __func__);
   }
 
-  NS_ConvertUTF16toUTF8 grantedOrigin(origin);
-
-  nsAutoCString permissionKey;
-  CreatePermissionKey(trackingOrigin, grantedOrigin, permissionKey);
-
-  // Let's store the permission in the current parent window.
-  topInnerWindow->SaveStorageAccessGranted(permissionKey);
-
   nsIChannel* channel =
     pwin->GetCurrentInnerWindow()->GetExtantDoc()->GetChannel();
 
   pwin->NotifyContentBlockingState(blockReason, channel, false, trackingURI);
 
+  NS_ConvertUTF16toUTF8 grantedOrigin(origin);
+
   ReportUnblockingConsole(parentWindow, NS_ConvertUTF8toUTF16(trackingOrigin),
                           origin, aReason);
 
   if (XRE_IsParentProcess()) {
     LOG(("Saving the permission: trackingOrigin=%s, grantedOrigin=%s",
          trackingOrigin.get(), grantedOrigin.get()));
 
     RefPtr<StorageAccessGrantPromise::Private> p = new StorageAccessGrantPromise::Private(__func__);
@@ -618,17 +589,17 @@ AntiTrackingCommon::SaveFirstPartyStorag
     // permission which won't get persisted to disk.
     expirationType = nsIPermissionManager::EXPIRE_SESSION;
     when = 0;
   }
 
   nsAutoCString type;
   CreatePermissionKey(aTrackingOrigin, aGrantedOrigin, type);
 
-  LOG(("Computed permission key: %s, expiry: %u, proceeding to save in the permission manager",
+  LOG(("Computed permission key: %s, expiry: %d, proceeding to save in the permission manager",
        type.get(), expirationTime));
 
   rv = pm->AddFromPrincipal(aParentPrincipal, type.get(),
                             nsIPermissionManager::ALLOW_ACTION,
                             expirationType, when);
   Unused << NS_WARN_IF(NS_FAILED(rv));
   aResolver(NS_SUCCEEDED(rv));
 
@@ -792,45 +763,18 @@ AntiTrackingCommon::IsFirstPartyStorageA
 
   nsAutoString origin;
   nsresult rv = nsContentUtils::GetUTFOrigin(aURI, origin);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     LOG_SPEC(("Failed to compute the origin from %s", _spec), aURI);
     return false;
   }
 
-  NS_ConvertUTF16toUTF8 grantedOrigin(origin);
-
-  nsGlobalWindowOuter* outerWindow =
-    nsGlobalWindowOuter::Cast(aWindow->GetOuterWindow());
-  if (NS_WARN_IF(!outerWindow)) {
-    LOG(("No outer window."));
-    return false;
-  }
-
-  nsCOMPtr<nsPIDOMWindowOuter> topOuterWindow = outerWindow->GetTop();
-  nsGlobalWindowOuter* topWindow = nsGlobalWindowOuter::Cast(topOuterWindow);
-  if (NS_WARN_IF(!topWindow)) {
-    LOG(("No top outer window."));
-    return false;
-  }
-
-  nsPIDOMWindowInner* topInnerWindow = topWindow->GetCurrentInnerWindow();
-  if (NS_WARN_IF(!topInnerWindow)) {
-    LOG(("No top inner window."));
-    return false;
-  }
-
   nsAutoCString type;
-  CreatePermissionKey(trackingOrigin, grantedOrigin, type);
-
-  if (topInnerWindow->HasStorageAccessGranted(type)) {
-    LOG(("Permission stored in the window. All good."));
-    return true;
-  }
+  CreatePermissionKey(trackingOrigin, NS_ConvertUTF16toUTF8(origin), type);
 
   nsCOMPtr<nsIPermissionManager> pm = services::GetPermissionManager();
   if (NS_WARN_IF(!pm)) {
     LOG(("Failed to obtain the permission manager"));
     return false;
   }
 
   uint32_t result = 0;
--- a/toolkit/components/antitracking/AntiTrackingCommon.h
+++ b/toolkit/components/antitracking/AntiTrackingCommon.h
@@ -69,18 +69,17 @@ public:
   // This method checks if the principal has the permission to access to the
   // first party storage.
   static bool
   IsFirstPartyStorageAccessGrantedFor(nsIPrincipal* aPrincipal);
 
   enum StorageAccessGrantedReason
   {
     eStorageAccessAPI,
-    eOpenerAfterUserInteraction,
-    eOpener
+    eHeuristic,
   };
 
   // Grant the permission for aOrigin to have access to the first party storage.
   // This method can handle 2 different scenarios:
   // - aParentWindow is a 3rd party context, it opens an aOrigin window and the
   //   user interacts with it. We want to grant the permission at the
   //   combination: top-level + aParentWindow + aOrigin.
   //   Ex: example.net loads an iframe tracker.com, which opens a popup
--- a/toolkit/components/antitracking/test/browser/browser.ini
+++ b/toolkit/components/antitracking/test/browser/browser.ini
@@ -55,13 +55,11 @@ skip-if = serviceworker_e10s
 [browser_storageAccessPromiseResolveHandlerUserInteraction.js]
 [browser_storageAccessRemovalNavigateSubframe.js]
 skip-if = serviceworker_e10s
 [browser_storageAccessSandboxed.js]
 skip-if = serviceworker_e10s
 [browser_storageAccessWithHeuristics.js]
 [browser_allowPermissionForTracker.js]
 [browser_denyPermissionForTracker.js]
-[browser_localStorageEvents.js]
-support-files = localStorage.html
 [browser_partitionedLocalStorage.js]
 [browser_partitionedLocalStorage_events.js]
 support-files = localStorageEvents.html
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/browser_localStorageEvents.js
+++ /dev/null
@@ -1,143 +0,0 @@
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-add_task(async function() {
-  info("Starting subResources test");
-
-  await SpecialPowers.flushPrefEnv();
-  await SpecialPowers.pushPrefEnv({"set": [
-    ["dom.storage_access.enabled", true],
-    ["browser.contentblocking.allowlist.annotations.enabled", true],
-    ["browser.contentblocking.allowlist.storage.enabled", true],
-    ["browser.fastblock.enabled", false],
-    ["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();
-});
-
-add_task(async function testLocalStorageEventPropagation() {
-  info("Creating a new tab");
-  let tab = BrowserTestUtils.addTab(gBrowser, TEST_TOP_PAGE);
-  gBrowser.selectedTab = tab;
-
-  let browser = gBrowser.getBrowserForTab(tab);
-  await BrowserTestUtils.browserLoaded(browser);
-
-  info("Loading tracking scripts");
-  await ContentTask.spawn(browser, {
-                                     page: TEST_3RD_PARTY_DOMAIN + TEST_PATH + "localStorage.html",
-                                   }, async obj => {
-    info("Creating tracker iframe");
-
-    let ifr = content.document.createElement("iframe");
-    ifr.src = obj.page;
-
-    await new content.Promise(resolve => {
-      ifr.onload = function() {
-        resolve();
-      };
-      content.document.body.appendChild(ifr);
-    });
-
-    info("LocalStorage should be blocked.");
-    await new content.Promise(resolve => {
-      content.addEventListener("message", e => {
-        if (e.data.type == "test") {
-          is(e.data.status, false, "LocalStorage blocked");
-        } else {
-          ok(false, "Unknown message");
-        }
-        resolve();
-      }, {once: true});
-      ifr.contentWindow.postMessage("test", "*");
-    });
-
-    info("Let's open the popup");
-    await new content.Promise(resolve => {
-      content.addEventListener("message", e => {
-        if (e.data.type == "test") {
-          is(e.data.status, true, "LocalStorage unblocked");
-        } else {
-          ok(false, "Unknown message");
-        }
-        resolve();
-      }, {once: true});
-      ifr.contentWindow.postMessage("open", "*");
-    });
-  });
-
-  info("Removing the tab");
-  BrowserTestUtils.removeTab(tab);
-
-  info("Cleaning up.");
-  await new Promise(resolve => {
-    Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => resolve());
-  });
-});
-
-add_task(async function testBlockedLocalStorageEventPropagation() {
-  await SpecialPowers.pushPrefEnv({"set": [
-    ["privacy.restrict3rdpartystorage.userInteractionRequiredForHosts", "tracking.example.com,tracking.example.org"],
-  ]});
-
-  info("Creating a new tab");
-  let tab = BrowserTestUtils.addTab(gBrowser, TEST_TOP_PAGE);
-  gBrowser.selectedTab = tab;
-
-  let browser = gBrowser.getBrowserForTab(tab);
-  await BrowserTestUtils.browserLoaded(browser);
-
-  info("Loading tracking scripts");
-  await ContentTask.spawn(browser, {
-                                     page: TEST_3RD_PARTY_DOMAIN + TEST_PATH + "localStorage.html",
-                                   }, async obj => {
-    info("Creating tracker iframe");
-
-    let ifr = content.document.createElement("iframe");
-    ifr.src = obj.page;
-
-    await new content.Promise(resolve => {
-      ifr.onload = function() {
-        resolve();
-      };
-      content.document.body.appendChild(ifr);
-    });
-
-    info("LocalStorage should be blocked.");
-    await new content.Promise(resolve => {
-      content.addEventListener("message", e => {
-        if (e.data.type == "test") {
-          is(e.data.status, false, "LocalStorage blocked");
-        } else {
-          ok(false, "Unknown message");
-        }
-        resolve();
-      }, {once: true});
-      ifr.contentWindow.postMessage("test", "*");
-    });
-
-    info("Let's open the popup");
-    await new content.Promise(resolve => {
-      content.addEventListener("message", e => {
-        if (e.data.type == "test") {
-          is(e.data.status, false, "LocalStorage still blocked");
-        } else {
-          ok(false, "Unknown message");
-        }
-        resolve();
-      }, {once: true});
-      ifr.contentWindow.postMessage("open and test", "*");
-    });
-  });
-
-  info("Removing the tab");
-  BrowserTestUtils.removeTab(tab);
-
-  info("Cleaning up.");
-  await new Promise(resolve => {
-    Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => resolve());
-  });
-});
--- a/toolkit/components/antitracking/test/browser/head.js
+++ b/toolkit/components/antitracking/test/browser/head.js
@@ -250,17 +250,16 @@ this.AntiTracking = {
       ["browser.contentblocking.allowlist.annotations.enabled", blockingByContentBlockingRTUI],
       ["browser.contentblocking.allowlist.storage.enabled", blockingByContentBlockingRTUI],
       ["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],
       ["browser.fastblock.enabled", false], // prevent intermittent failures
-      ["privacy.restrict3rdpartystorage.userInteractionRequiredForHosts", "tracking.example.com,tracking.example.org"],
     ]});
 
     if (extraPrefs && Array.isArray(extraPrefs) && extraPrefs.length) {
       await SpecialPowers.pushPrefEnv({"set": extraPrefs });
     }
 
     await UrlClassifierTestUtils.addTestTrackers();
   },
deleted file mode 100644
--- a/toolkit/components/antitracking/test/browser/localStorage.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<h1>Here a tracker!</h1>
-<script>
-
-if (window.opener) {
-  SpecialPowers.wrap(document).userInteractionForTesting();
-  localStorage.foo = "opener" + Math.random();
-  window.close();
-}
-
-if (parent) {
-  window.onmessage = e => {
-    if (e.data == "test") {
-      let status;
-      try {
-        localStorage.foo = "value" + Math.random();
-        status = true;
-      } catch (e) {
-        status = false;
-      }
-
-      parent.postMessage({type: "test", status }, "*");
-      return;
-    }
-
-    if (e.data == "open") {
-      window.open("localStorage.html");
-      return;
-    }
-
-    if (e.data == "open and test") {
-      let w = window.open("localStorage.html");
-      w.addEventListener("load", _ => {
-        let status;
-        try {
-          localStorage.foo = "value" + Math.random();
-          status = true;
-        } catch (e) {
-          status = false;
-        }
-
-        parent.postMessage({type: "test", status }, "*");
-      }, {once: true});
-    }
-  };
-
-  window.addEventListener("storage", e => {
-    let fromOpener = localStorage.foo.startsWith("opener");
-
-    let status;
-    try {
-      localStorage.foo = "value" + Math.random();
-      status = true;
-    } catch (e) {
-      status = false;
-    }
-
-    parent.postMessage({type: "test", status: status && fromOpener }, "*");
-  });
-}
-
-</script>