summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html')
-rw-r--r--testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html
new file mode 100644
index 0000000000..aaf330f4f6
--- /dev/null
+++ b/testing/web-platform/tests/fenced-frame/resources/serviceWorker-navigate-inner.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<script src="utils.js"></script>
+<body>
+<script>
+
+(async function() {
+ await navigator.serviceWorker.register('serviceWorker-navigate.js');
+ const registration = await navigator.serviceWorker.ready;
+ const service_worker = registration.active;
+
+ const [navigate_key] = parseKeylist();
+
+ service_worker.postMessage({key:navigate_key, url:location.href});
+})();
+</script>
+</body>