mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-08 12:19:05 +02:00
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D36052 --HG-- extra : source : b5be5b4f4b47c256e28a29f665dc754f6407ee7f
35 lines
821 B
JavaScript
35 lines
821 B
JavaScript
/* import-globals-from partitionedstorage_head.js */
|
|
|
|
PartitionedStorageHelper.runTest(
|
|
"DOMCache",
|
|
async (win3rdParty, win1stParty, allowed) => {
|
|
// DOM Cache is not supported. Always blocked.
|
|
await win3rdParty.caches.open("wow").then(
|
|
_ => {
|
|
ok(allowed, "DOM Cache cannot be used!");
|
|
},
|
|
_ => {
|
|
ok(!allowed, "DOM Cache cannot be used!");
|
|
}
|
|
);
|
|
|
|
await win1stParty.caches.open("wow").then(
|
|
_ => {
|
|
ok(true, "DOM Cache should be available");
|
|
},
|
|
_ => {
|
|
ok(false, "DOM Cache should be available");
|
|
}
|
|
);
|
|
},
|
|
|
|
async _ => {
|
|
await new Promise(resolve => {
|
|
Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value =>
|
|
resolve()
|
|
);
|
|
});
|
|
},
|
|
|
|
[["dom.caches.testing.enabled", true]]
|
|
);
|