summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/serviceworkers/browser_base_force_refresh.html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/workers/test/serviceworkers/browser_base_force_refresh.html')
-rw-r--r--dom/workers/test/serviceworkers/browser_base_force_refresh.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/dom/workers/test/serviceworkers/browser_base_force_refresh.html b/dom/workers/test/serviceworkers/browser_base_force_refresh.html
new file mode 100644
index 000000000..1b0d2defe
--- /dev/null
+++ b/dom/workers/test/serviceworkers/browser_base_force_refresh.html
@@ -0,0 +1,30 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE HTML>
+<html>
+<head>
+</head>
+<body>
+<script type="text/javascript">
+addEventListener('load', function(event) {
+ navigator.serviceWorker.register('force_refresh_browser_worker.js').then(function(swr) {
+ if (!swr) {
+ return;
+ }
+ var custom = new Event('base-register', { bubbles: true });
+ document.dispatchEvent(custom);
+ });
+
+ navigator.serviceWorker.ready.then(function() {
+ var custom = new Event('base-sw-ready', { bubbles: true });
+ document.dispatchEvent(custom);
+ });
+
+ var custom = new Event('base-load', { bubbles: true });
+ document.dispatchEvent(custom);
+});
+</script>
+</body>
+</html>