summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/tests/browser/newtabwebchannel_basic.html
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/newtab/tests/browser/newtabwebchannel_basic.html')
-rw-r--r--browser/components/newtab/tests/browser/newtabwebchannel_basic.html36
1 files changed, 0 insertions, 36 deletions
diff --git a/browser/components/newtab/tests/browser/newtabwebchannel_basic.html b/browser/components/newtab/tests/browser/newtabwebchannel_basic.html
deleted file mode 100644
index 7f3c79920..000000000
--- a/browser/components/newtab/tests/browser/newtabwebchannel_basic.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<html>
- <head>
- <meta charset="utf8">
- <title>Newtab WebChannel test</title>
- </head>
- <body>
- <script>
- document.onreadystatechange = function () {
- let msg = new window.CustomEvent("WebChannelMessageToChrome", {
- detail: JSON.stringify({
- id: "newtab",
- message: JSON.stringify({type: "foo", data: "bar"}),
- })
- });
- window.dispatchEvent(msg);
- };
-
- window.addEventListener("WebChannelMessageToContent", function(e) {
- if (e.detail.message && e.detail.message.type.startsWith("respond")) {
- var detail = {
- id: "newtab",
- message: JSON.stringify({type: "reply", data: "quuz"}),
- };
- if (e.detail.message.type !== "respond_object") {
- detail = JSON.stringify(detail);
- }
- let reply = new window.CustomEvent("WebChannelMessageToChrome", {
- detail: detail
- });
- window.dispatchEvent(reply);
- }
- }, true);
-
- </script>
- </body>
-</html>