summaryrefslogtreecommitdiffstats
path: root/dom/broadcastchannel/tests
diff options
context:
space:
mode:
Diffstat (limited to 'dom/broadcastchannel/tests')
-rw-r--r--dom/broadcastchannel/tests/browser_private_browsing.js8
-rw-r--r--dom/broadcastchannel/tests/file_mozbrowser.html20
-rw-r--r--dom/broadcastchannel/tests/file_mozbrowser2.html21
-rw-r--r--dom/broadcastchannel/tests/iframe_mozbrowser.html15
-rw-r--r--dom/broadcastchannel/tests/iframe_mozbrowser2.html15
-rw-r--r--dom/broadcastchannel/tests/mochitest.toml4
-rw-r--r--dom/broadcastchannel/tests/test_bfcache.html2
-rw-r--r--dom/broadcastchannel/tests/test_event_listener_leaks.html2
-rw-r--r--dom/broadcastchannel/tests/test_message_after_close.html2
9 files changed, 7 insertions, 82 deletions
diff --git a/dom/broadcastchannel/tests/browser_private_browsing.js b/dom/broadcastchannel/tests/browser_private_browsing.js
index e61e8ae58e..0cf88c0237 100644
--- a/dom/broadcastchannel/tests/browser_private_browsing.js
+++ b/dom/broadcastchannel/tests/browser_private_browsing.js
@@ -37,7 +37,7 @@ add_task(async function () {
await BrowserTestUtils.browserLoaded(win2.gBrowser.getBrowserForTab(tab2));
var browser2 = gBrowser.getBrowserForTab(tab2);
- var p1 = SpecialPowers.spawn(browser1, [], function (opts) {
+ var p1 = SpecialPowers.spawn(browser1, [], function () {
return new content.window.Promise(resolve => {
content.window.bc = new content.window.BroadcastChannel("foobar");
content.window.bc.onmessage = function (e) {
@@ -46,7 +46,7 @@ add_task(async function () {
});
});
- var p2 = SpecialPowers.spawn(browser2, [], function (opts) {
+ var p2 = SpecialPowers.spawn(browser2, [], function () {
return new content.window.Promise(resolve => {
content.window.bc = new content.window.BroadcastChannel("foobar");
content.window.bc.onmessage = function (e) {
@@ -55,7 +55,7 @@ add_task(async function () {
});
});
- await SpecialPowers.spawn(browser1, [], function (opts) {
+ await SpecialPowers.spawn(browser1, [], function () {
return new content.window.Promise(resolve => {
var bc = new content.window.BroadcastChannel("foobar");
bc.postMessage("hello world from private browsing");
@@ -63,7 +63,7 @@ add_task(async function () {
});
});
- await SpecialPowers.spawn(browser2, [], function (opts) {
+ await SpecialPowers.spawn(browser2, [], function () {
return new content.window.Promise(resolve => {
var bc = new content.window.BroadcastChannel("foobar");
bc.postMessage("hello world from non private browsing");
diff --git a/dom/broadcastchannel/tests/file_mozbrowser.html b/dom/broadcastchannel/tests/file_mozbrowser.html
deleted file mode 100644
index 6370500d98..0000000000
--- a/dom/broadcastchannel/tests/file_mozbrowser.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>MozBrowser iframe</title>
-</head>
-<body>
-<div id="container"></div>
- <script type="application/javascript">
-
- var ifr = document.createElement("iframe");
- ifr.src = "http://mochi.test:8888/tests/dom/broadcastchannel/tests/iframe_mozbrowser.html";
- ifr.onload = function() { alert("DONE"); };
-
- var domParent = document.getElementById("container");
- domParent.appendChild(ifr);
-
- </script>
-</body>
-</html>
diff --git a/dom/broadcastchannel/tests/file_mozbrowser2.html b/dom/broadcastchannel/tests/file_mozbrowser2.html
deleted file mode 100644
index 2e5f394eb8..0000000000
--- a/dom/broadcastchannel/tests/file_mozbrowser2.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>MozBrowser iframe</title>
-</head>
-<body>
-<div id="container"></div>
- <script type="application/javascript">
-
- var ifr = document.createElement("iframe");
- ifr.setAttribute("mozbrowser", true);
- ifr.src = "http://mochi.test:8888/tests/dom/broadcastchannel/tests/iframe_mozbrowser2.html";
- ifr.onload = function() { alert("DONE"); };
-
- var domParent = document.getElementById("container");
- domParent.appendChild(ifr);
-
- </script>
-</body>
-</html>
diff --git a/dom/broadcastchannel/tests/iframe_mozbrowser.html b/dom/broadcastchannel/tests/iframe_mozbrowser.html
deleted file mode 100644
index adbb77a061..0000000000
--- a/dom/broadcastchannel/tests/iframe_mozbrowser.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>MozBrowser iframe</title>
-</head>
-<body>
- <script type="application/javascript">
-
-var bc = new BroadcastChannel("foobar");
-bc.postMessage("This is wrong!");
-
- </script>
-</body>
-</html>
diff --git a/dom/broadcastchannel/tests/iframe_mozbrowser2.html b/dom/broadcastchannel/tests/iframe_mozbrowser2.html
deleted file mode 100644
index adbb77a061..0000000000
--- a/dom/broadcastchannel/tests/iframe_mozbrowser2.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>MozBrowser iframe</title>
-</head>
-<body>
- <script type="application/javascript">
-
-var bc = new BroadcastChannel("foobar");
-bc.postMessage("This is wrong!");
-
- </script>
-</body>
-</html>
diff --git a/dom/broadcastchannel/tests/mochitest.toml b/dom/broadcastchannel/tests/mochitest.toml
index 40264f7a3d..5c061277b6 100644
--- a/dom/broadcastchannel/tests/mochitest.toml
+++ b/dom/broadcastchannel/tests/mochitest.toml
@@ -4,10 +4,6 @@ support-files = [
"broadcastchannel_sharedWorker.js",
"broadcastchannel_worker_alive.js",
"!/dom/events/test/event_leak_utils.js",
- "file_mozbrowser.html",
- "file_mozbrowser2.html",
- "iframe_mozbrowser.html",
- "iframe_mozbrowser2.html",
"testUrl1_bfcache.html",
"testUrl2_bfcache.html",
]
diff --git a/dom/broadcastchannel/tests/test_bfcache.html b/dom/broadcastchannel/tests/test_bfcache.html
index 0197f343e2..1c6155e6f1 100644
--- a/dom/broadcastchannel/tests/test_bfcache.html
+++ b/dom/broadcastchannel/tests/test_bfcache.html
@@ -52,7 +52,7 @@
counter++;
}
- function page2Shown(e) {
+ function page2Shown() {
if (!expectedPersisted) {
SimpleTest.executeSoon(function() {
info("Posting a message.");
diff --git a/dom/broadcastchannel/tests/test_event_listener_leaks.html b/dom/broadcastchannel/tests/test_event_listener_leaks.html
index 33568913fc..a284489526 100644
--- a/dom/broadcastchannel/tests/test_event_listener_leaks.html
+++ b/dom/broadcastchannel/tests/test_event_listener_leaks.html
@@ -28,7 +28,7 @@ async function useBroadcastChannel(contentWindow) {
outer.postMessage("foo");
await new Promise(resolve => {
- bc.onmessage = e => {
+ bc.onmessage = () => {
contentWindow.messageCount += 1;
resolve();
};
diff --git a/dom/broadcastchannel/tests/test_message_after_close.html b/dom/broadcastchannel/tests/test_message_after_close.html
index 1ef8a018ea..a14b590651 100644
--- a/dom/broadcastchannel/tests/test_message_after_close.html
+++ b/dom/broadcastchannel/tests/test_message_after_close.html
@@ -13,7 +13,7 @@ let a = new BroadcastChannel('a');
let b = new BroadcastChannel('a');
let count = 0;
-a.onmessage = function(e) {
+a.onmessage = function() {
++count;
a.close();