From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- dom/messagechannel/tests/mm_messageChannel.js | 2 +- .../tests/mm_messageChannelParent.js | 8 ++--- .../tests/test_event_listener_leaks.html | 2 +- dom/messagechannel/tests/test_messageChannel.xhtml | 2 +- .../tests/test_messageChannel_start.html | 34 +++++++++++----------- dom/messagechannel/tests/test_removedWindow.html | 6 ++-- 6 files changed, 27 insertions(+), 27 deletions(-) (limited to 'dom/messagechannel/tests') diff --git a/dom/messagechannel/tests/mm_messageChannel.js b/dom/messagechannel/tests/mm_messageChannel.js index 7acd5df530..8cc104e748 100644 --- a/dom/messagechannel/tests/mm_messageChannel.js +++ b/dom/messagechannel/tests/mm_messageChannel.js @@ -71,6 +71,6 @@ function emptyTest(msg) { sendAsyncMessage("EmptyTest:FinishPrepare", { message: "OK" }); } -function notTransferableTest(msg) { +function notTransferableTest() { sendAsyncMessage("NotTransferableTest:FinishPrepare", { message: "OK" }); } diff --git a/dom/messagechannel/tests/mm_messageChannelParent.js b/dom/messagechannel/tests/mm_messageChannelParent.js index a5595722a2..f103a1746b 100644 --- a/dom/messagechannel/tests/mm_messageChannelParent.js +++ b/dom/messagechannel/tests/mm_messageChannelParent.js @@ -72,7 +72,7 @@ function close_test(finish) { is(msg.data.message, "OK", ""); ok(port, ""); - port.onmessage = message => { + port.onmessage = () => { ok(false, "Port is alive."); finish(); }; @@ -92,7 +92,7 @@ function close_test(finish) { function empty_transferable(finish) { ok(mm, "empty_transferable"); - let finishPrepare = msg => { + let finishPrepare = () => { ok(true, "Same basic test."); mm.removeMessageListener("EmptyTest:FinishPrepare", finishPrepare); finish(); @@ -106,7 +106,7 @@ function empty_transferable(finish) { function not_transferable(finish) { ok(mm, "not_transferable"); - let finishPrepare = msg => { + let finishPrepare = () => { ok(true, "Same basic test."); finish(); }; @@ -118,7 +118,7 @@ function not_transferable(finish) { /* * Test preparation */ -function finishLoad(msg) { +function finishLoad() { run_tests(); } diff --git a/dom/messagechannel/tests/test_event_listener_leaks.html b/dom/messagechannel/tests/test_event_listener_leaks.html index 93ed5215d3..579491dab3 100644 --- a/dom/messagechannel/tests/test_event_listener_leaks.html +++ b/dom/messagechannel/tests/test_event_listener_leaks.html @@ -23,7 +23,7 @@ async function useMessagePort(contentWindow) { mc.port1.postMessage("foo"); await new Promise(resolve => { - mc.port2.onmessage = e => { + mc.port2.onmessage = () => { contentWindow.messageCount += 1; resolve(); }; diff --git a/dom/messagechannel/tests/test_messageChannel.xhtml b/dom/messagechannel/tests/test_messageChannel.xhtml index e51359d67d..cac2a4f066 100644 --- a/dom/messagechannel/tests/test_messageChannel.xhtml +++ b/dom/messagechannel/tests/test_messageChannel.xhtml @@ -17,7 +17,7 @@ var channel = new MessageChannel(); ok(channel, "MessageChannel is created"); - channel.port1.onmessage = function(evt) { + channel.port1.onmessage = function() { ok(true, "message received!"); SimpleTest.finish(); } diff --git a/dom/messagechannel/tests/test_messageChannel_start.html b/dom/messagechannel/tests/test_messageChannel_start.html index 4bc49cc0d6..f9e86da385 100644 --- a/dom/messagechannel/tests/test_messageChannel_start.html +++ b/dom/messagechannel/tests/test_messageChannel_start.html @@ -36,12 +36,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=677638 var events = 2; - a.port1.onmessage = function(evt) { + a.port1.onmessage = function() { ok(true, "This method should be called"); if (!--events) runTests(); } - a.port2.onmessage = function(evt) { + a.port2.onmessage = function() { ok(true, "This method should be called"); if (!--events) runTests(); } @@ -55,11 +55,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=677638 a.port2.postMessage(43); ok(true, "MessagePort{1,2}.postmessage() invoked"); - a.port1.addEventListener('message', function(evt) { + a.port1.addEventListener('message', function() { ok(false, "This method should not be called"); }); - a.port2.addEventListener('message', function(evt) { + a.port2.addEventListener('message', function() { ok(false, "This method should not be called"); }); @@ -76,12 +76,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=677638 var events = 2; - a.port1.addEventListener('message', function(evt) { + a.port1.addEventListener('message', function() { ok(true, "This method should be called"); if (!--events) runTests(); }); - a.port2.addEventListener('message', function(evt) { + a.port2.addEventListener('message', function() { ok(true, "This method should be called"); if (!--events) runTests(); }); @@ -100,12 +100,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=677638 var events = 1; - a.port1.addEventListener('message', function(evt) { + a.port1.addEventListener('message', function() { ok(true, "This method should be called"); if (!--events) runTests(); }); - a.port2.addEventListener('message', function(evt) { + a.port2.addEventListener('message', function() { ok(false, "This method should not be called"); }); @@ -122,11 +122,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=677638 var events = 1; - a.port1.addEventListener('message', function(evt) { + a.port1.addEventListener('message', function() { ok(false, "This method should not be called"); }); - a.port2.addEventListener('message', function(evt) { + a.port2.addEventListener('message', function() { ok(true, "This method should be called"); if (!--events) runTests(); }); @@ -144,12 +144,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=677638 setTimeout(function() { var events = 2; - a.port1.onmessage = function(evt) { + a.port1.onmessage = function() { ok(true, "This method should be called"); if (!--events) runTests(); } - a.port2.onmessage = function(evt) { + a.port2.onmessage = function() { ok(true, "This method should be called"); if (!--events) runTests(); } @@ -167,13 +167,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=677638 var events = 2; a.port1.start(); - a.port1.addEventListener('message', function(evt) { + a.port1.addEventListener('message', function() { ok(true, "This method should be called"); if (!--events) runTests(); }); a.port2.start(); - a.port2.addEventListener('message', function(evt) { + a.port2.addEventListener('message', function() { ok(true, "This method should be called"); if (!--events) runTests(); }); @@ -191,17 +191,17 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=677638 addEventListener('message', testOnMessageCloneCb, false); function testOnMessageCloneCb(event) { - a.port1.onmessage = function(evt) { + a.port1.onmessage = function() { ok(true, "This method should be called"); testOnMessageCloneFinish(); } - event.data.onmessage = function(evt) { + event.data.onmessage = function() { ok(true, "This method should be called"); testOnMessageCloneFinish(); } - a.port2.onmessage = function(evt) { + a.port2.onmessage = function() { ok(false, "This method should not be called"); } } diff --git a/dom/messagechannel/tests/test_removedWindow.html b/dom/messagechannel/tests/test_removedWindow.html index b660000fd8..0413a7afeb 100644 --- a/dom/messagechannel/tests/test_removedWindow.html +++ b/dom/messagechannel/tests/test_removedWindow.html @@ -30,13 +30,13 @@ async function runTest() { // This should silently fail. pre.port1.postMessage(42); - pre.port2.onmessage = e => { + pre.port2.onmessage = () => { ok(false, "No messages should be received!"); } // This should silently fail. post.port1.postMessage(42); - post.port2.onmessage = e => { + post.port2.onmessage = () => { ok(false, "No messages should be received!"); } @@ -45,7 +45,7 @@ async function runTest() { let mc = new MessageChannel(); mc.port1.postMessage(42); - mc.port2.onmessage = e => { + mc.port2.onmessage = () => { ok(true, "Ready to complete the test"); SimpleTest.finish(); } -- cgit v1.2.3