diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /toolkit/components/antitracking/test | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/antitracking/test')
108 files changed, 238 insertions, 220 deletions
diff --git a/toolkit/components/antitracking/test/browser/3rdPartySVG.html b/toolkit/components/antitracking/test/browser/3rdPartySVG.html index df791f355f..9ce6fc8ba1 100644 --- a/toolkit/components/antitracking/test/browser/3rdPartySVG.html +++ b/toolkit/components/antitracking/test/browser/3rdPartySVG.html @@ -11,7 +11,7 @@ <h1>3rd party content with an SVG image background</h1> <script> -onload = function(e) { +onload = function() { parent.postMessage({ type: "finish" }, "*"); }; diff --git a/toolkit/components/antitracking/test/browser/3rdPartyWorker.html b/toolkit/components/antitracking/test/browser/3rdPartyWorker.html index e79a992660..9544bfed2b 100644 --- a/toolkit/components/antitracking/test/browser/3rdPartyWorker.html +++ b/toolkit/components/antitracking/test/browser/3rdPartyWorker.html @@ -20,7 +20,7 @@ function is(a, b, msg) { } function workerCode() { - onmessage = e => { + onmessage = () => { try { indexedDB.open("test", "1"); postMessage(true); diff --git a/toolkit/components/antitracking/test/browser/antitracking_head.js b/toolkit/components/antitracking/test/browser/antitracking_head.js index 52871b60c2..fedad72e9b 100644 --- a/toolkit/components/antitracking/test/browser/antitracking_head.js +++ b/toolkit/components/antitracking/test/browser/antitracking_head.js @@ -356,7 +356,7 @@ this.AntiTracking = { let cnt = 0; return new Promise(resolve => { - Services.obs.addObserver(function observer(subject, topic, data) { + Services.obs.addObserver(function observer(subject, topic) { if (topic != targetTopic) { return; } @@ -1174,8 +1174,7 @@ this.AntiTracking = { let windowClosed = new content.Promise(resolve => { Services.ww.registerNotification(function notification( aSubject, - aTopic, - aData + aTopic ) { if (aTopic == "domwindowclosed") { Services.ww.unregisterNotification(notification); @@ -1279,8 +1278,7 @@ this.AntiTracking = { let windowClosed = new content.Promise(resolve => { Services.ww.registerNotification(function notification( aSubject, - aTopic, - aData + aTopic ) { if (aTopic == "domwindowclosed") { Services.ww.unregisterNotification(notification); @@ -1366,12 +1364,12 @@ this.AntiTracking = { function Listener() {} Listener.prototype = { - onStartRequest(request) {}, + onStartRequest() {}, onDataAvailable(request, stream, off, cnt) { // Consume the data to prevent hitting the assertion. NetUtil.readInputStreamToString(stream, cnt); }, - onStopRequest(request, st) { + onStopRequest(request) { let status = request.QueryInterface(Ci.nsIHttpChannel).responseStatus; if (status == 200) { resolve(); diff --git a/toolkit/components/antitracking/test/browser/blobPartitionPage.html b/toolkit/components/antitracking/test/browser/blobPartitionPage.html index d0dd156bc5..d066bb3603 100644 --- a/toolkit/components/antitracking/test/browser/blobPartitionPage.html +++ b/toolkit/components/antitracking/test/browser/blobPartitionPage.html @@ -17,7 +17,7 @@ .then(text => { parent.postMessage(text, "*"); }) - .catch(error => { + .catch(() => { parent.postMessage("error", "*"); }); }; diff --git a/toolkit/components/antitracking/test/browser/browser-blocking.toml b/toolkit/components/antitracking/test/browser/browser-blocking.toml index 4a0aa8f44d..573b8b4d15 100644 --- a/toolkit/components/antitracking/test/browser/browser-blocking.toml +++ b/toolkit/components/antitracking/test/browser/browser-blocking.toml @@ -1,5 +1,9 @@ [DEFAULT] -skip-if = ["os == 'linux' && (asan || tsan)"] # bug 1662229 - task exception +skip-if = [ + "os == 'linux' && os_version == '18.04' && asan", # bug 1662229 - task exception + "os == 'linux' && os_version == '18.04' && tsan", # bug 1662229 - task exception + "debug", # bug 1884982 - takes 20+ minutes to run on debug +] prefs = [ # Disable the Storage Access API prompts for all of the tests in this directory "dom.storage_access.prompt.testing=true", diff --git a/toolkit/components/antitracking/test/browser/browser_aboutblank.js b/toolkit/components/antitracking/test/browser/browser_aboutblank.js index f80a948771..0fc86cc3d2 100644 --- a/toolkit/components/antitracking/test/browser/browser_aboutblank.js +++ b/toolkit/components/antitracking/test/browser/browser_aboutblank.js @@ -23,7 +23,7 @@ add_task(async function test_aboutblankInIframe() { ); let browser = tab.linkedBrowser; - await SpecialPowers.spawn(browser, [], async function (obj) { + await SpecialPowers.spawn(browser, [], async function () { let ifr = content.document.createElement("iframe"); let loading = new content.Promise(resolve => { ifr.onload = resolve; @@ -32,7 +32,7 @@ add_task(async function test_aboutblankInIframe() { content.document.body.appendChild(ifr); await loading; - await SpecialPowers.spawn(ifr, [], async function (obj) { + await SpecialPowers.spawn(ifr, [], async function () { ok( content.navigator.cookieEnabled, "Cookie should be enabled in about blank" diff --git a/toolkit/components/antitracking/test/browser/browser_addonHostPermissionIgnoredInTP.js b/toolkit/components/antitracking/test/browser/browser_addonHostPermissionIgnoredInTP.js index 44664e239a..08613ca415 100644 --- a/toolkit/components/antitracking/test/browser/browser_addonHostPermissionIgnoredInTP.js +++ b/toolkit/components/antitracking/test/browser/browser_addonHostPermissionIgnoredInTP.js @@ -28,7 +28,7 @@ add_task(async function () { let browser = tab.linkedBrowser; info("Verify the number of script nodes found"); - await ContentTask.spawn(browser, [], async function (obj) { + await ContentTask.spawn(browser, [], async function () { // Need to wait a bit for cross-process postMessage... await ContentTaskUtils.waitForCondition( () => content.document.documentElement.getAttribute("count") !== null, diff --git a/toolkit/components/antitracking/test/browser/browser_allowListNotifications.js b/toolkit/components/antitracking/test/browser/browser_allowListNotifications.js index 999c6f93a0..4bc2e3b1ae 100644 --- a/toolkit/components/antitracking/test/browser/browser_allowListNotifications.js +++ b/toolkit/components/antitracking/test/browser/browser_allowListNotifications.js @@ -134,7 +134,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_allowListNotifications_alwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_allowListNotifications_alwaysPartition.js index 0fd677e27f..62e7aa04e1 100644 --- a/toolkit/components/antitracking/test/browser/browser_allowListNotifications_alwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_allowListNotifications_alwaysPartition.js @@ -135,7 +135,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_allowListSeparationInPrivateAndNormalWindows.js b/toolkit/components/antitracking/test/browser/browser_allowListSeparationInPrivateAndNormalWindows.js index 38eb9fc090..64eb39795a 100644 --- a/toolkit/components/antitracking/test/browser/browser_allowListSeparationInPrivateAndNormalWindows.js +++ b/toolkit/components/antitracking/test/browser/browser_allowListSeparationInPrivateAndNormalWindows.js @@ -39,7 +39,7 @@ AntiTracking.runTest( // Cleanup callback async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_allowPermissionForTracker.js b/toolkit/components/antitracking/test/browser/browser_allowPermissionForTracker.js index e628199ead..bec8da9ba5 100644 --- a/toolkit/components/antitracking/test/browser/browser_allowPermissionForTracker.js +++ b/toolkit/components/antitracking/test/browser/browser_allowPermissionForTracker.js @@ -32,6 +32,8 @@ AntiTracking._createTask({ allowList: false, callback: async _ => { document.cookie = "name=value"; + // Assert isn't available in the webpage. + // eslint-disable-next-line mozilla/no-comparison-or-assignment-inside-ok ok(document.cookie != "", "Nothing is blocked"); // requestStorageAccess should resolve @@ -57,7 +59,7 @@ AntiTracking._createTask({ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_backgroundImageAssertion.js b/toolkit/components/antitracking/test/browser/browser_backgroundImageAssertion.js index 16eec0da9e..27fbdfe971 100644 --- a/toolkit/components/antitracking/test/browser/browser_backgroundImageAssertion.js +++ b/toolkit/components/antitracking/test/browser/browser_backgroundImageAssertion.js @@ -62,7 +62,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingCookies.js b/toolkit/components/antitracking/test/browser/browser_blockingCookies.js index dc22ad77b9..bedbccea83 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingCookies.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingCookies.js @@ -66,7 +66,7 @@ AntiTracking.runTestInNormalAndPrivateMode( // Cleanup callback async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -172,7 +172,7 @@ AntiTracking.runTestInNormalAndPrivateMode( // Cleanup callback async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingDOMCache.js b/toolkit/components/antitracking/test/browser/browser_blockingDOMCache.js index a8353cc8f1..9bc418ac8f 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingDOMCache.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingDOMCache.js @@ -24,7 +24,7 @@ AntiTracking.runTest( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheAlwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheAlwaysPartition.js index 4cb90af8ad..dc50cb387e 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheAlwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheAlwaysPartition.js @@ -42,7 +42,7 @@ AntiTracking.runTest( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheAlwaysPartitionSAA.js b/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheAlwaysPartitionSAA.js index bef53f2936..09321a3e67 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheAlwaysPartitionSAA.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheAlwaysPartitionSAA.js @@ -66,7 +66,7 @@ AntiTracking.runTest( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheSAA.js b/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheSAA.js index 06526972dd..c689110ee3 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheSAA.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingDOMCacheSAA.js @@ -68,7 +68,7 @@ AntiTracking.runTest( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingIndexedDb.js b/toolkit/components/antitracking/test/browser/browser_blockingIndexedDb.js index 7fde2365bb..5879eac590 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingIndexedDb.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingIndexedDb.js @@ -20,7 +20,7 @@ AntiTracking.runTestInNormalAndPrivateMode( // Cleanup callback async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -91,7 +91,7 @@ AntiTracking.runTestInNormalAndPrivateMode( // Cleanup callback async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingIndexedDbInWorkers.js b/toolkit/components/antitracking/test/browser/browser_blockingIndexedDbInWorkers.js index 55db3cc05b..7efb26d5d1 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingIndexedDbInWorkers.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingIndexedDbInWorkers.js @@ -28,7 +28,7 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); @@ -57,14 +57,14 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingIndexedDbInWorkers2.js b/toolkit/components/antitracking/test/browser/browser_blockingIndexedDbInWorkers2.js index 02ce8dc588..10e6b8c248 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingIndexedDbInWorkers2.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingIndexedDbInWorkers2.js @@ -37,7 +37,7 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); @@ -80,7 +80,7 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); @@ -112,7 +112,7 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); @@ -134,14 +134,14 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingLocalStorage.js b/toolkit/components/antitracking/test/browser/browser_blockingLocalStorage.js index 1362fc7519..c52b676642 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingLocalStorage.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingLocalStorage.js @@ -17,7 +17,7 @@ AntiTracking.runTestInNormalAndPrivateMode( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -83,7 +83,7 @@ AntiTracking.runTestInNormalAndPrivateMode( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingMessaging.js b/toolkit/components/antitracking/test/browser/browser_blockingMessaging.js index 34af2b76ce..054616460f 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingMessaging.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingMessaging.js @@ -21,7 +21,7 @@ AntiTracking.runTestInNormalAndPrivateMode( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -58,7 +58,7 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); @@ -87,14 +87,14 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -159,7 +159,7 @@ AntiTracking.runTestInNormalAndPrivateMode( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -206,7 +206,7 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); @@ -250,7 +250,7 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); @@ -282,7 +282,7 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); @@ -304,14 +304,14 @@ AntiTracking.runTestInNormalAndPrivateMode( } }; - worker.onerror = function (e) { + worker.onerror = function () { reject(); }; }); }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingNoOpener.js b/toolkit/components/antitracking/test/browser/browser_blockingNoOpener.js index ba75454e18..05bf0c8a26 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingNoOpener.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingNoOpener.js @@ -30,7 +30,7 @@ AntiTracking.runTestInNormalAndPrivateMode( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkers.js b/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkers.js index c61f85d69f..e730f7df6f 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkers.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkers.js @@ -16,7 +16,7 @@ AntiTracking.runTest( null, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkersStorageAccessAPI.js b/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkersStorageAccessAPI.js index a7676bf939..f9d98b4c95 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkersStorageAccessAPI.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkersStorageAccessAPI.js @@ -117,7 +117,7 @@ AntiTracking.runTest( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingSessionStorage.js b/toolkit/components/antitracking/test/browser/browser_blockingSessionStorage.js index 25a926ed3f..1410b57f93 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingSessionStorage.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingSessionStorage.js @@ -36,7 +36,7 @@ AntiTracking.runTestInNormalAndPrivateMode( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -115,7 +115,7 @@ AntiTracking.runTestInNormalAndPrivateMode( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_blockingSharedWorkers.js b/toolkit/components/antitracking/test/browser/browser_blockingSharedWorkers.js index 0daffc4565..d88146e8ce 100644 --- a/toolkit/components/antitracking/test/browser/browser_blockingSharedWorkers.js +++ b/toolkit/components/antitracking/test/browser/browser_blockingSharedWorkers.js @@ -17,7 +17,7 @@ AntiTracking.runTestInNormalAndPrivateMode( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -83,7 +83,7 @@ AntiTracking.runTestInNormalAndPrivateMode( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_contentBlockingAllowListPrincipal.js b/toolkit/components/antitracking/test/browser/browser_contentBlockingAllowListPrincipal.js index a9e2ac6fce..a94968b228 100644 --- a/toolkit/components/antitracking/test/browser/browser_contentBlockingAllowListPrincipal.js +++ b/toolkit/components/antitracking/test/browser/browser_contentBlockingAllowListPrincipal.js @@ -90,7 +90,7 @@ function createFrame(browser, src, id, sandboxAttr) { ); } -add_task(async setup => { +add_task(async () => { // Disable heuristics. We don't need them and if enabled the resulting // telemetry can race with the telemetry in the next test. // See Bug 1686836, Bug 1686894. @@ -108,7 +108,7 @@ add_task(async setup => { * Test that we get the correct allow list principal which matches the content * principal for an https site. */ -add_task(async test_contentPrincipalHTTPS => { +add_task(async () => { await runTestInNormalAndPrivateMode("https://example.com", browser => { checkAllowListPrincipal(browser, "content"); }); @@ -118,7 +118,7 @@ add_task(async test_contentPrincipalHTTPS => { * Tests that the scheme of the allowlist principal is HTTPS, even though the * site is loaded via HTTP. */ -add_task(async test_contentPrincipalHTTP => { +add_task(async () => { await runTestInNormalAndPrivateMode( "http://example.net", (browser, isPrivateBrowsing) => { @@ -136,7 +136,7 @@ add_task(async test_contentPrincipalHTTP => { * Tests that the allow list principal is a system principal for the preferences * about site. */ -add_task(async test_systemPrincipal => { +add_task(async () => { await runTestInNormalAndPrivateMode("about:preferences", browser => { checkAllowListPrincipal(browser, "system"); }); @@ -146,7 +146,7 @@ add_task(async test_systemPrincipal => { * Tests that we get a valid content principal for top level sandboxed pages, * and not the document principal which is a null principal. */ -add_task(async test_TopLevelSandbox => { +add_task(async () => { await runTestInNormalAndPrivateMode( TEST_SANDBOX_URL, (browser, isPrivateBrowsing) => { @@ -168,7 +168,7 @@ add_task(async test_TopLevelSandbox => { * Tests that we get a valid content principal for a new tab opened via * window.open. */ -add_task(async test_windowOpen => { +add_task(async () => { await runTestInNormalAndPrivateMode("https://example.com", async browser => { checkAllowListPrincipal(browser, "content"); @@ -195,7 +195,7 @@ add_task(async test_windowOpen => { * Tests that we get a valid content principal for a new tab opened via * window.open from a sandboxed iframe. */ -add_task(async test_windowOpenFromSandboxedFrame => { +add_task(async () => { await runTestInNormalAndPrivateMode( "https://example.com", async (browser, isPrivateBrowsing) => { diff --git a/toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js b/toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js index 1e006541c8..8e74c454f0 100644 --- a/toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js +++ b/toolkit/components/antitracking/test/browser/browser_contentBlockingTelemetry.js @@ -336,8 +336,7 @@ add_task(async function testTelemetryForUserInteractionHeuristic() { let windowClosed = new content.Promise(resolve => { Services.ww.registerNotification(function notification( aSubject, - aTopic, - aData + aTopic ) { // We need to check the document URI here as well for the same // reason above. diff --git a/toolkit/components/antitracking/test/browser/browser_cookieBetweenTabs.js b/toolkit/components/antitracking/test/browser/browser_cookieBetweenTabs.js index 635f145d46..f6a9f7521d 100644 --- a/toolkit/components/antitracking/test/browser/browser_cookieBetweenTabs.js +++ b/toolkit/components/antitracking/test/browser/browser_cookieBetweenTabs.js @@ -52,7 +52,7 @@ add_task(async function () { BrowserTestUtils.removeTab(tab2); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_denyPermissionForTracker.js b/toolkit/components/antitracking/test/browser/browser_denyPermissionForTracker.js index cd19fa4466..0c13bdf0fb 100644 --- a/toolkit/components/antitracking/test/browser/browser_denyPermissionForTracker.js +++ b/toolkit/components/antitracking/test/browser/browser_denyPermissionForTracker.js @@ -57,7 +57,7 @@ AntiTracking._createTask({ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_doublyNestedTracker.js b/toolkit/components/antitracking/test/browser/browser_doublyNestedTracker.js index c15e3abd5f..4f38b29a7d 100644 --- a/toolkit/components/antitracking/test/browser/browser_doublyNestedTracker.js +++ b/toolkit/components/antitracking/test/browser/browser_doublyNestedTracker.js @@ -123,7 +123,7 @@ add_task(async function () { info("Cleaning up."); SpecialPowers.clearUserPref("network.cookie.sameSite.laxByDefault"); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_existingCookiesForSubresources.js b/toolkit/components/antitracking/test/browser/browser_existingCookiesForSubresources.js index 35e9dfb169..76b5602f7c 100644 --- a/toolkit/components/antitracking/test/browser/browser_existingCookiesForSubresources.js +++ b/toolkit/components/antitracking/test/browser/browser_existingCookiesForSubresources.js @@ -228,7 +228,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_firstPartyCookieRejectionHonoursAllowList.js b/toolkit/components/antitracking/test/browser/browser_firstPartyCookieRejectionHonoursAllowList.js index d3d06d2950..6aaed74331 100644 --- a/toolkit/components/antitracking/test/browser/browser_firstPartyCookieRejectionHonoursAllowList.js +++ b/toolkit/components/antitracking/test/browser/browser_firstPartyCookieRejectionHonoursAllowList.js @@ -27,7 +27,7 @@ add_task(async function () { // The previous function reloads the browser, so wait for it to load again! await BrowserTestUtils.browserLoaded(browser); - await SpecialPowers.spawn(browser, [], async function (obj) { + await SpecialPowers.spawn(browser, [], async function () { await new content.Promise(async resolve => { let document = content.document; let window = document.defaultView; @@ -70,7 +70,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_hasStorageAccess.js b/toolkit/components/antitracking/test/browser/browser_hasStorageAccess.js index a2733f0a53..3d62306b7d 100644 --- a/toolkit/components/antitracking/test/browser/browser_hasStorageAccess.js +++ b/toolkit/components/antitracking/test/browser/browser_hasStorageAccess.js @@ -209,7 +209,7 @@ var testCases = [ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_hasStorageAccess_alwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_hasStorageAccess_alwaysPartition.js index ea52ff2fad..aca766f673 100644 --- a/toolkit/components/antitracking/test/browser/browser_hasStorageAccess_alwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_hasStorageAccess_alwaysPartition.js @@ -218,7 +218,7 @@ var testCases = [ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_localStorageEvents.js b/toolkit/components/antitracking/test/browser/browser_localStorageEvents.js index b46cc60b91..b7abad2d94 100644 --- a/toolkit/components/antitracking/test/browser/browser_localStorageEvents.js +++ b/toolkit/components/antitracking/test/browser/browser_localStorageEvents.js @@ -92,7 +92,7 @@ add_task(async function testLocalStorageEventPropagation() { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -179,7 +179,7 @@ add_task(async function testBlockedLocalStorageEventPropagation() { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_onModifyRequestNotificationForTrackingResources.js b/toolkit/components/antitracking/test/browser/browser_onModifyRequestNotificationForTrackingResources.js index 0674b87136..a05f1219ba 100644 --- a/toolkit/components/antitracking/test/browser/browser_onModifyRequestNotificationForTrackingResources.js +++ b/toolkit/components/antitracking/test/browser/browser_onModifyRequestNotificationForTrackingResources.js @@ -10,8 +10,8 @@ let gExpectedResourcesSeen = 0; async function onModifyRequest() { - return new Promise((resolve, reject) => { - Services.obs.addObserver(function observer(subject, topic, data) { + return new Promise(resolve => { + Services.obs.addObserver(function observer(subject) { let httpChannel = subject.QueryInterface(Ci.nsIHttpChannel); let spec = httpChannel.URI.spec; info("Observed channel for " + spec); diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedConsoleMessage.js b/toolkit/components/antitracking/test/browser/browser_partitionedConsoleMessage.js index ce74076825..bb8cdce3da 100644 --- a/toolkit/components/antitracking/test/browser/browser_partitionedConsoleMessage.js +++ b/toolkit/components/antitracking/test/browser/browser_partitionedConsoleMessage.js @@ -73,7 +73,7 @@ add_task(async function runTest() { info("Clean up"); BrowserTestUtils.removeTab(tab); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedCookies.js b/toolkit/components/antitracking/test/browser/browser_partitionedCookies.js index d2d1e87dd4..d2e88795b1 100644 --- a/toolkit/components/antitracking/test/browser/browser_partitionedCookies.js +++ b/toolkit/components/antitracking/test/browser/browser_partitionedCookies.js @@ -1,7 +1,9 @@ PartitionedStorageHelper.runTestInNormalAndPrivateMode( "HTTP Cookies", async (win3rdParty, win1stParty, allowed) => { - await win3rdParty.fetch("cookies.sjs?3rd").then(r => r.text()); + await win3rdParty + .fetch("cookies.sjs?3rd;Partitioned;Secure") + .then(r => r.text()); await win3rdParty .fetch("cookies.sjs") .then(r => r.text()) @@ -39,7 +41,7 @@ PartitionedStorageHelper.runTestInNormalAndPrivateMode( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -49,7 +51,7 @@ PartitionedStorageHelper.runTestInNormalAndPrivateMode( PartitionedStorageHelper.runTestInNormalAndPrivateMode( "DOM Cookies", async (win3rdParty, win1stParty, allowed) => { - win3rdParty.document.cookie = "foo=3rd"; + win3rdParty.document.cookie = "foo=3rd;Partitioned;Secure"; is(win3rdParty.document.cookie, "foo=3rd", "3rd party cookie set"); win1stParty.document.cookie = "foo=first"; @@ -72,7 +74,7 @@ PartitionedStorageHelper.runTestInNormalAndPrivateMode( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -90,14 +92,14 @@ PartitionedStorageHelper.runPartitioningTestInNormalAndPrivateMode( // addDataCallback async (win, value) => { - win.document.cookie = value; + win.document.cookie = value + ";Partitioned;Secure"; return true; }, // cleanup async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -121,14 +123,16 @@ PartitionedStorageHelper.runPartitioningTestInNormalAndPrivateMode( // addDataCallback async (win, value) => { - await win.fetch("cookies.sjs?" + value).then(r => r.text()); + await win + .fetch("cookies.sjs?" + value + ";Partitioned;Secure") + .then(r => r.text()); return true; }, // cleanup async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedDOMCache.js b/toolkit/components/antitracking/test/browser/browser_partitionedDOMCache.js index 8f901e2977..920f0a1849 100644 --- a/toolkit/components/antitracking/test/browser/browser_partitionedDOMCache.js +++ b/toolkit/components/antitracking/test/browser/browser_partitionedDOMCache.js @@ -25,7 +25,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -38,7 +38,7 @@ PartitionedStorageHelper.runTest( PartitionedStorageHelper.runTest( "DOMCache", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { await win1stParty.caches.open("wow").then( async cache => { ok(true, "DOM Cache should be available"); @@ -62,7 +62,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -76,9 +76,9 @@ PartitionedStorageHelper.runTest( // Test that DOM cache is also available in PBM. PartitionedStorageHelper.runTest( "DOMCache", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { await win1stParty.caches.open("wow").then( - async cache => { + async () => { ok(true, "DOM Cache should be available in PBM"); }, _ => { @@ -87,7 +87,7 @@ PartitionedStorageHelper.runTest( ); await win3rdParty.caches.open("wow").then( - async cache => { + async () => { ok(true, "DOM Cache should be available in PBM"); }, _ => { @@ -98,7 +98,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedIndexedDB.js b/toolkit/components/antitracking/test/browser/browser_partitionedIndexedDB.js index 70dd0b03db..683f90e835 100644 --- a/toolkit/components/antitracking/test/browser/browser_partitionedIndexedDB.js +++ b/toolkit/components/antitracking/test/browser/browser_partitionedIndexedDB.js @@ -1,6 +1,6 @@ PartitionedStorageHelper.runTest( "IndexedDB", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { await new Promise(resolve => { let a = win1stParty.indexedDB.open("test", 1); ok(!!a, "IDB should not be blocked in 1st party contexts"); @@ -34,7 +34,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -87,7 +87,7 @@ PartitionedStorageHelper.runPartitioningTest( // cleanup async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedLocalStorage.js b/toolkit/components/antitracking/test/browser/browser_partitionedLocalStorage.js index fe45970132..583f4bacdc 100644 --- a/toolkit/components/antitracking/test/browser/browser_partitionedLocalStorage.js +++ b/toolkit/components/antitracking/test/browser/browser_partitionedLocalStorage.js @@ -74,7 +74,7 @@ AntiTracking.runTestInNormalAndPrivateMode( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -107,7 +107,7 @@ PartitionedStorageHelper.runPartitioningTestInNormalAndPrivateMode( // cleanup async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedLocalStorage_events.js b/toolkit/components/antitracking/test/browser/browser_partitionedLocalStorage_events.js index 14ca62d062..afbcc79022 100644 --- a/toolkit/components/antitracking/test/browser/browser_partitionedLocalStorage_events.js +++ b/toolkit/components/antitracking/test/browser/browser_partitionedLocalStorage_events.js @@ -999,7 +999,7 @@ function runAllTests(prefValue) { // Cleanup data. add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedLockManager.js b/toolkit/components/antitracking/test/browser/browser_partitionedLockManager.js index 21c3c9637d..342a68bf31 100644 --- a/toolkit/components/antitracking/test/browser/browser_partitionedLockManager.js +++ b/toolkit/components/antitracking/test/browser/browser_partitionedLockManager.js @@ -2,7 +2,7 @@ PartitionedStorageHelper.runTest( "LockManager works in both first and third party contexts", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { let locks = []; ok(win1stParty.isSecureContext, "1st party is in a secure context"); ok(win3rdParty.isSecureContext, "3rd party is in a secure context"); @@ -20,7 +20,7 @@ PartitionedStorageHelper.runTest( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedMessaging.js b/toolkit/components/antitracking/test/browser/browser_partitionedMessaging.js index 683b1cc874..d08c1f8b7a 100644 --- a/toolkit/components/antitracking/test/browser/browser_partitionedMessaging.js +++ b/toolkit/components/antitracking/test/browser/browser_partitionedMessaging.js @@ -1,6 +1,6 @@ PartitionedStorageHelper.runTestInNormalAndPrivateMode( "BroadcastChannel", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { let a = new win3rdParty.BroadcastChannel("hello"); ok(!!a, "BroadcastChannel should be created by 3rd party iframe"); @@ -12,7 +12,7 @@ PartitionedStorageHelper.runTestInNormalAndPrivateMode( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedServiceWorkers.js b/toolkit/components/antitracking/test/browser/browser_partitionedServiceWorkers.js index 5fca844dfe..bb9baa460f 100644 --- a/toolkit/components/antitracking/test/browser/browser_partitionedServiceWorkers.js +++ b/toolkit/components/antitracking/test/browser/browser_partitionedServiceWorkers.js @@ -25,7 +25,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -42,7 +42,7 @@ PartitionedStorageHelper.runTest( PartitionedStorageHelper.runTest( "ServiceWorkers - enable partitioning", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { // Partitioned serviceWorkers are enabled in third-party context. await win3rdParty.navigator.serviceWorker.register("empty.js").then( _ => { @@ -71,7 +71,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -88,7 +88,7 @@ PartitionedStorageHelper.runTest( PartitionedStorageHelper.runTest( "ServiceWorkers - MatchAll", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { if (!win1stParty.sw) { win1stParty.sw = await registerServiceWorker(win1stParty, "matchAll.js"); } @@ -113,7 +113,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -130,7 +130,7 @@ PartitionedStorageHelper.runTest( PartitionedStorageHelper.runTest( "ServiceWorkers - Partition ScriptContext", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { // Register service worker for the first-party window. if (!win1stParty.sw) { win1stParty.sw = await registerServiceWorker( @@ -197,7 +197,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -214,7 +214,7 @@ PartitionedStorageHelper.runTest( PartitionedStorageHelper.runTest( "ServiceWorkers - Partition DOM Cache", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { // Register service worker for the first-party window. if (!win1stParty.sw) { win1stParty.sw = await registerServiceWorker( @@ -299,7 +299,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -316,7 +316,7 @@ PartitionedStorageHelper.runTest( PartitionedStorageHelper.runTest( "ServiceWorkers - Partition IndexedDB", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { // Register service worker for the first-party window. if (!win1stParty.sw) { win1stParty.sw = await registerServiceWorker( @@ -383,7 +383,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -400,7 +400,7 @@ PartitionedStorageHelper.runTest( PartitionedStorageHelper.runTest( "ServiceWorkers - Partition Intercept", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { // Register service worker for the first-party window. if (!win1stParty.sw) { win1stParty.sw = await registerServiceWorker( @@ -470,7 +470,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -547,7 +547,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -594,7 +594,7 @@ PartitionedStorageHelper.runTest( // Post a message to the dedicated worker and wait until the message circles // back. await new Promise(resolve => { - thirdPartyWorker.port.onmessage = msg => { + thirdPartyWorker.port.onmessage = () => { resolve(); }; thirdPartyWorker.onerror = _ => { @@ -609,7 +609,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -626,7 +626,7 @@ PartitionedStorageHelper.runTest( PartitionedStorageHelper.runTest( "ServiceWorkers - Private Browsing with partitioning disabled", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { // Partitioned serviceWorkers are disabled in third-party context. ok( !win3rdParty.navigator.serviceWorker, @@ -640,7 +640,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -661,7 +661,7 @@ PartitionedStorageHelper.runTest( PartitionedStorageHelper.runTest( "ServiceWorkers - Private Browsing with partitioning enabled", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { // Partitioned serviceWorkers are disabled in third-party context. ok( !win3rdParty.navigator.serviceWorker, @@ -675,7 +675,7 @@ PartitionedStorageHelper.runTest( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedSharedWorkers.js b/toolkit/components/antitracking/test/browser/browser_partitionedSharedWorkers.js index 97c58c5217..10f69a51df 100644 --- a/toolkit/components/antitracking/test/browser/browser_partitionedSharedWorkers.js +++ b/toolkit/components/antitracking/test/browser/browser_partitionedSharedWorkers.js @@ -1,6 +1,6 @@ PartitionedStorageHelper.runTestInNormalAndPrivateMode( "SharedWorkers", - async (win3rdParty, win1stParty, allowed) => { + async (win3rdParty, win1stParty) => { // This test fails if run with an HTTPS 3rd-party URL because the shared worker // which would start from the window opened from 3rdPartyStorage.html will become // secure context and per step 11.4.3 of @@ -40,7 +40,7 @@ PartitionedStorageHelper.runTestInNormalAndPrivateMode( async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_permissionInNormalWindows.js b/toolkit/components/antitracking/test/browser/browser_permissionInNormalWindows.js index 69c5902a91..c8b4ac5dcb 100644 --- a/toolkit/components/antitracking/test/browser/browser_permissionInNormalWindows.js +++ b/toolkit/components/antitracking/test/browser/browser_permissionInNormalWindows.js @@ -1,3 +1,6 @@ +// We're using custom message passing so don't have access to Assert.foo +// everywhere. Disable the linter: +/* eslint-disable mozilla/no-comparison-or-assignment-inside-ok */ AntiTracking.runTest( "Test whether we receive any persistent permissions in normal windows", // Blocking callback @@ -94,7 +97,7 @@ AntiTracking.runTest( // Cleanup callback async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_permissionInNormalWindows_alwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_permissionInNormalWindows_alwaysPartition.js index 99c40bb0de..e2eaa6831a 100644 --- a/toolkit/components/antitracking/test/browser/browser_permissionInNormalWindows_alwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_permissionInNormalWindows_alwaysPartition.js @@ -1,3 +1,7 @@ +// We're using custom message passing so don't have access to Assert.foo +// everywhere. Disable the linter: +/* eslint-disable mozilla/no-comparison-or-assignment-inside-ok */ + AntiTracking.runTest( "Test whether we receive any persistent permissions in normal windows", // Blocking callback @@ -94,7 +98,7 @@ AntiTracking.runTest( // Cleanup callback async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_permissionInPrivateWindows.js b/toolkit/components/antitracking/test/browser/browser_permissionInPrivateWindows.js index 84f8d82420..3786634cc2 100644 --- a/toolkit/components/antitracking/test/browser/browser_permissionInPrivateWindows.js +++ b/toolkit/components/antitracking/test/browser/browser_permissionInPrivateWindows.js @@ -35,7 +35,7 @@ AntiTracking.runTest( // Cleanup callback async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_permissionInPrivateWindows_alwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_permissionInPrivateWindows_alwaysPartition.js index 6ebcfae5a2..352dbae11d 100644 --- a/toolkit/components/antitracking/test/browser/browser_permissionInPrivateWindows_alwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_permissionInPrivateWindows_alwaysPartition.js @@ -35,7 +35,7 @@ AntiTracking.runTest( // Cleanup callback async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_permissionPropagation.js b/toolkit/components/antitracking/test/browser/browser_permissionPropagation.js index 73dc9e7145..fb869087cd 100644 --- a/toolkit/components/antitracking/test/browser/browser_permissionPropagation.js +++ b/toolkit/components/antitracking/test/browser/browser_permissionPropagation.js @@ -229,7 +229,7 @@ add_task(async function testPermissionGrantedOn3rdParty() { let browser4 = gBrowser.getBrowserForTab(tab4); info("Grant storage permission to the first iframe in the first tab"); - await SpecialPowers.spawn(browser1, [page, msg], async function (page, msg) { + await SpecialPowers.spawn(browser1, [page, msg], async function () { await new content.Promise(resolve => { content.addEventListener("message", function msg(event) { if (event.data.type == "finish") { @@ -289,7 +289,7 @@ add_task(async function testPermissionGrantedOn3rdParty() { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -419,7 +419,7 @@ add_task(async function testPermissionGrantedOnFirstParty() { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_referrerDefaultPolicy.js b/toolkit/components/antitracking/test/browser/browser_referrerDefaultPolicy.js index e9030b98e4..7e5bba37bb 100644 --- a/toolkit/components/antitracking/test/browser/browser_referrerDefaultPolicy.js +++ b/toolkit/components/antitracking/test/browser/browser_referrerDefaultPolicy.js @@ -627,7 +627,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_script.js b/toolkit/components/antitracking/test/browser/browser_script.js index ef6c7f67c6..952e26c1d4 100644 --- a/toolkit/components/antitracking/test/browser/browser_script.js +++ b/toolkit/components/antitracking/test/browser/browser_script.js @@ -217,7 +217,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_siteSpecificWorkArounds.js b/toolkit/components/antitracking/test/browser/browser_siteSpecificWorkArounds.js index b35fbea8c7..89eeeb089e 100644 --- a/toolkit/components/antitracking/test/browser/browser_siteSpecificWorkArounds.js +++ b/toolkit/components/antitracking/test/browser/browser_siteSpecificWorkArounds.js @@ -30,7 +30,7 @@ AntiTracking.runTest( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -74,7 +74,7 @@ AntiTracking.runTest( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -108,7 +108,7 @@ AntiTracking.runTest( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -137,7 +137,7 @@ AntiTracking.runTest( }, async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_socialtracking_save_image.js b/toolkit/components/antitracking/test/browser/browser_socialtracking_save_image.js index e7389b1456..1c74adc0a3 100644 --- a/toolkit/components/antitracking/test/browser/browser_socialtracking_save_image.js +++ b/toolkit/components/antitracking/test/browser/browser_socialtracking_save_image.js @@ -13,7 +13,7 @@ const TEST_IMAGE_URL = "http://social-tracking.example.org/browser/toolkit/components/antitracking/test/browser/raptor.jpg"; let MockFilePicker = SpecialPowers.MockFilePicker; -MockFilePicker.init(window); +MockFilePicker.init(window.browsingContext); const tempDir = createTemporarySaveDirectory(); MockFilePicker.displayDirectory = tempDir; diff --git a/toolkit/components/antitracking/test/browser/browser_staticPartition_cache.js b/toolkit/components/antitracking/test/browser/browser_staticPartition_cache.js index 4d3a72d7a7..9afe3180fb 100644 --- a/toolkit/components/antitracking/test/browser/browser_staticPartition_cache.js +++ b/toolkit/components/antitracking/test/browser/browser_staticPartition_cache.js @@ -21,7 +21,7 @@ async function checkCache(suffixes, originAttributes) { const data = await new Promise(resolve => { let cacheEntries = []; let cacheVisitor = { - onCacheStorageInfo(num, consumption) {}, + onCacheStorageInfo() {}, onCacheEntryInfo(uri, idEnhance) { cacheEntries.push({ uri, idEnhance }); }, diff --git a/toolkit/components/antitracking/test/browser/browser_staticPartition_network.js b/toolkit/components/antitracking/test/browser/browser_staticPartition_network.js index a28f7d5adc..53e410bb03 100644 --- a/toolkit/components/antitracking/test/browser/browser_staticPartition_network.js +++ b/toolkit/components/antitracking/test/browser/browser_staticPartition_network.js @@ -109,7 +109,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_staticPartition_saveAs.js b/toolkit/components/antitracking/test/browser/browser_staticPartition_saveAs.js index 22db484e16..daf3234858 100644 --- a/toolkit/components/antitracking/test/browser/browser_staticPartition_saveAs.js +++ b/toolkit/components/antitracking/test/browser/browser_staticPartition_saveAs.js @@ -16,7 +16,7 @@ const TEST_VIDEO_URL = TEST_DOMAIN + TEST_PATH + "file_saveAsVideo.sjs"; const TEST_PAGEINFO_URL = TEST_DOMAIN + TEST_PATH + "file_saveAsPageInfo.html"; let MockFilePicker = SpecialPowers.MockFilePicker; -MockFilePicker.init(window); +MockFilePicker.init(window.browsingContext); const tempDir = createTemporarySaveDirectory(); MockFilePicker.displayDirectory = tempDir; @@ -102,6 +102,7 @@ add_task(async function testContextMenuSaveImage() { set: [ ["privacy.partition.network_state", networkIsolation], ["privacy.dynamic_firstparty.use_site", partitionPerSite], + ["dom.block_download_insecure", false], ], }); @@ -197,6 +198,7 @@ add_task(async function testContextMenuSaveVideo() { set: [ ["privacy.partition.network_state", networkIsolation], ["privacy.dynamic_firstparty.use_site", partitionPerSite], + ["dom.block_download_insecure", false], ], }); @@ -370,7 +372,7 @@ add_task(async function testSavePageInOfflineMode() { // Clean up the cache count on the server side. await fetch(`${TEST_IMAGE_URL}?result`); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_staticPartition_tls_session.js b/toolkit/components/antitracking/test/browser/browser_staticPartition_tls_session.js index e131f71169..b15c9d42e0 100644 --- a/toolkit/components/antitracking/test/browser/browser_staticPartition_tls_session.js +++ b/toolkit/components/antitracking/test/browser/browser_staticPartition_tls_session.js @@ -29,7 +29,7 @@ async function waitForLoad(url) { return new Promise(resolve => { const TOPIC = "http-on-examine-response"; - function observer(subject, topic, data) { + function observer(subject, topic) { if (topic != TOPIC) { return; } diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessDoorHanger.js b/toolkit/components/antitracking/test/browser/browser_storageAccessDoorHanger.js index c922234ed2..715064aa43 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessDoorHanger.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessDoorHanger.js @@ -305,7 +305,7 @@ async function cleanUp() { info("Cleaning up."); SpecialPowers.clearUserPref("network.cookie.sameSite.laxByDefault"); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js b/toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js index 9594fdf270..df3602710a 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js @@ -62,7 +62,7 @@ function runScriptInSubFrame(browser, id, script) { } function waitStoragePermission(trackingOrigin) { - return TestUtils.topicObserved("perm-changed", (aSubject, aData) => { + return TestUtils.topicObserved("perm-changed", aSubject => { let permission = aSubject.QueryInterface(Ci.nsIPermission); let uri = Services.io.newURI(TEST_DOMAIN); return ( diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseRejectHandlerUserInteraction.js b/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseRejectHandlerUserInteraction.js index 835c02e262..f95d760be2 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseRejectHandlerUserInteraction.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseRejectHandlerUserInteraction.js @@ -17,7 +17,7 @@ AntiTracking.runTest( // cleanup function async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseRejectHandlerUserInteraction_alwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseRejectHandlerUserInteraction_alwaysPartition.js index 21bf8b7639..d1006d2328 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseRejectHandlerUserInteraction_alwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseRejectHandlerUserInteraction_alwaysPartition.js @@ -17,7 +17,7 @@ AntiTracking.runTest( // cleanup function async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseResolveHandlerUserInteraction.js b/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseResolveHandlerUserInteraction.js index 6db7c4c241..3f44dd9868 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseResolveHandlerUserInteraction.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessPromiseResolveHandlerUserInteraction.js @@ -26,7 +26,7 @@ AntiTracking.runTest( // cleanup function async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateSubframe.js b/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateSubframe.js index f658dde790..c3f8b68ab1 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateSubframe.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateSubframe.js @@ -19,7 +19,7 @@ AntiTracking.runTest( // cleanup function async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateSubframe_alwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateSubframe_alwaysPartition.js index b4355f2a24..1157865cd4 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateSubframe_alwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateSubframe_alwaysPartition.js @@ -19,7 +19,7 @@ AntiTracking.runTest( // cleanup function async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateTopframe.js b/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateTopframe.js index fe79a8d935..06faf41f26 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateTopframe.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateTopframe.js @@ -19,7 +19,7 @@ AntiTracking.runTest( // cleanup function async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateTopframe_alwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateTopframe_alwaysPartition.js index 63a0480e83..1cde2c8df3 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateTopframe_alwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessRemovalNavigateTopframe_alwaysPartition.js @@ -19,7 +19,7 @@ AntiTracking.runTest( // cleanup function async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed.js b/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed.js index 85c0d60955..b2aa623d96 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed.js @@ -22,7 +22,7 @@ AntiTracking.runTest( Services.io.newURI(TEST_3RD_PARTY_DOMAIN).host, true, Ci.nsIClearDataService.CLEAR_PERMISSIONS, - value => resolve() + () => resolve() ); }); }, @@ -206,7 +206,7 @@ AntiTracking.runTest( // cleanup function async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -239,7 +239,7 @@ AntiTracking.runTest( Services.io.newURI(TEST_3RD_PARTY_DOMAIN).host, true, Ci.nsIClearDataService.CLEAR_PERMISSIONS, - value => resolve() + () => resolve() ); }); }, diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed_alwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed_alwaysPartition.js index 1b7f2cdf37..97c4851128 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed_alwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessSandboxed_alwaysPartition.js @@ -22,7 +22,7 @@ AntiTracking.runTest( Services.io.newURI(TEST_3RD_PARTY_DOMAIN).host, true, Ci.nsIClearDataService.CLEAR_PERMISSIONS, - value => resolve() + () => resolve() ); }); }, @@ -205,7 +205,7 @@ AntiTracking.runTest( // cleanup function async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -238,7 +238,7 @@ AntiTracking.runTest( Services.io.newURI(TEST_3RD_PARTY_DOMAIN).host, true, Ci.nsIClearDataService.CLEAR_PERMISSIONS, - value => resolve() + () => resolve() ); }); }, diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks.js b/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks.js index 8fd60eb2dc..4793ed9325 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks.js @@ -54,7 +54,7 @@ AntiTracking._createTask({ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -85,7 +85,7 @@ AntiTracking._createTask({ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -116,7 +116,7 @@ AntiTracking._createTask({ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks_alwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks_alwaysPartition.js index bf66b515c4..f31c7893d0 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks_alwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessThirdPartyChecks_alwaysPartition.js @@ -59,7 +59,7 @@ AntiTracking._createTask({ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -87,7 +87,7 @@ AntiTracking._createTask({ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -115,7 +115,7 @@ AntiTracking._createTask({ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessWithDynamicFpi.js b/toolkit/components/antitracking/test/browser/browser_storageAccessWithDynamicFpi.js index b5e950cc5f..440d6bb0b0 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessWithDynamicFpi.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessWithDynamicFpi.js @@ -32,7 +32,7 @@ const EXCEPTION_LIST_PREF_NAME = "privacy.restrict3rdpartystorage.skip_list"; async function cleanup() { Services.prefs.clearUserPref(EXCEPTION_LIST_PREF_NAME); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessWithHeuristics.js b/toolkit/components/antitracking/test/browser/browser_storageAccessWithHeuristics.js index 5b68975d03..134fe045e8 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccessWithHeuristics.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessWithHeuristics.js @@ -131,7 +131,7 @@ async function runTestWindowOpenHeuristic(disableHeuristics) { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -216,7 +216,7 @@ add_task(async function testDoublyNestedWindowOpenHeuristic() { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -296,8 +296,7 @@ async function runTestUserInteractionHeuristic(disableHeuristics) { let windowClosed = new content.Promise(resolve => { Services.ww.registerNotification(function notification( aSubject, - aTopic, - aData + aTopic ) { // We need to check the document URI for Fission. It's because the // 'domwindowclosed' would be triggered twice, one for the @@ -418,8 +417,7 @@ async function runTestUserInteractionHeuristic(disableHeuristics) { let windowClosed = new content.Promise(resolve => { Services.ww.registerNotification(function notification( aSubject, - aTopic, - aData + aTopic ) { // We need to check the document URI here as well for the same // reason above. @@ -479,7 +477,7 @@ async function runTestUserInteractionHeuristic(disableHeuristics) { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -564,8 +562,7 @@ add_task(async function testDoublyNestedUserInteractionHeuristic() { let windowClosed = new content.Promise(resolve => { Services.ww.registerNotification(function notification( aSubject, - aTopic, - aData + aTopic ) { if (aTopic == "domwindowclosed") { Services.ww.unregisterNotification(notification); @@ -674,8 +671,7 @@ add_task(async function testDoublyNestedUserInteractionHeuristic() { let windowClosed = new content.Promise(resolve => { Services.ww.registerNotification(function notification( aSubject, - aTopic, - aData + aTopic ) { if (aTopic == "domwindowclosed") { Services.ww.unregisterNotification(notification); @@ -732,7 +728,7 @@ add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); @@ -893,7 +889,7 @@ async function runTestFirstPartyWindowOpenHeuristic(disableHeuristics) { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Arguments.js b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Arguments.js index a88fc8bcb3..3356ef00dd 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Arguments.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Arguments.js @@ -110,7 +110,7 @@ add_task(async function testArgumentInCompleteStorageAccessRequest() { add_task(async () => { Services.perms.removeAll(); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CookieBehavior.js b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CookieBehavior.js index ea44a34f24..17b1673422 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CookieBehavior.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CookieBehavior.js @@ -405,7 +405,7 @@ add_task( add_task(async () => { Services.perms.removeAll(); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CookiePermission.js b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CookiePermission.js index 64ead20020..3debdc4580 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CookiePermission.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CookiePermission.js @@ -167,7 +167,7 @@ add_task( add_task(async () => { Services.perms.removeAll(); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CrossOriginSameSite.js b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CrossOriginSameSite.js index ca3e47d8e7..933b42a106 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CrossOriginSameSite.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_CrossOriginSameSite.js @@ -155,7 +155,7 @@ add_task(async function testIntermediatePreferenceWriteCrossOrigin() { add_task(async () => { Services.perms.removeAll(); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Doorhanger.js b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Doorhanger.js index e8d6ce9bb1..b8eec5f466 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Doorhanger.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Doorhanger.js @@ -6,7 +6,7 @@ Services.scriptloader.loadSubScript( async function cleanUp() { Services.perms.removeAll(); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Embed.js b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Embed.js index 86f584763c..fc93d41666 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Embed.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Embed.js @@ -148,7 +148,7 @@ add_task(async function cSAR_crossSiteIframe() { add_task(async () => { Services.perms.removeAll(); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Enable.js b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Enable.js index 6ee61cc378..e01c52388e 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Enable.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_Enable.js @@ -79,7 +79,7 @@ add_task(async function testExplicitlyEnabled() { add_task(async () => { Services.perms.removeAll(); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_RequireIntermediatePermission.js b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_RequireIntermediatePermission.js index a5cc6f10b5..94a2522f7e 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_RequireIntermediatePermission.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_RequireIntermediatePermission.js @@ -54,7 +54,7 @@ add_task(async function testIntermediatePermissionRequired() { add_task(async () => { Services.perms.removeAll(); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_StorageAccessPermission.js b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_StorageAccessPermission.js index 0b4f3e7273..ae24234d1f 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_StorageAccessPermission.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_StorageAccessPermission.js @@ -87,7 +87,7 @@ add_task( add_task(async () => { Services.perms.removeAll(); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_UserActivation.js b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_UserActivation.js index 49dd73fbf7..2e1f246f2e 100644 --- a/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_UserActivation.js +++ b/toolkit/components/antitracking/test/browser/browser_storageAccess_TopLevel_UserActivation.js @@ -56,7 +56,7 @@ add_task(async function testUserActivations() { add_task(async () => { Services.perms.removeAll(); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_subResources.js b/toolkit/components/antitracking/test/browser/browser_subResources.js index 4841527d19..1b85aabb24 100644 --- a/toolkit/components/antitracking/test/browser/browser_subResources.js +++ b/toolkit/components/antitracking/test/browser/browser_subResources.js @@ -270,7 +270,7 @@ add_task(async function () { info("Cleaning up."); SpecialPowers.clearUserPref("network.cookie.sameSite.laxByDefault"); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_subResourcesPartitioned.js b/toolkit/components/antitracking/test/browser/browser_subResourcesPartitioned.js index b2de150075..ad76be6e54 100644 --- a/toolkit/components/antitracking/test/browser/browser_subResourcesPartitioned.js +++ b/toolkit/components/antitracking/test/browser/browser_subResourcesPartitioned.js @@ -301,7 +301,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_subResourcesPartitioned_alwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_subResourcesPartitioned_alwaysPartition.js index 53a90854b3..9e1a573418 100644 --- a/toolkit/components/antitracking/test/browser/browser_subResourcesPartitioned_alwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_subResourcesPartitioned_alwaysPartition.js @@ -306,7 +306,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_thirdPartyStorageRejectionForCORS.js b/toolkit/components/antitracking/test/browser/browser_thirdPartyStorageRejectionForCORS.js index f609c2d5b0..47f102d054 100644 --- a/toolkit/components/antitracking/test/browser/browser_thirdPartyStorageRejectionForCORS.js +++ b/toolkit/components/antitracking/test/browser/browser_thirdPartyStorageRejectionForCORS.js @@ -48,7 +48,7 @@ AntiTracking._createTask({ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_urlDecorationStripping.js b/toolkit/components/antitracking/test/browser/browser_urlDecorationStripping.js index 642b5d2cbd..f00ddcd4de 100644 --- a/toolkit/components/antitracking/test/browser/browser_urlDecorationStripping.js +++ b/toolkit/components/antitracking/test/browser/browser_urlDecorationStripping.js @@ -246,7 +246,7 @@ AntiTracking._createTask({ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_urlDecorationStripping_alwaysPartition.js b/toolkit/components/antitracking/test/browser/browser_urlDecorationStripping_alwaysPartition.js index 2fbac9811b..d66a84d1ad 100644 --- a/toolkit/components/antitracking/test/browser/browser_urlDecorationStripping_alwaysPartition.js +++ b/toolkit/components/antitracking/test/browser/browser_urlDecorationStripping_alwaysPartition.js @@ -248,7 +248,7 @@ AntiTracking._createTask({ add_task(async _ => { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_urlQueryStringStripping.js b/toolkit/components/antitracking/test/browser/browser_urlQueryStringStripping.js index 6395110f41..567158dadc 100644 --- a/toolkit/components/antitracking/test/browser/browser_urlQueryStringStripping.js +++ b/toolkit/components/antitracking/test/browser/browser_urlQueryStringStripping.js @@ -43,7 +43,7 @@ const TEST_CASES = [ let listService; function observeChannel(uri, expected) { - return TestUtils.topicObserved("http-on-modify-request", (subject, data) => { + return TestUtils.topicObserved("http-on-modify-request", subject => { let channel = subject.QueryInterface(Ci.nsIHttpChannel); let channelURI = channel.URI; diff --git a/toolkit/components/antitracking/test/browser/browser_urlQueryStringStripping_allowList.js b/toolkit/components/antitracking/test/browser/browser_urlQueryStringStripping_allowList.js index 6dee6cede0..839d6980d1 100644 --- a/toolkit/components/antitracking/test/browser/browser_urlQueryStringStripping_allowList.js +++ b/toolkit/components/antitracking/test/browser/browser_urlQueryStringStripping_allowList.js @@ -15,7 +15,7 @@ const TEST_REDIRECT_URI = TEST_DOMAIN + TEST_PATH + "redirect.sjs"; const TEST_QUERY_STRING = "paramToStrip=1"; function observeChannel(uri, expected) { - return TestUtils.topicObserved("http-on-before-connect", (subject, data) => { + return TestUtils.topicObserved("http-on-before-connect", subject => { let channel = subject.QueryInterface(Ci.nsIHttpChannel); let channelURI = channel.URI; diff --git a/toolkit/components/antitracking/test/browser/browser_userInteraction.js b/toolkit/components/antitracking/test/browser/browser_userInteraction.js index d343a56731..c024f4d9f7 100644 --- a/toolkit/components/antitracking/test/browser/browser_userInteraction.js +++ b/toolkit/components/antitracking/test/browser/browser_userInteraction.js @@ -40,7 +40,7 @@ add_task(async function () { "Before user-interaction we don't have a permission" ); - let promise = TestUtils.topicObserved("perm-changed", (aSubject, aData) => { + let promise = TestUtils.topicObserved("perm-changed", aSubject => { let permission = aSubject.QueryInterface(Ci.nsIPermission); return ( permission.type == "storageAccessAPI" && @@ -59,7 +59,7 @@ add_task(async function () { // Let's see if the document is able to update the permission correctly. for (var i = 0; i < 3; ++i) { // Another perm-changed event should be triggered by the timer. - promise = TestUtils.topicObserved("perm-changed", (aSubject, aData) => { + promise = TestUtils.topicObserved("perm-changed", aSubject => { let permission = aSubject.QueryInterface(Ci.nsIPermission); return ( permission.type == "storageAccessAPI" && @@ -84,7 +84,7 @@ add_task(async function () { promise = new Promise(resolve => { let id; - function observer(subject, topic, data) { + function observer() { ok(false, "Notification received!"); Services.obs.removeObserver(observer, "perm-changed"); clearTimeout(id); @@ -117,7 +117,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/browser_workerPropagation.js b/toolkit/components/antitracking/test/browser/browser_workerPropagation.js index 54ec0c1bf6..4f92a0450b 100644 --- a/toolkit/components/antitracking/test/browser/browser_workerPropagation.js +++ b/toolkit/components/antitracking/test/browser/browser_workerPropagation.js @@ -80,7 +80,7 @@ add_task(async function () { add_task(async function () { info("Cleaning up."); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/file_saveAsPageInfo.html b/toolkit/components/antitracking/test/browser/file_saveAsPageInfo.html index aa3de2a555..8f22e911e7 100644 --- a/toolkit/components/antitracking/test/browser/file_saveAsPageInfo.html +++ b/toolkit/components/antitracking/test/browser/file_saveAsPageInfo.html @@ -1,6 +1,6 @@ <html> <body> - <img src="http://example.net/browser/toolkit/components/antitracking/test/browser/raptor.jpg" id="image1"> - <video src="http://example.net/browser/toolkit/components/antitracking/test/browser/file_video.ogv" id="video1"> </video> + <img src="https://example.net/browser/toolkit/components/antitracking/test/browser/raptor.jpg" id="image1"> + <video src="https://example.net/browser/toolkit/components/antitracking/test/browser/file_video.ogv" id="video1"> </video> </body> </html> diff --git a/toolkit/components/antitracking/test/browser/head.js b/toolkit/components/antitracking/test/browser/head.js index d7721b7cac..415da8177f 100644 --- a/toolkit/components/antitracking/test/browser/head.js +++ b/toolkit/components/antitracking/test/browser/head.js @@ -14,6 +14,7 @@ const TEST_DOMAIN_5 = "http://test/"; const TEST_DOMAIN_6 = "http://mochi.test:8888/"; const TEST_DOMAIN_7 = "http://example.com/"; const TEST_DOMAIN_8 = "http://www.example.com/"; +const TEST_DOMAIN_9 = "https://example.org:443/"; const TEST_3RD_PARTY_DOMAIN = "https://tracking.example.org/"; const TEST_3RD_PARTY_DOMAIN_HTTP = "http://tracking.example.org/"; const TEST_3RD_PARTY_DOMAIN_TP = "https://tracking.example.com/"; @@ -40,6 +41,7 @@ const TEST_TOP_PAGE_5 = TEST_DOMAIN_5 + TEST_PATH + "page.html"; const TEST_TOP_PAGE_6 = TEST_DOMAIN_6 + TEST_PATH + "page.html"; const TEST_TOP_PAGE_7 = TEST_DOMAIN_7 + TEST_PATH + "page.html"; const TEST_TOP_PAGE_8 = TEST_DOMAIN_8 + TEST_PATH + "page.html"; +const TEST_TOP_PAGE_9 = TEST_DOMAIN_9 + TEST_PATH + "page.html"; const TEST_EMBEDDER_PAGE = TEST_DOMAIN + TEST_PATH + "embedder.html"; const TEST_POPUP_PAGE = TEST_DOMAIN + TEST_PATH + "popup.html"; const TEST_IFRAME_PAGE = TEST_DOMAIN + TEST_PATH + "iframe.html"; diff --git a/toolkit/components/antitracking/test/browser/imageCacheWorker.js b/toolkit/components/antitracking/test/browser/imageCacheWorker.js index d11221112c..6b2b57d908 100644 --- a/toolkit/components/antitracking/test/browser/imageCacheWorker.js +++ b/toolkit/components/antitracking/test/browser/imageCacheWorker.js @@ -71,7 +71,7 @@ add_task(async _ => { }); await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/localStorage.html b/toolkit/components/antitracking/test/browser/localStorage.html index e08c25f2c4..6ba733a31d 100644 --- a/toolkit/components/antitracking/test/browser/localStorage.html +++ b/toolkit/components/antitracking/test/browser/localStorage.html @@ -50,7 +50,7 @@ if (parent) { } }; - window.addEventListener("storage", e => { + window.addEventListener("storage", () => { let fromOpener = localStorage.foo.startsWith("opener"); let status; diff --git a/toolkit/components/antitracking/test/browser/partitionedstorage_head.js b/toolkit/components/antitracking/test/browser/partitionedstorage_head.js index d37b8177c4..15ba20fd68 100644 --- a/toolkit/components/antitracking/test/browser/partitionedstorage_head.js +++ b/toolkit/components/antitracking/test/browser/partitionedstorage_head.js @@ -141,6 +141,7 @@ this.PartitionedStorageHelper = { await SpecialPowers.pushPrefEnv({ set: [ ["dom.storage_access.enabled", true], + ["network.cookie.cookieBehavior.optInPartitioning", true], [ "privacy.partition.always_partition_third_party_non_cookie_storage", true, @@ -164,14 +165,14 @@ this.PartitionedStorageHelper = { } info("Creating the first tab"); - let tab1 = BrowserTestUtils.addTab(win.gBrowser, TEST_TOP_PAGE); + let tab1 = BrowserTestUtils.addTab(win.gBrowser, TEST_TOP_PAGE_HTTPS); win.gBrowser.selectedTab = tab1; let browser1 = win.gBrowser.getBrowserForTab(tab1); await BrowserTestUtils.browserLoaded(browser1); info("Creating the second tab"); - let tab2 = BrowserTestUtils.addTab(win.gBrowser, TEST_TOP_PAGE_6); + let tab2 = BrowserTestUtils.addTab(win.gBrowser, TEST_TOP_PAGE_9); win.gBrowser.selectedTab = tab2; let browser2 = win.gBrowser.getBrowserForTab(tab2); @@ -180,7 +181,7 @@ this.PartitionedStorageHelper = { info("Creating the third tab"); let tab3 = BrowserTestUtils.addTab( win.gBrowser, - TEST_4TH_PARTY_PARTITIONED_PAGE + TEST_4TH_PARTY_PARTITIONED_PAGE_HTTPS ); win.gBrowser.selectedTab = tab3; @@ -189,7 +190,7 @@ this.PartitionedStorageHelper = { // Use the same URL as first tab to check partitioned data info("Creating the forth tab"); - let tab4 = BrowserTestUtils.addTab(win.gBrowser, TEST_TOP_PAGE); + let tab4 = BrowserTestUtils.addTab(win.gBrowser, TEST_TOP_PAGE_HTTPS); win.gBrowser.selectedTab = tab4; let browser4 = win.gBrowser.getBrowserForTab(tab4); @@ -207,7 +208,8 @@ this.PartitionedStorageHelper = { browser, [ { - page: TEST_4TH_PARTY_PARTITIONED_PAGE + "?variant=" + variant, + page: + TEST_4TH_PARTY_PARTITIONED_PAGE_HTTPS + "?variant=" + variant, getDataCallback: getDataCallback.toString(), result, }, @@ -289,7 +291,8 @@ this.PartitionedStorageHelper = { browser, [ { - page: TEST_4TH_PARTY_PARTITIONED_PAGE + "?variant=" + variant, + page: + TEST_4TH_PARTY_PARTITIONED_PAGE_HTTPS + "?variant=" + variant, addDataCallback: addDataCallback.toString(), value, }, @@ -382,7 +385,7 @@ this.PartitionedStorageHelper = { async function setStorageAccessForThirdParty(browser) { info(`Setting permission for ${browser.currentURI.spec}`); - let type = "3rdPartyStorage^http://not-tracking.example.com"; + let type = "3rdPartyStorage^https://not-tracking.example.com"; let permission = Services.perms.ALLOW_ACTION; let expireType = Services.perms.EXPIRE_SESSION; Services.perms.addFromPrincipal( diff --git a/toolkit/components/antitracking/test/browser/storage_access_head.js b/toolkit/components/antitracking/test/browser/storage_access_head.js index ea4f67b4fe..e43f680042 100644 --- a/toolkit/components/antitracking/test/browser/storage_access_head.js +++ b/toolkit/components/antitracking/test/browser/storage_access_head.js @@ -246,7 +246,7 @@ async function requestStorageAccessAndExpectFailure() { async function cleanUpData() { await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve() ); }); diff --git a/toolkit/components/antitracking/test/browser/tracker.js b/toolkit/components/antitracking/test/browser/tracker.js index 85e943f7c4..eeed80a71b 100644 --- a/toolkit/components/antitracking/test/browser/tracker.js +++ b/toolkit/components/antitracking/test/browser/tracker.js @@ -1,4 +1,4 @@ -window.addEventListener("message", e => { +window.addEventListener("message", () => { let bc = new BroadcastChannel("a"); bc.postMessage("ready!"); }); diff --git a/toolkit/components/antitracking/test/browser/workerIframe.html b/toolkit/components/antitracking/test/browser/workerIframe.html index 37aa5d7c0d..c31d9ff854 100644 --- a/toolkit/components/antitracking/test/browser/workerIframe.html +++ b/toolkit/components/antitracking/test/browser/workerIframe.html @@ -21,7 +21,7 @@ function is(a, b, msg) { async function runTest() { function workerCode() { - onmessage = e => { + onmessage = () => { try { indexedDB.open("test", "1"); postMessage(true); diff --git a/toolkit/components/antitracking/test/xpcshell/test_staticPartition_authhttp.js b/toolkit/components/antitracking/test/xpcshell/test_staticPartition_authhttp.js index 0492f5ff2a..ddc942f8d8 100644 --- a/toolkit/components/antitracking/test/xpcshell/test_staticPartition_authhttp.js +++ b/toolkit/components/antitracking/test/xpcshell/test_staticPartition_authhttp.js @@ -38,7 +38,7 @@ Requestor.prototype = { return true; }, - asyncPromptAuth(chan, cb, ctx, lvl, info) { + asyncPromptAuth() { throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED); }, }; diff --git a/toolkit/components/antitracking/test/xpcshell/test_staticPartition_prefetch.js b/toolkit/components/antitracking/test/xpcshell/test_staticPartition_prefetch.js index f7ec4cc8e3..c9253d33ea 100644 --- a/toolkit/components/antitracking/test/xpcshell/test_staticPartition_prefetch.js +++ b/toolkit/components/antitracking/test/xpcshell/test_staticPartition_prefetch.js @@ -34,7 +34,7 @@ async function checkCache(originAttributes) { const data = await new Promise(resolve => { let cacheEntries = []; let cacheVisitor = { - onCacheStorageInfo(num, consumption) {}, + onCacheStorageInfo() {}, onCacheEntryInfo(uri, idEnhance) { cacheEntries.push({ uri, idEnhance }); }, diff --git a/toolkit/components/antitracking/test/xpcshell/test_staticPartition_preload.js b/toolkit/components/antitracking/test/xpcshell/test_staticPartition_preload.js index 20158f2f7a..0bab966308 100644 --- a/toolkit/components/antitracking/test/xpcshell/test_staticPartition_preload.js +++ b/toolkit/components/antitracking/test/xpcshell/test_staticPartition_preload.js @@ -28,7 +28,7 @@ async function checkCache(originAttributes) { const data = await new Promise(resolve => { let cacheEntries = []; let cacheVisitor = { - onCacheStorageInfo(num, consumption) {}, + onCacheStorageInfo() {}, onCacheEntryInfo(uri, idEnhance) { cacheEntries.push({ uri, idEnhance }); }, diff --git a/toolkit/components/antitracking/test/xpcshell/xpcshell.toml b/toolkit/components/antitracking/test/xpcshell/xpcshell.toml index 86f524ab89..97fbf8fad1 100644 --- a/toolkit/components/antitracking/test/xpcshell/xpcshell.toml +++ b/toolkit/components/antitracking/test/xpcshell/xpcshell.toml @@ -26,10 +26,11 @@ skip-if = ["socketprocess_networking"] # Bug 1759035 ["test_staticPartition_font.js"] support-files = ["data/font.woff"] skip-if = [ - "os == 'linux' && !debug", # Bug 1760086 + "os == 'linux' && os_version == '18.04' && !debug", # Bug 1760086 "apple_silicon", # bug 1729551 - "os == 'mac' && bits == 64 && !debug", # Bug 1652119 - "os == 'win' && bits == 64 && !debug", # Bug 1652119 + "apple_catalina && !debug", # Bug 1652119 + "win10_2009 && bits == 64 && !debug", # Bug 1652119 + "win11_2009 && bits == 64 && !debug", # Bug 1652119 "socketprocess_networking", # Bug 1759035 ] run-sequentially = "very high failure rate in parallel" |