mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 05:39:41 +02:00
Differential Revision: https://phabricator.services.mozilla.com/D24029 --HG-- rename : toolkit/components/antitracking/test/browser/head.js => toolkit/components/antitracking/test/browser/antitracking_head.js extra : moz-landing-system : lando
25 lines
833 B
JavaScript
25 lines
833 B
JavaScript
/* 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
|
|
);
|