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 --- .../tests/client-hints/sandbox/__dir__.headers | 1 + .../sandbox/iframe-csp-same-origin.https.html | 19 ++++++++++++++++ .../iframe-csp-same-origin.https.html.headers | 1 + .../client-hints/sandbox/iframe-csp.https.html | 19 ++++++++++++++++ .../sandbox/iframe-csp.https.html.headers | 1 + .../sandbox/iframe-iframe-popups.https.html | 19 ++++++++++++++++ .../iframe-popups-escape-sandbox.https.html | 19 ++++++++++++++++ .../client-hints/sandbox/iframe-popups.https.html | 19 ++++++++++++++++ .../sandbox/iframe-same-origin.https.html | 17 +++++++++++++++ .../tests/client-hints/sandbox/iframe.https.html | 19 ++++++++++++++++ .../resources/embedded-popup-expect-hints.html | 11 ++++++++++ .../resources/embedded-popup-expect-no-hints.html | 11 ++++++++++ ...iframe-with-embedded-popup-expect-no-hints.html | 12 +++++++++++ .../tests/client-hints/sandbox/resources/util.js | 25 ++++++++++++++++++++++ 14 files changed, 193 insertions(+) create mode 100644 testing/web-platform/tests/client-hints/sandbox/__dir__.headers create mode 100644 testing/web-platform/tests/client-hints/sandbox/iframe-csp-same-origin.https.html create mode 100644 testing/web-platform/tests/client-hints/sandbox/iframe-csp-same-origin.https.html.headers create mode 100644 testing/web-platform/tests/client-hints/sandbox/iframe-csp.https.html create mode 100644 testing/web-platform/tests/client-hints/sandbox/iframe-csp.https.html.headers create mode 100644 testing/web-platform/tests/client-hints/sandbox/iframe-iframe-popups.https.html create mode 100644 testing/web-platform/tests/client-hints/sandbox/iframe-popups-escape-sandbox.https.html create mode 100644 testing/web-platform/tests/client-hints/sandbox/iframe-popups.https.html create mode 100644 testing/web-platform/tests/client-hints/sandbox/iframe-same-origin.https.html create mode 100644 testing/web-platform/tests/client-hints/sandbox/iframe.https.html create mode 100644 testing/web-platform/tests/client-hints/sandbox/resources/embedded-popup-expect-hints.html create mode 100644 testing/web-platform/tests/client-hints/sandbox/resources/embedded-popup-expect-no-hints.html create mode 100644 testing/web-platform/tests/client-hints/sandbox/resources/iframe-with-embedded-popup-expect-no-hints.html create mode 100644 testing/web-platform/tests/client-hints/sandbox/resources/util.js (limited to 'testing/web-platform/tests/client-hints/sandbox') diff --git a/testing/web-platform/tests/client-hints/sandbox/__dir__.headers b/testing/web-platform/tests/client-hints/sandbox/__dir__.headers new file mode 100644 index 0000000000..4d4739028d --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/__dir__.headers @@ -0,0 +1 @@ +Accept-CH: device-memory, dpr, width, viewport-width, rtt, downlink, ect, sec-ch-ua, sec-ch-ua-arch, sec-ch-ua-platform, sec-ch-ua-model, sec-ch-ua-mobile, sec-ch-ua-full-version, sec-ch-ua-platform-version, sec-ch-prefers-color-scheme, sec-ch-prefers-reduced-motion, sec-ch-ua-bitness, sec-ch-viewport-height, sec-ch-device-memory, sec-ch-dpr, sec-ch-width, sec-ch-viewport-width, sec-ch-ua-full-version-list, sec-ch-ua-wow64, sec-ch-prefers-reduced-transparency diff --git a/testing/web-platform/tests/client-hints/sandbox/iframe-csp-same-origin.https.html b/testing/web-platform/tests/client-hints/sandbox/iframe-csp-same-origin.https.html new file mode 100644 index 0000000000..a5f094af9d --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/iframe-csp-same-origin.https.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/client-hints/sandbox/iframe-csp-same-origin.https.html.headers b/testing/web-platform/tests/client-hints/sandbox/iframe-csp-same-origin.https.html.headers new file mode 100644 index 0000000000..895eb51993 --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/iframe-csp-same-origin.https.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: sandbox allow-scripts allow-same-origin \ No newline at end of file diff --git a/testing/web-platform/tests/client-hints/sandbox/iframe-csp.https.html b/testing/web-platform/tests/client-hints/sandbox/iframe-csp.https.html new file mode 100644 index 0000000000..fb63c393fd --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/iframe-csp.https.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/client-hints/sandbox/iframe-csp.https.html.headers b/testing/web-platform/tests/client-hints/sandbox/iframe-csp.https.html.headers new file mode 100644 index 0000000000..c7e4e7cc5b --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/iframe-csp.https.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: sandbox allow-scripts \ No newline at end of file diff --git a/testing/web-platform/tests/client-hints/sandbox/iframe-iframe-popups.https.html b/testing/web-platform/tests/client-hints/sandbox/iframe-iframe-popups.https.html new file mode 100644 index 0000000000..9cbf6006c8 --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/iframe-iframe-popups.https.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/client-hints/sandbox/iframe-popups-escape-sandbox.https.html b/testing/web-platform/tests/client-hints/sandbox/iframe-popups-escape-sandbox.https.html new file mode 100644 index 0000000000..35a94b537d --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/iframe-popups-escape-sandbox.https.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/client-hints/sandbox/iframe-popups.https.html b/testing/web-platform/tests/client-hints/sandbox/iframe-popups.https.html new file mode 100644 index 0000000000..3d7bc6eb80 --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/iframe-popups.https.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/client-hints/sandbox/iframe-same-origin.https.html b/testing/web-platform/tests/client-hints/sandbox/iframe-same-origin.https.html new file mode 100644 index 0000000000..0ea6a8ed53 --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/iframe-same-origin.https.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/client-hints/sandbox/iframe.https.html b/testing/web-platform/tests/client-hints/sandbox/iframe.https.html new file mode 100644 index 0000000000..f37b91011b --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/iframe.https.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/client-hints/sandbox/resources/embedded-popup-expect-hints.html b/testing/web-platform/tests/client-hints/sandbox/resources/embedded-popup-expect-hints.html new file mode 100644 index 0000000000..6cd5f0a29e --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/resources/embedded-popup-expect-hints.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/client-hints/sandbox/resources/embedded-popup-expect-no-hints.html b/testing/web-platform/tests/client-hints/sandbox/resources/embedded-popup-expect-no-hints.html new file mode 100644 index 0000000000..46dbb7f236 --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/resources/embedded-popup-expect-no-hints.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/client-hints/sandbox/resources/iframe-with-embedded-popup-expect-no-hints.html b/testing/web-platform/tests/client-hints/sandbox/resources/iframe-with-embedded-popup-expect-no-hints.html new file mode 100644 index 0000000000..96d2886f0e --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/resources/iframe-with-embedded-popup-expect-no-hints.html @@ -0,0 +1,12 @@ + + + + + + + diff --git a/testing/web-platform/tests/client-hints/sandbox/resources/util.js b/testing/web-platform/tests/client-hints/sandbox/resources/util.js new file mode 100644 index 0000000000..8c25e5ad8b --- /dev/null +++ b/testing/web-platform/tests/client-hints/sandbox/resources/util.js @@ -0,0 +1,25 @@ +function sandbox_iframe_test(sandbox, src, title) { + return promise_test(async t => { + const iframe = document.createElement("iframe"); + if (sandbox !== "") + iframe.sandbox = sandbox; + iframe.src = src; + + let msg = await new Promise(resolve => { + window.addEventListener('message', resolve); + document.body.appendChild(iframe); + }); + + assert_equals(msg.data, "PASS", "message from opened frame"); + await fetch("/client-hints/accept-ch-stickiness/resources/clear-site-data.html"); + }, title); +} + +function sandbox_popup_listener(src) { + window.addEventListener('message', e => { + window.parent.postMessage(e.data, '*'); + }); + + let popup_window = window.open("/resources/blank.html"); + popup_window.location.href = src; +} \ No newline at end of file -- cgit v1.2.3