diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/fetch/metadata/report.https.sub.html | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/fetch/metadata/report.https.sub.html')
-rw-r--r-- | testing/web-platform/tests/fetch/metadata/report.https.sub.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fetch/metadata/report.https.sub.html b/testing/web-platform/tests/fetch/metadata/report.https.sub.html new file mode 100644 index 0000000000..b65f7c0a24 --- /dev/null +++ b/testing/web-platform/tests/fetch/metadata/report.https.sub.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<link rel="author" href="mtrzos@google.com" title="Maciek Trzos"> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/fetch/metadata/resources/helper.js></script> +<script> + setup({ explicit_done: true }); + function generate_test(expected, name) { + async_test(t => { + t.step_timeout(_ => { + return validate_expectations("report-" + name, expected, name + " report") + .then(_ => t.done()); + }, 1000); + }, name + " report"); + } + + let counter = 0; + document.addEventListener("securitypolicyviolation", (e) => { + counter++; + if (counter == 3) { + generate_test({"site":"same-origin", "user":"", "mode": "no-cors", "dest": "report"}, "same-origin"); + generate_test({"site":"same-site", "user":"", "mode": "no-cors", "dest": "report"}, "same-site"); + generate_test({"site":"cross-site", "user":"", "mode": "no-cors", "dest": "report"}, "cross-site"); + + done(); + } + }); +</script> + +<!-- The hostname here is unimportant, so long as it doesn't match 'self'. --> +<link id="style" href="https://{{hosts[alt][élève]}}:{{ports[https][0]}}/css/support/a-green.css" rel="stylesheet"> + +<body></body> |