summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/same-site-cookies/first-party.none.tentative.https.window.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/workers/same-site-cookies/first-party.none.tentative.https.window.js')
-rw-r--r--testing/web-platform/tests/workers/same-site-cookies/first-party.none.tentative.https.window.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/tests/workers/same-site-cookies/first-party.none.tentative.https.window.js b/testing/web-platform/tests/workers/same-site-cookies/first-party.none.tentative.https.window.js
new file mode 100644
index 0000000000..762d924eb9
--- /dev/null
+++ b/testing/web-platform/tests/workers/same-site-cookies/first-party.none.tentative.https.window.js
@@ -0,0 +1,19 @@
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.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.
+
+async_test(t => {
+ // Step 1
+ const worker = new SharedWorker("/workers/same-site-cookies/resources/worker.js", {sameSiteCookies: "none"});
+ worker.port.onmessage = t.step_func(e => {
+ // Step 3
+ assert_equals(e.data, "DidStart", "Worker should have started");
+ t.done();
+ });
+}, "Check SharedWorker sameSiteCookies option none for first-party");