From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../support/dedicated-worker-script.js | 1 + .../support/https-subframe-dedicated.html | 33 ++++++++++++++++++++++ .../support/https-subframe-shared.html | 32 +++++++++++++++++++++ .../support/parent-dedicated-worker-script.js | 9 ++++++ .../support/parent-shared-worker-script.js | 13 +++++++++ .../support/shared-worker-insecure-popup.html | 15 ++++++++++ .../support/shared-worker-script.js | 5 ++++ 7 files changed, 108 insertions(+) create mode 100644 testing/web-platform/tests/secure-contexts/support/dedicated-worker-script.js create mode 100644 testing/web-platform/tests/secure-contexts/support/https-subframe-dedicated.html create mode 100644 testing/web-platform/tests/secure-contexts/support/https-subframe-shared.html create mode 100644 testing/web-platform/tests/secure-contexts/support/parent-dedicated-worker-script.js create mode 100644 testing/web-platform/tests/secure-contexts/support/parent-shared-worker-script.js create mode 100644 testing/web-platform/tests/secure-contexts/support/shared-worker-insecure-popup.html create mode 100644 testing/web-platform/tests/secure-contexts/support/shared-worker-script.js (limited to 'testing/web-platform/tests/secure-contexts/support') diff --git a/testing/web-platform/tests/secure-contexts/support/dedicated-worker-script.js b/testing/web-platform/tests/secure-contexts/support/dedicated-worker-script.js new file mode 100644 index 0000000000..69ffdf3442 --- /dev/null +++ b/testing/web-platform/tests/secure-contexts/support/dedicated-worker-script.js @@ -0,0 +1 @@ +postMessage(isSecureContext); diff --git a/testing/web-platform/tests/secure-contexts/support/https-subframe-dedicated.html b/testing/web-platform/tests/secure-contexts/support/https-subframe-dedicated.html new file mode 100644 index 0000000000..bcf27879e8 --- /dev/null +++ b/testing/web-platform/tests/secure-contexts/support/https-subframe-dedicated.html @@ -0,0 +1,33 @@ + + + diff --git a/testing/web-platform/tests/secure-contexts/support/https-subframe-shared.html b/testing/web-platform/tests/secure-contexts/support/https-subframe-shared.html new file mode 100644 index 0000000000..5ae7cde5b0 --- /dev/null +++ b/testing/web-platform/tests/secure-contexts/support/https-subframe-shared.html @@ -0,0 +1,32 @@ + + diff --git a/testing/web-platform/tests/secure-contexts/support/parent-dedicated-worker-script.js b/testing/web-platform/tests/secure-contexts/support/parent-dedicated-worker-script.js new file mode 100644 index 0000000000..2b67432384 --- /dev/null +++ b/testing/web-platform/tests/secure-contexts/support/parent-dedicated-worker-script.js @@ -0,0 +1,9 @@ +// If nested workers aren't supported, punt: +if (typeof Worker != "undefined") { + var w = new Worker("dedicated-worker-script.js"); + w.onmessage = function (e) { + postMessage(e.data); + } +} else { + postMessage("Nested workers not supported."); +} diff --git a/testing/web-platform/tests/secure-contexts/support/parent-shared-worker-script.js b/testing/web-platform/tests/secure-contexts/support/parent-shared-worker-script.js new file mode 100644 index 0000000000..083564a054 --- /dev/null +++ b/testing/web-platform/tests/secure-contexts/support/parent-shared-worker-script.js @@ -0,0 +1,13 @@ +addEventListener("connect", function (e) { + var port = e.ports[0]; + port.start(); + // If nested workers aren't supported, punt: + if (typeof Worker != "undefined") { + var w = new Worker("dedicated-worker-script.js"); + w.onmessage = function (e) { + port.postMessage(e.data); + } + } else { + port.postMessage("Nested workers not supported."); + } +}); diff --git a/testing/web-platform/tests/secure-contexts/support/shared-worker-insecure-popup.html b/testing/web-platform/tests/secure-contexts/support/shared-worker-insecure-popup.html new file mode 100644 index 0000000000..740679dc4f --- /dev/null +++ b/testing/web-platform/tests/secure-contexts/support/shared-worker-insecure-popup.html @@ -0,0 +1,15 @@ + + + + + diff --git a/testing/web-platform/tests/secure-contexts/support/shared-worker-script.js b/testing/web-platform/tests/secure-contexts/support/shared-worker-script.js new file mode 100644 index 0000000000..faed70a5c8 --- /dev/null +++ b/testing/web-platform/tests/secure-contexts/support/shared-worker-script.js @@ -0,0 +1,5 @@ +addEventListener("connect", function (e) { + var port = e.ports[0]; + port.start(); + port.postMessage(isSecureContext); +}); -- cgit v1.2.3