diff options
Diffstat (limited to 'dom/workers/test/serviceworkers/notification/listener.html')
-rw-r--r-- | dom/workers/test/serviceworkers/notification/listener.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/dom/workers/test/serviceworkers/notification/listener.html b/dom/workers/test/serviceworkers/notification/listener.html new file mode 100644 index 000000000..1c6e282ec --- /dev/null +++ b/dom/workers/test/serviceworkers/notification/listener.html @@ -0,0 +1,27 @@ +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<!DOCTYPE HTML> +<html> +<head> + <title>Bug 1114554 - proxy to forward messages from SW to test</title> +<script class="testbody" type="text/javascript"> + var testWindow = parent; + if (opener) { + testWindow = opener; + } + + navigator.serviceWorker.onmessage = function(msg) { + // worker message; + testWindow.postMessage(msg.data, "*"); + if (msg.data.type == 'finish') { + window.close(); + } + }; +</script> + +</head> +<body> +</body> +</html> |