mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 6 - Tests for SharedWorker and cookie settings changing, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D18954 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
084ddbbf6d
commit
9e327d8957
@ -6,3 +6,4 @@ support-files =
|
||||
[browser_broadcastChannel.js]
|
||||
[browser_originattributes.js]
|
||||
[browser_storage.js]
|
||||
[browser_sharedWorker.js]
|
||||
|
16
netwerk/cookie/test/browser/browser_sharedWorker.js
Normal file
16
netwerk/cookie/test/browser/browser_sharedWorker.js
Normal file
@ -0,0 +1,16 @@
|
||||
CookiePolicyHelper.runTest("SharedWorker", {
|
||||
cookieJarAccessAllowed: async _ => {
|
||||
new content.SharedWorker("a.js", "foo");
|
||||
ok(true, "SharedWorker is allowed");
|
||||
},
|
||||
|
||||
cookieJarAccessDenied: async _ => {
|
||||
try {
|
||||
new content.SharedWorker("a.js", "foo");
|
||||
ok(false, "SharedWorker cannot be used!");
|
||||
} catch (e) {
|
||||
ok(true, "SharedWorker cannot be used!");
|
||||
is(e.name, "SecurityError", "We want a security error message.");
|
||||
}
|
||||
},
|
||||
});
|
Loading…
Reference in New Issue
Block a user