diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /testing/web-platform/tests/workers/same-site-cookies/first-party.all.tentative.https.window.js | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/workers/same-site-cookies/first-party.all.tentative.https.window.js')
-rw-r--r-- | testing/web-platform/tests/workers/same-site-cookies/first-party.all.tentative.https.window.js | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/testing/web-platform/tests/workers/same-site-cookies/first-party.all.tentative.https.window.js b/testing/web-platform/tests/workers/same-site-cookies/first-party.all.tentative.https.window.js index d7e5f2ee42..ac6030e654 100644 --- a/testing/web-platform/tests/workers/same-site-cookies/first-party.all.tentative.https.window.js +++ b/testing/web-platform/tests/workers/same-site-cookies/first-party.all.tentative.https.window.js @@ -1,19 +1,29 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js +// META: script=/workers/same-site-cookies/resources/util.js 'use strict'; // Here's the set-up for this test: -// Step 1 (window) Set up listener for "DidStart" message and start worker. -// Step 2 (worker) Send "DidStart" message to window. -// Step 3 (window) Receive "DidStart" message and cleanup. +// Step 1 (window) Set cookies. +// Step 2 (window) Set up listener for cookie message and start worker. +// Step 3 (redirect) Redirect to worker script. +// Step 4 (worker) Send cookie message to window. +// Step 5 (window) Receive cookie message and cleanup. async_test(t => { // Step 1 - const worker = new SharedWorker("/workers/same-site-cookies/resources/worker.js", {sameSiteCookies: "all"}); - worker.port.onmessage = t.step_func(e => { - // Step 3 - assert_equals(e.data, "DidStart", "Worker should have started"); - t.done(); + const cookie_set_window = window.open("/workers/same-site-cookies/resources/set_cookies.py"); + cookie_set_window.onload = t.step_func(_ => { + // Step 2 + const worker = new SharedWorker("/workers/same-site-cookies/resources/worker_redirect.py", {sameSiteCookies: "all"}); + worker.port.onmessage = t.step_func(e => { + // Step 5 + getCookieNames().then(t.step_func((cookies) => { + assert_equals(e.data + cookies, "ReadOnLoad:StrictLaxNone,ReadOnFetch:StrictLaxNone,SetOnRedirectLoad:StrictLaxNone,SetOnLoad:StrictLaxNone,SetOnRedirectFetch:StrictLaxNone,SetOnFetch:StrictLaxNone", "Worker should get/set all cookies"); + cookie_set_window.close(); + t.done(); + })); + }); }); }, "Check SharedWorker sameSiteCookies option all for first-party"); |