From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../sandbox/iframe-inside-csp.sub.html | 18 ++++++ .../sandbox/meta-element.sub.html | 46 +++++++++++++++ .../sandbox-allow-scripts-subframe.sub.html | 22 +++++++ .../sandbox/sandbox-allow-scripts.sub.html | 22 +++++++ .../sandbox/sandbox-empty-subframe.sub.html | 23 ++++++++ .../sandbox/sandbox-empty.sub.html | 25 ++++++++ .../sandbox/service-worker-sandbox.https.html | 67 ++++++++++++++++++++++ .../sandbox/shared-worker-sandbox.html | 18 ++++++ .../sandbox/support/empty.html | 0 .../sandbox/support/post-origin-on-load-worker.js | 1 + .../sandbox/support/sandboxed-data-iframe.sub.html | 1 + .../sandboxed-data-iframe.sub.html.sub.headers | 1 + .../sandbox/support/sandboxed-eval.sub.html | 4 ++ .../support/sandboxed-eval.sub.html.sub.headers | 1 + .../support/sandboxed-post-message-to-parent.html | 3 + .../support/sandboxed-post-property-to-opener.html | 3 + ...dboxed-post-property-to-opener.html.sub.headers | 1 + .../sandbox/support/sandboxed-service-worker.js | 14 +++++ .../support/sandboxed-service-worker.js.headers | 1 + .../sandbox/support/sandboxed-shared-worker.js | 3 + .../support/sandboxed-shared-worker.js.headers | 1 + .../unsandboxed-post-property-to-opener.html | 3 + .../sandbox/window-reuse-sandboxed.html | 22 +++++++ .../sandbox/window-reuse-unsandboxed.html | 22 +++++++ 24 files changed, 322 insertions(+) create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/iframe-inside-csp.sub.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/meta-element.sub.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/sandbox-allow-scripts-subframe.sub.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/sandbox-allow-scripts.sub.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/sandbox-empty-subframe.sub.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/sandbox-empty.sub.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/service-worker-sandbox.https.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/shared-worker-sandbox.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/empty.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/post-origin-on-load-worker.js create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-data-iframe.sub.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-data-iframe.sub.html.sub.headers create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-eval.sub.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-eval.sub.html.sub.headers create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-message-to-parent.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-property-to-opener.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-property-to-opener.html.sub.headers create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-service-worker.js create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-service-worker.js.headers create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-shared-worker.js create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-shared-worker.js.headers create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/support/unsandboxed-post-property-to-opener.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/window-reuse-sandboxed.html create mode 100644 testing/web-platform/tests/content-security-policy/sandbox/window-reuse-unsandboxed.html (limited to 'testing/web-platform/tests/content-security-policy/sandbox') diff --git a/testing/web-platform/tests/content-security-policy/sandbox/iframe-inside-csp.sub.html b/testing/web-platform/tests/content-security-policy/sandbox/iframe-inside-csp.sub.html new file mode 100644 index 0000000000..cd402bdba0 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/iframe-inside-csp.sub.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/content-security-policy/sandbox/meta-element.sub.html b/testing/web-platform/tests/content-security-policy/sandbox/meta-element.sub.html new file mode 100644 index 0000000000..cd8da8f14c --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/meta-element.sub.html @@ -0,0 +1,46 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/content-security-policy/sandbox/sandbox-allow-scripts-subframe.sub.html b/testing/web-platform/tests/content-security-policy/sandbox/sandbox-allow-scripts-subframe.sub.html new file mode 100644 index 0000000000..1d6db3cde7 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/sandbox-allow-scripts-subframe.sub.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/content-security-policy/sandbox/sandbox-allow-scripts.sub.html b/testing/web-platform/tests/content-security-policy/sandbox/sandbox-allow-scripts.sub.html new file mode 100644 index 0000000000..e58402e4ba --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/sandbox-allow-scripts.sub.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/content-security-policy/sandbox/sandbox-empty-subframe.sub.html b/testing/web-platform/tests/content-security-policy/sandbox/sandbox-empty-subframe.sub.html new file mode 100644 index 0000000000..3396e566b8 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/sandbox-empty-subframe.sub.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/content-security-policy/sandbox/sandbox-empty.sub.html b/testing/web-platform/tests/content-security-policy/sandbox/sandbox-empty.sub.html new file mode 100644 index 0000000000..4703471020 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/sandbox-empty.sub.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + +

This test passes if it does alert pass.

+ + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/content-security-policy/sandbox/service-worker-sandbox.https.html b/testing/web-platform/tests/content-security-policy/sandbox/service-worker-sandbox.https.html new file mode 100644 index 0000000000..8b7d72e0ef --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/service-worker-sandbox.https.html @@ -0,0 +1,67 @@ + + + + + + + diff --git a/testing/web-platform/tests/content-security-policy/sandbox/shared-worker-sandbox.html b/testing/web-platform/tests/content-security-policy/sandbox/shared-worker-sandbox.html new file mode 100644 index 0000000000..86b39b9ad4 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/shared-worker-sandbox.html @@ -0,0 +1,18 @@ + + + + + + + diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/empty.html b/testing/web-platform/tests/content-security-policy/sandbox/support/empty.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/post-origin-on-load-worker.js b/testing/web-platform/tests/content-security-policy/sandbox/support/post-origin-on-load-worker.js new file mode 100644 index 0000000000..21ce5748ab --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/post-origin-on-load-worker.js @@ -0,0 +1 @@ +postMessage(self.origin); diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-data-iframe.sub.html b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-data-iframe.sub.html new file mode 100644 index 0000000000..fafd4dc770 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-data-iframe.sub.html @@ -0,0 +1 @@ + diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-data-iframe.sub.html.sub.headers b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-data-iframe.sub.html.sub.headers new file mode 100644 index 0000000000..a7ea308208 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-data-iframe.sub.html.sub.headers @@ -0,0 +1 @@ +Content-Security-Policy: sandbox {{GET[sandbox]}}; \ No newline at end of file diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-eval.sub.html b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-eval.sub.html new file mode 100644 index 0000000000..9480e521de --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-eval.sub.html @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-eval.sub.html.sub.headers b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-eval.sub.html.sub.headers new file mode 100644 index 0000000000..c7e4e7cc5b --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-eval.sub.html.sub.headers @@ -0,0 +1 @@ +Content-Security-Policy: sandbox allow-scripts \ No newline at end of file diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-message-to-parent.html b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-message-to-parent.html new file mode 100644 index 0000000000..ef4b1a0b95 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-message-to-parent.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-property-to-opener.html b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-property-to-opener.html new file mode 100644 index 0000000000..ebbb54d36d --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-property-to-opener.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-property-to-opener.html.sub.headers b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-property-to-opener.html.sub.headers new file mode 100644 index 0000000000..a7ea308208 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-post-property-to-opener.html.sub.headers @@ -0,0 +1 @@ +Content-Security-Policy: sandbox {{GET[sandbox]}}; \ No newline at end of file diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-service-worker.js b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-service-worker.js new file mode 100644 index 0000000000..d4971266f5 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-service-worker.js @@ -0,0 +1,14 @@ +self.addEventListener('fetch', function(event) { + const url = new URL(event.request.url); + if (url.pathname.indexOf('get-origin') != -1) { + event.respondWith(new Promise(function(resolve) { + resolve(new Response(JSON.stringify({ + origin: self.origin + }))); + })); + } + else if (url.pathname.indexOf('fetch') != -1) { + event.respondWith(fetch(url.searchParams.get('url'), + {mode: event.request.mode})); + } + }); diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-service-worker.js.headers b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-service-worker.js.headers new file mode 100644 index 0000000000..1efcf8c226 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-service-worker.js.headers @@ -0,0 +1 @@ +Content-Security-Policy: sandbox allow-scripts diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-shared-worker.js b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-shared-worker.js new file mode 100644 index 0000000000..eb85eb41b4 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-shared-worker.js @@ -0,0 +1,3 @@ +self.onconnect = e => { + e.ports[0].postMessage(self.origin); +}; diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-shared-worker.js.headers b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-shared-worker.js.headers new file mode 100644 index 0000000000..1efcf8c226 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/sandboxed-shared-worker.js.headers @@ -0,0 +1 @@ +Content-Security-Policy: sandbox allow-scripts diff --git a/testing/web-platform/tests/content-security-policy/sandbox/support/unsandboxed-post-property-to-opener.html b/testing/web-platform/tests/content-security-policy/sandbox/support/unsandboxed-post-property-to-opener.html new file mode 100644 index 0000000000..ebbb54d36d --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/support/unsandboxed-post-property-to-opener.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/testing/web-platform/tests/content-security-policy/sandbox/window-reuse-sandboxed.html b/testing/web-platform/tests/content-security-policy/sandbox/window-reuse-sandboxed.html new file mode 100644 index 0000000000..a7a080daf7 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/window-reuse-sandboxed.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/content-security-policy/sandbox/window-reuse-unsandboxed.html b/testing/web-platform/tests/content-security-policy/sandbox/window-reuse-unsandboxed.html new file mode 100644 index 0000000000..dd69c41354 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/sandbox/window-reuse-unsandboxed.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3