diff --git a/browser/base/content/test/protectionsUI/browser_protectionsUI_cookies_subview.js b/browser/base/content/test/protectionsUI/browser_protectionsUI_cookies_subview.js index 1346fb94c1d3..4866bfff0b48 100644 --- a/browser/base/content/test/protectionsUI/browser_protectionsUI_cookies_subview.js +++ b/browser/base/content/test/protectionsUI/browser_protectionsUI_cookies_subview.js @@ -369,6 +369,10 @@ add_task(async function testCookiesSubViewAllowedHeuristic() { TPC_PREF, Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER ); + Services.prefs.setBoolPref( + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers", + false + ); let principal = Services.scriptSecurityManager.createContentPrincipalFromOrigin( // eslint-disable-next-line @microsoft/sdl/no-insecure-url @@ -474,6 +478,9 @@ add_task(async function testCookiesSubViewAllowedHeuristic() { BrowserTestUtils.removeTab(tab); Services.prefs.clearUserPref(TPC_PREF); + Services.prefs.clearUserPref( + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers" + ); }); add_task(async function testCookiesSubViewBlockedDoublyNested() { diff --git a/toolkit/components/antitracking/test/browser/antitracking_head.js b/toolkit/components/antitracking/test/browser/antitracking_head.js index b71fc79ce0d1..420a50d9e36a 100644 --- a/toolkit/components/antitracking/test/browser/antitracking_head.js +++ b/toolkit/components/antitracking/test/browser/antitracking_head.js @@ -988,6 +988,15 @@ this.AntiTracking = { await TestUtils.topicObserved("browser-delayed-startup-finished"); } + // Enable SA heuristics for trackers because the test depends on it. + extraPrefs = [ + ...(extraPrefs || []), + [ + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers", + false, + ], + ]; + await AntiTracking._setupTest( win, cookieBehavior, @@ -1114,6 +1123,15 @@ this.AntiTracking = { await TestUtils.topicObserved("browser-delayed-startup-finished"); } + // Enable SA heuristics for trackers because the test depends on it. + extraPrefs = [ + ...(extraPrefs || []), + [ + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers", + false, + ], + ]; + await AntiTracking._setupTest( win, cookieBehavior, diff --git a/toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js b/toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js index 3ff7137bdde7..a1e8748d4046 100644 --- a/toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js +++ b/toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js @@ -143,6 +143,11 @@ add_setup(async function () { // telemetry too soon. ["privacy.restrict3rdpartystorage.expiration", 2591999], ["privacy.restrict3rdpartystorage.expiration_redirect", 2591999], + // Enable SA heuristics for trackers because the test depends on it. + [ + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers", + false, + ], ], }); diff --git a/toolkit/components/antitracking/test/browser/browser_localStorageEvents.js b/toolkit/components/antitracking/test/browser/browser_localStorageEvents.js index b7abad2d941e..4418c560a7b5 100644 --- a/toolkit/components/antitracking/test/browser/browser_localStorageEvents.js +++ b/toolkit/components/antitracking/test/browser/browser_localStorageEvents.js @@ -16,6 +16,11 @@ add_task(async function () { ["privacy.trackingprotection.enabled", false], ["privacy.trackingprotection.pbmode.enabled", false], ["privacy.trackingprotection.annotate_channels", true], + // Enable SA heuristics for trackers because the test depends on it. + [ + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers", + false, + ], ], }); diff --git a/toolkit/components/antitracking/test/browser/browser_permissionPropagation.js b/toolkit/components/antitracking/test/browser/browser_permissionPropagation.js index fb869087cdf7..83263533c2d9 100644 --- a/toolkit/components/antitracking/test/browser/browser_permissionPropagation.js +++ b/toolkit/components/antitracking/test/browser/browser_permissionPropagation.js @@ -313,6 +313,11 @@ add_task(async function testPermissionGrantedOnFirstParty() { ["privacy.trackingprotection.enabled", false], ["privacy.trackingprotection.pbmode.enabled", false], ["privacy.trackingprotection.annotate_channels", true], + // Enable SA heuristics for trackers because the test depends on it. + [ + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers", + false, + ], ], }); diff --git a/toolkit/components/antitracking/test/browser/browser_script.js b/toolkit/components/antitracking/test/browser/browser_script.js index 952e26c1d43b..9e76f8ce5433 100644 --- a/toolkit/components/antitracking/test/browser/browser_script.js +++ b/toolkit/components/antitracking/test/browser/browser_script.js @@ -19,6 +19,11 @@ add_task(async function () { "privacy.restrict3rdpartystorage.userInteractionRequiredForHosts", "tracking.example.com,tracking.example.org", ], + // Enable SA heuristics for trackers because the test depends on it. + [ + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers", + false, + ], ], }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed.js b/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed.js index 11e337d7076b..3f265ee78e3a 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed.js @@ -221,7 +221,13 @@ AntiTracking.runTest( ); }); }, - [["dom.storage_access.enabled", true]], // extra prefs + [ + ["dom.storage_access.enabled", true], + [ + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers", + false, + ], + ], // extra prefs false, // no window open test false, // no user-interaction test Ci.nsIWebProgressListener.STATE_COOKIES_BLOCKED_TRACKER, // expected blocking notifications diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks.js b/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks.js index 5863eb0bba7e..33951f64f8f5 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks.js @@ -47,6 +47,13 @@ AntiTracking._createTask({ "https://tracking.example.org", "https://tracking.example.org", ], + extraPrefs: [ + // Enable SA heuristics for trackers because the test depends on it. + [ + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers", + false, + ], + ], }); add_task(async _ => { diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessWithHeuristics.js b/toolkit/components/antitracking/test/browser/browser_storageAccessWithHeuristics.js index 8385bef8d381..3a609ef83580 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessWithHeuristics.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessWithHeuristics.js @@ -38,6 +38,11 @@ add_setup(async function () { "privacy.restrict3rdpartystorage.userInteractionRequiredForHosts", "tracking.example.com,tracking.example.org", ], + // Enable SA heuristics for trackers because the test depends on it. + [ + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers", + false, + ], ], }); diff --git a/toolkit/components/antitracking/test/browser/browser_subResources.js b/toolkit/components/antitracking/test/browser/browser_subResources.js index 1b85aabb243c..4bdb5ca8e48d 100644 --- a/toolkit/components/antitracking/test/browser/browser_subResources.js +++ b/toolkit/components/antitracking/test/browser/browser_subResources.js @@ -22,6 +22,11 @@ add_task(async function () { ], // Bug 1617611: Fix all the tests broken by "cookies SameSite=lax by default" ["network.cookie.sameSite.laxByDefault", false], + // Enable SA heuristics for trackers because the test depends on it. + [ + "privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers", + false, + ], ], });