From ef79ab261f53a1c214ebf056a0984bd2ee168722 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 8 Aug 2019 18:10:32 +0000 Subject: [PATCH] Bug 1572393 - Add back browser_storageAccessPrivateWindow.js to undo the test chunking changes which broke Linux64 ASan BC5 tests; Differential Revision: https://phabricator.services.mozilla.com/D41257 --HG-- extra : moz-landing-system : lando --- .../antitracking/test/browser/browser.ini | 2 ++ .../browser_storageAccessPrivateWindow.js | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 toolkit/components/antitracking/test/browser/browser_storageAccessPrivateWindow.js diff --git a/toolkit/components/antitracking/test/browser/browser.ini b/toolkit/components/antitracking/test/browser/browser.ini index 9109442fff1f..f3314117ed03 100644 --- a/toolkit/components/antitracking/test/browser/browser.ini +++ b/toolkit/components/antitracking/test/browser/browser.ini @@ -89,6 +89,8 @@ support-files = tracker.js [browser_userInteraction.js] [browser_storageAccessDoorHanger.js] skip-if = fission +[browser_storageAccessPrivateWindow.js] +skip-if = fission || serviceworker_e10s [browser_storageAccessPromiseRejectHandlerUserInteraction.js] skip-if = fission [browser_storageAccessPromiseResolveHandlerUserInteraction.js] diff --git a/toolkit/components/antitracking/test/browser/browser_storageAccessPrivateWindow.js b/toolkit/components/antitracking/test/browser/browser_storageAccessPrivateWindow.js new file mode 100644 index 000000000000..4f9c41688aa7 --- /dev/null +++ b/toolkit/components/antitracking/test/browser/browser_storageAccessPrivateWindow.js @@ -0,0 +1,28 @@ +/* import-globals-from antitracking_head.js */ + +AntiTracking.runTest( + "Storage Access API called in a private window", + // blocking callback + async _ => { + /* import-globals-from storageAccessAPIHelpers.js */ + let [threw, rejected] = await callRequestStorageAccess(); + ok(!threw, "requestStorageAccess should not throw"); + ok(!rejected, "requestStorageAccess shouldn't be available"); + }, + + null, // non-blocking callback + // cleanup function + async _ => { + await new Promise(resolve => { + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => + resolve() + ); + }); + }, + [["dom.storage_access.enabled", true]], // extra prefs + false, // no window open test + false, // no user-interaction test + 0, // no blocking notifications + true, // run in private window + null // iframe sandbox +);