diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/workers/same-site-cookies/third-party.none.tentative.sub.https.window.js | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/workers/same-site-cookies/third-party.none.tentative.sub.https.window.js')
-rw-r--r-- | testing/web-platform/tests/workers/same-site-cookies/third-party.none.tentative.sub.https.window.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/workers/same-site-cookies/third-party.none.tentative.sub.https.window.js b/testing/web-platform/tests/workers/same-site-cookies/third-party.none.tentative.sub.https.window.js new file mode 100644 index 0000000000..b91b9d7ab2 --- /dev/null +++ b/testing/web-platform/tests/workers/same-site-cookies/third-party.none.tentative.sub.https.window.js @@ -0,0 +1,24 @@ +// META: script=/resources/testdriver.js +// META: script=/resources/testdriver-vendor.js + +'use strict'; + +// Here's the set-up for this test: +// Step 1 (top-frame) Set up listener for "DidStart" message and open cross-site iframe. +// Step 2 (sub-frame) Open iframe same-site to top-frame. +// Step 3 (sub-sub-frame) Set up listener for message and start worker. +// Step 4 (worker) Send "DidStart" message to iframe. +// Step 5 (sub-sub-frame) Receive message and pass on to window. +// Step 6 (top-frame) Receive "DidStart" message and cleanup. + +async_test(t => { + // Step 1 + window.addEventListener("message", t.step_func(e => { + // Step 6 + assert_equals(e.data, "DidStart", "Worker should have started"); + t.done(); + })); + let iframe = document.createElement("iframe"); + iframe.src = "https://{{hosts[alt][]}}:{{ports[https][0]}}/workers/same-site-cookies/resources/iframe.sub.html?type=none"; + document.body.appendChild(iframe); +}, "Check SharedWorker sameSiteCookies option none for third-party"); |