summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/content-security-policy/inside-worker/serviceworker-report-only.https.sub.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testing/web-platform/tests/content-security-policy/inside-worker/serviceworker-report-only.https.sub.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/web-platform/tests/content-security-policy/inside-worker/serviceworker-report-only.https.sub.html b/testing/web-platform/tests/content-security-policy/inside-worker/serviceworker-report-only.https.sub.html
new file mode 100644
index 0000000000..b2bf3e566f
--- /dev/null
+++ b/testing/web-platform/tests/content-security-policy/inside-worker/serviceworker-report-only.https.sub.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<!-- Test the 'connect-src' directive on service workers in report-only mode
+-->
+<script>
+ promise_test(async t => {
+ let r = await navigator.serviceWorker.register(
+ "./support/connect-src-self-report-only.sub.js?id={{uuid()}}",
+ {scope: "./support/blank.html"});
+ t.add_cleanup(_ => r.unregister());
+ let sw = r.active || r.installing || r.waiting;
+ await fetch_tests_from_worker(sw);
+ });
+</script>