diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /mobile/android/components/extensions/test | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mobile/android/components/extensions/test')
5 files changed, 13 insertions, 13 deletions
diff --git a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_events.html b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_events.html index cd708d942a..19aaf07f92 100644 --- a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_events.html +++ b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_events.html @@ -106,7 +106,7 @@ add_task(async function testTabRemovalEvent() { async function background() { function awaitLoad(tabId) { return new Promise(resolve => { - browser.tabs.onUpdated.addListener(function listener(tabId_, changed, tab) { + browser.tabs.onUpdated.addListener(function listener(tabId_, changed) { if (tabId == tabId_ && changed.status == "complete") { browser.tabs.onUpdated.removeListener(listener); resolve(); @@ -115,7 +115,7 @@ add_task(async function testTabRemovalEvent() { }); } - chrome.tabs.onRemoved.addListener((tabId, info) => { + chrome.tabs.onRemoved.addListener((tabId) => { browser.test.log("Make sure the removed tab is not available in the tabs.query callback."); chrome.tabs.query({}, tabs => { for (const tab of tabs) { diff --git a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript.html b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript.html index 09e42d73cf..ab722f48d7 100644 --- a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript.html +++ b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript.html @@ -40,7 +40,7 @@ add_task(async function testExecuteScript() { browser.tabs.executeScript({ file: "script.js", code: "42", - }).then(result => { + }).then(() => { browser.test.fail("Expected not to be able to execute a script with both file and code"); }, error => { browser.test.assertTrue(/a 'code' or a 'file' property, but not both/.test(error.message), @@ -99,7 +99,7 @@ add_task(async function testExecuteScript() { browser.tabs.executeScript({ code: "window", - }).then(result => { + }).then(() => { browser.test.fail("Expected error when returning non-structured-clonable object"); }, error => { browser.test.assertEq("<anonymous code>", error.fileName, "Got expected fileName"); @@ -109,7 +109,7 @@ add_task(async function testExecuteScript() { browser.tabs.executeScript({ code: "Promise.resolve(window)", - }).then(result => { + }).then(() => { browser.test.fail("Expected error when returning non-structured-clonable object"); }, error => { browser.test.assertEq("<anonymous code>", error.fileName, "Got expected fileName"); @@ -119,7 +119,7 @@ add_task(async function testExecuteScript() { browser.tabs.executeScript({ file: "script3.js", - }).then(result => { + }).then(() => { browser.test.fail("Expected error when returning non-structured-clonable object"); }, error => { const expected = /Script '.*script3.js' result is non-structured-clonable data/; @@ -130,7 +130,7 @@ add_task(async function testExecuteScript() { browser.tabs.executeScript({ frameId: Number.MAX_SAFE_INTEGER, code: "42", - }).then(result => { + }).then(() => { browser.test.fail("Expected error when specifying invalid frame ID"); }, error => { browser.test.assertEq( @@ -143,7 +143,7 @@ add_task(async function testExecuteScript() { browser.tabs.create({url: "http://example.net/", active: false}).then(async tab => { await browser.tabs.executeScript(tab.id, { code: "42", - }).then(result => { + }).then(() => { browser.test.fail("Expected error when trying to execute on invalid domain"); }, error => { browser.test.assertEq(`Missing host permission for the tab`, diff --git a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_onUpdated.html b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_onUpdated.html index 8d96e79cc2..1ec815c8c7 100644 --- a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_onUpdated.html +++ b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_onUpdated.html @@ -44,7 +44,7 @@ add_task(async function test_onUpdated() { } }); - browser.runtime.onMessage.addListener(async msg => { + browser.runtime.onMessage.addListener(async () => { if (collectedSequence.length !== expectedSequence.length) { browser.test.assertEq( JSON.stringify(expectedSequence), diff --git a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_sendMessage.html b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_sendMessage.html index 320ce4dde6..4709fbe31c 100644 --- a/mobile/android/components/extensions/test/mochitest/test_ext_tabs_sendMessage.html +++ b/mobile/android/components/extensions/test/mochitest/test_ext_tabs_sendMessage.html @@ -31,7 +31,7 @@ add_task(async function tabsSendMessageReply() { // eslint-disable-next-line prefer-const let firstTab; const promiseResponse = new Promise(resolve => { - browser.runtime.onMessage.addListener((msg, sender, respond) => { + browser.runtime.onMessage.addListener((msg, sender) => { if (msg == "content-script-ready") { const tabId = sender.tab.id; @@ -170,7 +170,7 @@ add_task(async function tabsSendHidden() { background: async function() { let resolveContent; - browser.runtime.onMessage.addListener((msg, sender) => { + browser.runtime.onMessage.addListener((msg) => { if (msg[0] == "content-ready") { resolveContent(msg[1]); } @@ -220,7 +220,7 @@ add_task(async function tabsSendHidden() { // properties of the possibly-hidden content window. const href = window.location.href; - browser.runtime.onMessage.addListener((msg, sender) => { + browser.runtime.onMessage.addListener((msg) => { browser.test.assertEq(href, msg, "Should be in the expected content window"); return Promise.resolve(href); diff --git a/mobile/android/components/extensions/test/xpcshell/test_ext_native_messaging_geckoview.js b/mobile/android/components/extensions/test/xpcshell/test_ext_native_messaging_geckoview.js index 3ba2e26139..43bc138e7f 100644 --- a/mobile/android/components/extensions/test/xpcshell/test_ext_native_messaging_geckoview.js +++ b/mobile/android/components/extensions/test/xpcshell/test_ext_native_messaging_geckoview.js @@ -34,7 +34,7 @@ class EmbedderPort { onPortDisconnect() { Assert.ok(false, "onPortDisconnect not expected to be called"); } - onPortMessage(holder) { + onPortMessage() { Assert.ok(false, "onPortMessage not expected to be called"); } triggerPortDisconnect() { |