From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../browser_ext_background_serviceworker.js | 2 +- .../test/browser/browser_ext_downloads_filters.js | 2 +- .../test/browser/browser_ext_downloads_referrer.js | 6 +- .../browser_ext_extension_page_tab_navigated.js | 2 +- .../test/browser/browser_ext_management_themes.js | 2 +- .../test/browser/browser_ext_themes_arrowpanels.js | 4 +- .../test/browser/browser_ext_themes_incognito.js | 2 +- .../browser_ext_themes_ntp_colors_perwindow.js | 3 +- .../test/mochitest/chrome_cleanup_script.js | 2 +- .../extensions/test/mochitest/file_indexedDB.html | 2 +- .../test/mochitest/file_simple_iframe_worker.html | 4 +- .../mochitest/file_simple_webrequest_worker.html | 4 +- .../extensions/test/mochitest/head_cookies.js | 2 +- .../extensions/test/mochitest/head_webrequest.js | 8 +- .../test/mochitest/mochitest-common.toml | 1 + .../test_chrome_ext_downloads_saveAs.html | 2 +- .../test_chrome_ext_downloads_uniquify.html | 2 +- .../mochitest/test_chrome_ext_permissions.html | 2 +- ...st_chrome_ext_webrequest_background_events.html | 4 +- .../test_chrome_ext_webrequest_mozextension.html | 2 +- .../test/mochitest/test_ext_activityLog.html | 4 +- .../test/mochitest/test_ext_async_clipboard.html | 8 +- .../mochitest/test_ext_browsingData_indexedDB.html | 2 +- .../test_ext_browsingData_localStorage.html | 2 +- .../test_ext_browsingData_serviceWorkers.html | 2 +- .../mochitest/test_ext_browsingData_settings.html | 8 +- .../mochitest/test_ext_exclude_include_globs.html | 4 +- .../test_ext_extension_iframe_messaging.html | 2 +- .../test/mochitest/test_ext_redirect_jar.html | 2 +- .../test_ext_request_urlClassification.html | 2 +- .../test_ext_sendmessage_doublereply.html | 2 +- .../mochitest/test_ext_sendmessage_reply2.html | 4 +- .../test/mochitest/test_ext_storage_cleanup.html | 2 +- .../mochitest/test_ext_streamfilter_multiple.html | 2 +- .../test_ext_streamfilter_processswitch.html | 2 +- .../mochitest/test_ext_subframes_privileges.html | 2 +- .../test_ext_tabs_executeScript_good.html | 2 +- .../test/mochitest/test_ext_tabs_permissions.html | 7 +- .../test_ext_web_accessible_incognito.html | 2 +- .../test_ext_web_accessible_resources.html | 2 +- .../test/mochitest/test_ext_webrequest_auth.html | 10 +- .../test_ext_webrequest_background_events.html | 2 +- .../test/mochitest/test_ext_webrequest_basic.html | 2 +- .../test/mochitest/test_ext_webrequest_errors.html | 2 +- .../test/mochitest/test_ext_webrequest_hsts.html | 10 +- .../test_ext_webrequest_redirect_bypass_cors.html | 2 +- .../test/mochitest/webrequest_chromeworker.js | 2 +- .../test/xpcshell/data/file_page_xhr.html | 2 +- .../test/xpcshell/data/file_permission_xhr.html | 2 +- .../components/extensions/test/xpcshell/head.js | 22 +++- .../extensions/test/xpcshell/head_schemas.js | 4 +- .../test/xpcshell/head_service_worker.js | 2 +- .../extensions/test/xpcshell/test_csp_validator.js | 6 +- .../test/xpcshell/test_ext_alarms_does_not_fire.js | 2 +- ...est_ext_api_events_listener_calls_exceptions.js | 1 + .../test/xpcshell/test_ext_captivePortal.js | 5 - .../xpcshell/test_ext_contentScripts_register.js | 2 +- .../test/xpcshell/test_ext_contentscript.js | 2 +- .../xpcshell/test_ext_contentscript_context.js | 2 +- .../test_ext_contentscript_create_iframe.js | 2 +- .../xpcshell/test_ext_contentscript_importmap.js | 2 +- .../test_ext_contentscript_module_import.js | 2 +- .../test_ext_contentscript_triggeringPrincipal.js | 2 +- .../extensions/test/xpcshell/test_ext_contexts.js | 4 +- .../test/xpcshell/test_ext_contexts_gc.js | 4 +- .../test/xpcshell/test_ext_dnr_allowAllRequests.js | 2 +- .../test/xpcshell/test_ext_dnr_download.js | 2 +- .../test/xpcshell/test_ext_dnr_modifyHeaders.js | 2 +- .../test/xpcshell/test_ext_dnr_webrequest.js | 4 +- .../extensions/test/xpcshell/test_ext_dns.js | 2 +- .../test/xpcshell/test_ext_downloads_download.js | 2 +- .../xpcshell/test_ext_downloads_partitionKey.js | 2 +- .../test/xpcshell/test_ext_downloads_search.js | 2 +- .../test/xpcshell/test_ext_downloads_urlencoded.js | 2 +- .../test/xpcshell/test_ext_eventpage_messaging.js | 4 +- .../test/xpcshell/test_ext_experiments.js | 8 +- .../extensions/test/xpcshell/test_ext_i18n.js | 8 +- .../test/xpcshell/test_ext_indexedDB_principal.js | 12 +-- .../test/xpcshell/test_ext_management.js | 2 +- .../xpcshell/test_ext_management_uninstall_self.js | 6 +- .../test/xpcshell/test_ext_messaging_startup.js | 4 +- .../test/xpcshell/test_ext_native_messaging.js | 6 +- .../xpcshell/test_ext_notifications_incognito.js | 2 +- .../test/xpcshell/test_ext_permissions.js | 26 +++++ .../test/xpcshell/test_ext_persistent_events.js | 4 +- .../test/xpcshell/test_ext_privacy_disable.js | 2 +- .../test_ext_proxy_authorization_via_proxyinfo.js | 2 +- .../test/xpcshell/test_ext_proxy_onauthrequired.js | 8 +- .../test/xpcshell/test_ext_proxy_settings.js | 4 +- .../test/xpcshell/test_ext_proxy_socks.js | 4 +- .../test/xpcshell/test_ext_proxy_startup.js | 4 +- .../extensions/test/xpcshell/test_ext_redirects.js | 10 +- .../test_ext_runtime_onInstalled_and_onStartup.js | 2 +- .../test/xpcshell/test_ext_runtime_ports.js | 2 +- .../test/xpcshell/test_ext_runtime_ports_gc.js | 2 +- .../test/xpcshell/test_ext_runtime_sendMessage.js | 4 +- .../test/xpcshell/test_ext_same_site_redirects.js | 2 +- .../extensions/test/xpcshell/test_ext_schemas.js | 6 +- .../test/xpcshell/test_ext_schemas_interactive.js | 4 +- .../test_ext_schemas_manifest_permissions.js | 2 +- .../test/xpcshell/test_ext_schemas_privileged.js | 2 +- .../test/xpcshell/test_ext_schemas_roots.js | 2 +- .../test_ext_scripting_persistAcrossSessions.js | 12 +++ .../test_ext_storage_idb_data_migration.js | 3 +- .../test/xpcshell/test_ext_storage_sanitizer.js | 2 +- .../test/xpcshell/test_ext_storage_sync_kinto.js | 117 ++++++++++----------- .../test/xpcshell/test_ext_storage_tab.js | 2 +- .../test/xpcshell/test_ext_userScripts_exports.js | 4 +- .../test/xpcshell/test_ext_webRequest_auth.js | 2 +- .../test_ext_webRequest_cancelWithReason.js | 4 +- .../test/xpcshell/test_ext_webRequest_download.js | 2 +- .../test_ext_webRequest_filterResponseData.js | 2 +- .../xpcshell/test_ext_webRequest_permission.js | 4 +- .../test_ext_webRequest_redirectProperty.js | 4 +- .../xpcshell/test_ext_webRequest_responseBody.js | 40 +++---- .../test/xpcshell/test_ext_webRequest_startup.js | 22 ++-- .../test/xpcshell/test_ext_webRequest_suspend.js | 4 +- .../xpcshell/test_ext_webRequest_viewsource.js | 2 +- .../test/xpcshell/test_ext_webRequest_webSocket.js | 10 +- .../xpcshell/test_ext_web_accessible_resources.js | 8 +- .../test/xpcshell/test_native_manifests.js | 2 +- .../test/xpcshell/test_proxy_failover.js | 6 +- .../test/xpcshell/test_proxy_info_results.js | 29 ++++- .../test/xpcshell/test_proxy_listener.js | 6 +- .../test/xpcshell/test_webRequest_filtering.js | 2 +- .../xpcshell/webidl-api/test_ext_webidl_api.js | 18 ++-- .../test_ext_webidl_api_event_callback.js | 20 ++-- .../test_ext_webidl_api_request_handler.js | 2 +- .../test_ext_webidl_api_schema_errors.js | 2 +- .../test_ext_webidl_api_schema_formatters.js | 2 +- .../webidl-api/test_ext_webidl_runtime_port.js | 2 +- 131 files changed, 387 insertions(+), 331 deletions(-) (limited to 'toolkit/components/extensions/test') diff --git a/toolkit/components/extensions/test/browser/browser_ext_background_serviceworker.js b/toolkit/components/extensions/test/browser/browser_ext_background_serviceworker.js index 153818f4de..6a39a668e7 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_background_serviceworker.js +++ b/toolkit/components/extensions/test/browser/browser_ext_background_serviceworker.js @@ -175,7 +175,7 @@ async function testServiceWorker({ extension, expectMessageReply }) { let msgFromV1 = await SpecialPowers.spawn( browser, [swRegInfo.scriptURL], - async url => { + async () => { const { active } = await content.navigator.serviceWorker.ready; const { port1, port2 } = new content.MessageChannel(); diff --git a/toolkit/components/extensions/test/browser/browser_ext_downloads_filters.js b/toolkit/components/extensions/test/browser/browser_ext_downloads_filters.js index 48dd6b88ee..a3ee11aa66 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_downloads_filters.js +++ b/toolkit/components/extensions/test/browser/browser_ext_downloads_filters.js @@ -10,7 +10,7 @@ async function testAppliedFilters(ext, expectedFilter, expectedFilterCount) { let filterCount = 0; let MockFilePicker = SpecialPowers.MockFilePicker; - MockFilePicker.init(window); + MockFilePicker.init(window.browsingContext); MockFilePicker.displayDirectory = tempDir; MockFilePicker.returnValue = MockFilePicker.returnCancel; MockFilePicker.appendFiltersCallback = function (fp, val) { diff --git a/toolkit/components/extensions/test/browser/browser_ext_downloads_referrer.js b/toolkit/components/extensions/test/browser/browser_ext_downloads_referrer.js index 9690df6376..24d52dd8e0 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_downloads_referrer.js +++ b/toolkit/components/extensions/test/browser/browser_ext_downloads_referrer.js @@ -4,8 +4,8 @@ "use strict"; const URL_PATH = "browser/toolkit/components/extensions/test/browser/data"; -const TEST_URL = `http://example.com/${URL_PATH}/test_downloads_referrer.html`; -const DOWNLOAD_URL = `http://example.com/${URL_PATH}/test-download.txt`; +const TEST_URL = `https://example.com/${URL_PATH}/test_downloads_referrer.html`; +const DOWNLOAD_URL = `https://example.com/${URL_PATH}/test-download.txt`; async function triggerSaveAs({ selector }) { const contextMenu = window.document.getElementById("contentAreaContextMenu"); @@ -28,7 +28,7 @@ add_setup(() => { } let MockFilePicker = SpecialPowers.MockFilePicker; - MockFilePicker.init(window); + MockFilePicker.init(window.browsingContext); registerCleanupFunction(function () { MockFilePicker.cleanup(); diff --git a/toolkit/components/extensions/test/browser/browser_ext_extension_page_tab_navigated.js b/toolkit/components/extensions/test/browser/browser_ext_extension_page_tab_navigated.js index 9742d42b2e..429d584a17 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_extension_page_tab_navigated.js +++ b/toolkit/components/extensions/test/browser/browser_ext_extension_page_tab_navigated.js @@ -73,7 +73,7 @@ function createTestExtPageScript(name) { // Triggers a WebRequest listener registered by the test extensions by // opening a tab on the given web page URL and then closing it after // it did load. -async function triggerWebRequestListener(webPageURL, pause) { +async function triggerWebRequestListener(webPageURL) { let webPageTab = await BrowserTestUtils.openNewForegroundTab( { gBrowser, diff --git a/toolkit/components/extensions/test/browser/browser_ext_management_themes.js b/toolkit/components/extensions/test/browser/browser_ext_management_themes.js index d3cfa536b8..7fc656f141 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_management_themes.js +++ b/toolkit/components/extensions/test/browser/browser_ext_management_themes.js @@ -91,7 +91,7 @@ add_task(async function test_management_themes() { return found; } - browser.test.onMessage.addListener(async msg => { + browser.test.onMessage.addListener(async () => { let theme = await getAddon("theme"); browser.test.assertEq( theme.description, diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_arrowpanels.js b/toolkit/components/extensions/test/browser/browser_ext_themes_arrowpanels.js index 6665fb3092..9ddd1d62d3 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_arrowpanels.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_arrowpanels.js @@ -23,7 +23,7 @@ function closeIdentityPopup() { // This test checks applied WebExtension themes that attempt to change // popup properties -add_task(async function test_popup_styling(browser, accDoc) { +add_task(async function test_popup_styling() { const POPUP_BACKGROUND_COLOR = "#FF0000"; const POPUP_TEXT_COLOR = "#008000"; const POPUP_BORDER_COLOR = "#0000FF"; @@ -50,7 +50,7 @@ add_task(async function test_popup_styling(browser, accDoc) { await BrowserTestUtils.withNewTab( { gBrowser, url: "https://example.com" }, - async function (browser) { + async function () { await extension.startup(); // Open the information arrow panel diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_incognito.js b/toolkit/components/extensions/test/browser/browser_ext_themes_incognito.js index d9beb0f9a8..6daa6dd812 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_incognito.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_incognito.js @@ -36,7 +36,7 @@ add_task(async function test_theme_incognito_not_allowed() { }, }; - browser.theme.onUpdated.addListener(info => { + browser.theme.onUpdated.addListener(() => { browser.test.log("got theme onChanged"); browser.test.fail("theme"); }); diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js b/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js index 9d28cf50c8..3b739322d6 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js @@ -71,10 +71,9 @@ function test_ntp_theme(browser, theme, isBrightText) { * Test whether a given browser has the default theme applied * * @param {object} browser to test against - * @param {string} url being tested * @returns {Promise} The task as a promise */ -function test_ntp_default_theme(browser, url) { +function test_ntp_default_theme(browser) { Services.ppmm.sharedData.flush(); return SpecialPowers.spawn( browser, diff --git a/toolkit/components/extensions/test/mochitest/chrome_cleanup_script.js b/toolkit/components/extensions/test/mochitest/chrome_cleanup_script.js index 9afa95f302..2c54bea61c 100644 --- a/toolkit/components/extensions/test/mochitest/chrome_cleanup_script.js +++ b/toolkit/components/extensions/test/mochitest/chrome_cleanup_script.js @@ -35,7 +35,7 @@ for (let win of iterBrowserWindows()) { initialTabs.set(win, new Set(getBrowserApp(win).tabs)); } -addMessageListener("check-cleanup", extensionId => { +addMessageListener("check-cleanup", () => { Services.console.unregisterListener(listener); let results = { diff --git a/toolkit/components/extensions/test/mochitest/file_indexedDB.html b/toolkit/components/extensions/test/mochitest/file_indexedDB.html index 65b7e0ad2f..ce4b96f079 100644 --- a/toolkit/components/extensions/test/mochitest/file_indexedDB.html +++ b/toolkit/components/extensions/test/mochitest/file_indexedDB.html @@ -15,7 +15,7 @@ request.onupgradeneeded = event => { let objectStore = db.createObjectStore(objectStoreName, {autoIncrement: 0}); request = objectStore.add(test.value, test.key); - request.onsuccess = event => { + request.onsuccess = () => { db.close(); window.postMessage("indexedDBCreated", "*"); }; diff --git a/toolkit/components/extensions/test/mochitest/file_simple_iframe_worker.html b/toolkit/components/extensions/test/mochitest/file_simple_iframe_worker.html index 2ecc24e648..d0c2f59844 100644 --- a/toolkit/components/extensions/test/mochitest/file_simple_iframe_worker.html +++ b/toolkit/components/extensions/test/mochitest/file_simple_iframe_worker.html @@ -11,12 +11,12 @@ fetch("file_simple_iframe.txt"); const worker = new Worker("file_simple_worker.js?iniframe=true"); -worker.onmessage = (msg) => { +worker.onmessage = () => { worker.postMessage("file_simple_iframe_worker.txt"); } const sharedworker = new SharedWorker("file_simple_sharedworker.js?iniframe=true"); -sharedworker.port.onmessage = (msg) => { +sharedworker.port.onmessage = () => { sharedworker.port.postMessage("file_simple_iframe_sharedworker.txt"); } sharedworker.port.start(); diff --git a/toolkit/components/extensions/test/mochitest/file_simple_webrequest_worker.html b/toolkit/components/extensions/test/mochitest/file_simple_webrequest_worker.html index a90c4509be..792fc5621b 100644 --- a/toolkit/components/extensions/test/mochitest/file_simple_webrequest_worker.html +++ b/toolkit/components/extensions/test/mochitest/file_simple_webrequest_worker.html @@ -11,12 +11,12 @@ fetch("file_simple_toplevel.txt"); const worker = new Worker("file_simple_worker.js"); -worker.onmessage = (msg) => { +worker.onmessage = () => { worker.postMessage("file_simple_worker.txt"); } const sharedworker = new SharedWorker("file_simple_sharedworker.js"); -sharedworker.port.onmessage = (msg) => { +sharedworker.port.onmessage = () => { dump(`postMessage to sharedworker\n`); sharedworker.port.postMessage("file_simple_sharedworker.txt"); } diff --git a/toolkit/components/extensions/test/mochitest/head_cookies.js b/toolkit/components/extensions/test/mochitest/head_cookies.js index 610c800c94..80c7f96266 100644 --- a/toolkit/components/extensions/test/mochitest/head_cookies.js +++ b/toolkit/components/extensions/test/mochitest/head_cookies.js @@ -30,7 +30,7 @@ async function testCookies(options) { let { url, domain, secure } = backgroundOptions; let failures = 0; - let tallyFailure = error => { + let tallyFailure = () => { failures++; }; diff --git a/toolkit/components/extensions/test/mochitest/head_webrequest.js b/toolkit/components/extensions/test/mochitest/head_webrequest.js index 9e6b5cc910..c40fd06619 100644 --- a/toolkit/components/extensions/test/mochitest/head_webrequest.js +++ b/toolkit/components/extensions/test/mochitest/head_webrequest.js @@ -200,7 +200,7 @@ function background(events) { } let listeners = { - onBeforeRequest(expected, details, result) { + onBeforeRequest(expected, details) { // Save some values to test request consistency in later events. browser.test.assertTrue( details.tabId !== undefined, @@ -263,7 +263,7 @@ function background(events) { } }, onBeforeRedirect() {}, - onSendHeaders(expected, details, result) { + onSendHeaders(expected, details) { if (expected.headers && expected.headers.request) { checkHeaders("request", expected, details); } @@ -287,7 +287,7 @@ function background(events) { onAuthRequired(expected, details, result) { result.authCredentials = expected.authInfo; }, - onCompleted(expected, details, result) { + onCompleted(expected, details) { // If we have already completed a GET request for this url, // and it was found, we expect for the response to come fromCache. // expected.cached may be undefined, force boolean. @@ -322,7 +322,7 @@ function background(events) { checkHeaders("response", expected, details); } }, - onErrorOccurred(expected, details, result) { + onErrorOccurred(expected, details) { if (expected.error) { if (Array.isArray(expected.error)) { browser.test.assertTrue( diff --git a/toolkit/components/extensions/test/mochitest/mochitest-common.toml b/toolkit/components/extensions/test/mochitest/mochitest-common.toml index 51a851a74b..782069a79c 100644 --- a/toolkit/components/extensions/test/mochitest/mochitest-common.toml +++ b/toolkit/components/extensions/test/mochitest/mochitest-common.toml @@ -130,6 +130,7 @@ skip-if = ["os == 'android'"] # only the current window is supported - bug 17959 ["test_ext_browserAction_openPopup_without_pref.html"] ["test_ext_browserSettings_overrideDocumentColors.html"] +skip-if = ["os == 'android'"] # bug 1876317 ["test_ext_browsingData_indexedDB.html"] skip-if = [ diff --git a/toolkit/components/extensions/test/mochitest/test_chrome_ext_downloads_saveAs.html b/toolkit/components/extensions/test/mochitest/test_chrome_ext_downloads_saveAs.html index 4b5d90814c..b026ea6245 100644 --- a/toolkit/components/extensions/test/mochitest/test_chrome_ext_downloads_saveAs.html +++ b/toolkit/components/extensions/test/mochitest/test_chrome_ext_downloads_saveAs.html @@ -78,7 +78,7 @@ add_task(async function test_downloads_saveAs() { defaultFile.append(DOWNLOAD_FILENAME); const {MockFilePicker} = SpecialPowers; - MockFilePicker.init(window); + MockFilePicker.init(SpecialPowers.wrap(window).browsingContext); function mockFilePickerCallback(expectedStartingDir, pickedFile) { return fp => { diff --git a/toolkit/components/extensions/test/mochitest/test_chrome_ext_downloads_uniquify.html b/toolkit/components/extensions/test/mochitest/test_chrome_ext_downloads_uniquify.html index 99a6c48500..35a0bb13df 100644 --- a/toolkit/components/extensions/test/mochitest/test_chrome_ext_downloads_uniquify.html +++ b/toolkit/components/extensions/test/mochitest/test_chrome_ext_downloads_uniquify.html @@ -42,7 +42,7 @@ add_task(async function test_downloads_uniquify() { unique.append("file_download(1).txt"); const {MockFilePicker} = SpecialPowers; - MockFilePicker.init(window); + MockFilePicker.init(SpecialPowers.wrap(window).browsingContext); MockFilePicker.returnValue = MockFilePicker.returnOK; MockFilePicker.showCallback = fp => { diff --git a/toolkit/components/extensions/test/mochitest/test_chrome_ext_permissions.html b/toolkit/components/extensions/test/mochitest/test_chrome_ext_permissions.html index 65bf0a50d0..98a9fed30e 100644 --- a/toolkit/components/extensions/test/mochitest/test_chrome_ext_permissions.html +++ b/toolkit/components/extensions/test/mochitest/test_chrome_ext_permissions.html @@ -67,7 +67,7 @@ function makeTest(manifestPermissions, optionalPermissions, checkFetch = true) { let url = new URL(window.location.pathname, "http://example.com/"); fetch(url, {}).then(response => { browser.test.sendMessage("fetch.result", response.ok); - }).catch(err => { + }).catch(() => { browser.test.sendMessage("fetch.result", false); }); }, diff --git a/toolkit/components/extensions/test/mochitest/test_chrome_ext_webrequest_background_events.html b/toolkit/components/extensions/test/mochitest/test_chrome_ext_webrequest_background_events.html index 4caa4d2464..3f824276d6 100644 --- a/toolkit/components/extensions/test/mochitest/test_chrome_ext_webrequest_background_events.html +++ b/toolkit/components/extensions/test/mochitest/test_chrome_ext_webrequest_background_events.html @@ -38,7 +38,7 @@ let testExtension = { "onCompleted", ]; - function listener(name, details) { + function listener(name) { // If we get anything, we failed. Removing the system principal check // in ext-webrequest triggers this failure. browser.test.fail(`received ${name}`); @@ -58,7 +58,7 @@ add_task(async function test_webRequest_chromeworker_events() { await extension.startup(); await new Promise(resolve => { let worker = new ChromeWorker("webrequest_chromeworker.js"); - worker.onmessage = event => { + worker.onmessage = () => { ok("chrome worker fetch finished"); resolve(); }; diff --git a/toolkit/components/extensions/test/mochitest/test_chrome_ext_webrequest_mozextension.html b/toolkit/components/extensions/test/mochitest/test_chrome_ext_webrequest_mozextension.html index 6a41b9cf08..36de902180 100644 --- a/toolkit/components/extensions/test/mochitest/test_chrome_ext_webrequest_mozextension.html +++ b/toolkit/components/extensions/test/mochitest/test_chrome_ext_webrequest_mozextension.html @@ -82,7 +82,7 @@ add_task(async function test_webRequest_mozextension_fetch() { browser.test.sendMessage("request-complete"); }, {urls: [browser.runtime.getURL("*")]}); - browser.test.onMessage.addListener((msg, data) => { + browser.test.onMessage.addListener(() => { fetch(page).then(() => { browser.test.notifyPass("fetch success"); browser.test.sendMessage("done"); diff --git a/toolkit/components/extensions/test/mochitest/test_ext_activityLog.html b/toolkit/components/extensions/test/mochitest/test_ext_activityLog.html index c426913373..ac0ec974dc 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_activityLog.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_activityLog.html @@ -27,7 +27,7 @@ add_task(async function test_api() { // This privileged test extension should not affect the webRequest // data received by non-privileged extensions (See Bug 1576272). browser.webRequest.onBeforeRequest.addListener( - details => { + () => { return { cancel: false }; }, { urls: ["http://mochi.test/*/file_sample.html"] }, @@ -79,7 +79,7 @@ add_task(async function test_api() { browser.storage.onChanged.removeListener(listen); // Test a parent event manager. - let webRequestListener = details => { + let webRequestListener = () => { browser.webRequest.onBeforeRequest.removeListener(webRequestListener); return { cancel: false }; }; diff --git a/toolkit/components/extensions/test/mochitest/test_ext_async_clipboard.html b/toolkit/components/extensions/test/mochitest/test_ext_async_clipboard.html index 4bd8339357..708b5522c3 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_async_clipboard.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_async_clipboard.html @@ -154,7 +154,7 @@ add_task(async function test_contentscript_clipboard_permission_writetext() { clipboardWriteText(str).then(function() { // nothing here browser.test.sendMessage("ready"); - }, function(err) { + }, function() { browser.test.fail("WriteText promise rejected"); browser.test.sendMessage("ready"); }); // clipboardWriteText @@ -196,7 +196,7 @@ add_task(async function test_contentscript_clipboard_permission_readtext() { browser.test.fail("ReadText read the wrong thing from clipboard:" + strData); } browser.test.sendMessage("ready"); - }, function(err) { + }, function() { browser.test.fail("ReadText promise rejected"); browser.test.sendMessage("ready"); }); // clipboardReadText @@ -237,7 +237,7 @@ add_task(async function test_contentscript_clipboard_permission_write() { clipboardWrite([item]).then(function() { // nothing here browser.test.sendMessage("ready"); - }, function(err) { // clipboardWrite promise error function + }, function() { // clipboardWrite promise error function browser.test.fail("Write promise rejected"); browser.test.sendMessage("ready"); }); // clipboard write @@ -280,7 +280,7 @@ add_task(async function test_contentscript_clipboard_permission_read() { browser.test.fail("Read read the wrong string from clipboard:" + s); } browser.test.sendMessage("ready"); - }, function(err) { // clipboardRead promise error function + }, function() { // clipboardRead promise error function browser.test.fail("Read promise rejected"); browser.test.sendMessage("ready"); }); // clipboard read diff --git a/toolkit/components/extensions/test/mochitest/test_ext_browsingData_indexedDB.html b/toolkit/components/extensions/test/mochitest/test_ext_browsingData_indexedDB.html index f8ea41ddab..0d417cbb5f 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_browsingData_indexedDB.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_browsingData_indexedDB.html @@ -52,7 +52,7 @@ add_task(async function testIndexedDB() { // eslint-disable-next-line mozilla/balanced-listeners window.addEventListener( "message", - msg => { + () => { browser.test.sendMessage("indexedDBCreated"); }, true diff --git a/toolkit/components/extensions/test/mochitest/test_ext_browsingData_localStorage.html b/toolkit/components/extensions/test/mochitest/test_ext_browsingData_localStorage.html index 2fd608f125..0e36139f14 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_browsingData_localStorage.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_browsingData_localStorage.html @@ -177,7 +177,7 @@ add_task(async function testLocalStorage() { 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(); diff --git a/toolkit/components/extensions/test/mochitest/test_ext_browsingData_serviceWorkers.html b/toolkit/components/extensions/test/mochitest/test_ext_browsingData_serviceWorkers.html index d8ebd8e225..36ec448ccd 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_browsingData_serviceWorkers.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_browsingData_serviceWorkers.html @@ -33,7 +33,7 @@ add_task(async function testServiceWorkers() { const PAGE = "/tests/toolkit/components/extensions/test/mochitest/file_serviceWorker.html"; - browser.runtime.onMessage.addListener(msg => { + browser.runtime.onMessage.addListener(() => { browser.test.sendMessage("serviceWorkerRegistered"); }); diff --git a/toolkit/components/extensions/test/mochitest/test_ext_browsingData_settings.html b/toolkit/components/extensions/test/mochitest/test_ext_browsingData_settings.html index 11c690e5bf..b36daf9b8d 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_browsingData_settings.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_browsingData_settings.html @@ -42,16 +42,16 @@ add_task(async function testSettings() { // Verify that we get the keys back we expect. isDeeply( Object.entries(settings.dataToRemove) - .filter(([key, value]) => value) - .map(([key, value]) => key) + .filter(([, value]) => value) + .map(([key]) => key) .sort(), SETTINGS_LIST, "dataToRemove contains expected properties." ); isDeeply( Object.entries(settings.dataRemovalPermitted) - .filter(([key, value]) => value) - .map(([key, value]) => key) + .filter(([, value]) => value) + .map(([key]) => key) .sort(), SETTINGS_LIST, "dataToRemove contains expected properties." diff --git a/toolkit/components/extensions/test/mochitest/test_ext_exclude_include_globs.html b/toolkit/components/extensions/test/mochitest/test_ext_exclude_include_globs.html index f87b5620d6..8d425656e0 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_exclude_include_globs.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_exclude_include_globs.html @@ -14,7 +14,7 @@ add_task(async function test_contentscript() { function background() { - browser.runtime.onMessage.addListener(([script], sender) => { + browser.runtime.onMessage.addListener(([script]) => { browser.test.sendMessage("run", {script}); browser.test.sendMessage("run-" + script); }); @@ -65,7 +65,7 @@ add_task(async function test_contentscript() { let extension = ExtensionTestUtils.loadExtension(extensionData); let ran = 0; - extension.onMessage("run", ({script}) => { + extension.onMessage("run", () => { ran++; }); diff --git a/toolkit/components/extensions/test/mochitest/test_ext_extension_iframe_messaging.html b/toolkit/components/extensions/test/mochitest/test_ext_extension_iframe_messaging.html index 403782ab7d..2b47a9c0f7 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_extension_iframe_messaging.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_extension_iframe_messaging.html @@ -72,7 +72,7 @@ add_task(async function test_moz_extension_iframe_messaging() { }, }, background() { - browser.test.onMessage.addListener(async msg => { + browser.test.onMessage.addListener(async () => { await browser.test.assertRejects( browser.runtime.sendMessage("from-background"), diff --git a/toolkit/components/extensions/test/mochitest/test_ext_redirect_jar.html b/toolkit/components/extensions/test/mochitest/test_ext_redirect_jar.html index 18ff14a6de..c21b18de95 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_redirect_jar.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_redirect_jar.html @@ -46,7 +46,7 @@ function getExtension() { }, background: async () => { let redirectUrl = browser.runtime.getURL("finished.html"); - browser.webRequest.onBeforeRequest.addListener(details => { + browser.webRequest.onBeforeRequest.addListener(() => { return {redirectUrl}; }, {urls: ["*://*/intercept*"]}, ["blocking"]); diff --git a/toolkit/components/extensions/test/mochitest/test_ext_request_urlClassification.html b/toolkit/components/extensions/test/mochitest/test_ext_request_urlClassification.html index a139e94687..fa4bd0a05d 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_request_urlClassification.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_request_urlClassification.html @@ -115,7 +115,7 @@ add_task(async function teardown() { /* eslint-env mozilla/chrome-script */ // Cleanup cache await new Promise(resolve => { - Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => resolve()); + Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () => resolve()); }); const {UrlClassifierTestUtils} = ChromeUtils.importESModule( diff --git a/toolkit/components/extensions/test/mochitest/test_ext_sendmessage_doublereply.html b/toolkit/components/extensions/test/mochitest/test_ext_sendmessage_doublereply.html index ffdbc90efb..6958e906b9 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_sendmessage_doublereply.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_sendmessage_doublereply.html @@ -41,7 +41,7 @@ function background() { } let done_count = 0; - browser.runtime.onMessage.addListener((msg, sender, sendReply) => { + browser.runtime.onMessage.addListener((msg, sender) => { browser.test.assertTrue(sender.tab.url.endsWith("file_sample.html"), "sender url correct"); if (msg == "done") { diff --git a/toolkit/components/extensions/test/mochitest/test_ext_sendmessage_reply2.html b/toolkit/components/extensions/test/mochitest/test_ext_sendmessage_reply2.html index 8cce833b49..5da378de2b 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_sendmessage_reply2.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_sendmessage_reply2.html @@ -54,7 +54,7 @@ function backgroundScript(token, id, otherId) { function contentScript(token, id, otherId) { let gotContentMessage = false; - browser.runtime.onMessage.addListener((msg, sender, sendReply) => { + browser.runtime.onMessage.addListener((msg, sender) => { browser.test.assertEq(id, sender.id, `${id}: Got expected sender ID`); browser.test.assertEq(`${token}-contentMessage`, msg, @@ -83,7 +83,7 @@ function contentScript(token, id, otherId) { async function tabScript(token, id, otherId) { let gotTabMessage = false; - browser.runtime.onMessage.addListener((msg, sender, sendReply) => { + browser.runtime.onMessage.addListener((msg, sender) => { browser.test.assertEq(id, sender.id, `${id}: Got expected sender ID`); if (String(msg).startsWith("content-")) { diff --git a/toolkit/components/extensions/test/mochitest/test_ext_storage_cleanup.html b/toolkit/components/extensions/test/mochitest/test_ext_storage_cleanup.html index 33029cf61e..e6a885a3c7 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_storage_cleanup.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_storage_cleanup.html @@ -71,7 +71,7 @@ const storageTestHelpers = { reject(new Error(`indexedDB open failed with ${e.errorCode}`)); }; - req.onupgradeneeded = e => { + req.onupgradeneeded = () => { // no database, data is not present resolve(false); }; diff --git a/toolkit/components/extensions/test/mochitest/test_ext_streamfilter_multiple.html b/toolkit/components/extensions/test/mochitest/test_ext_streamfilter_multiple.html index d1bfbd824b..50d7d6cb7d 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_streamfilter_multiple.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_streamfilter_multiple.html @@ -53,7 +53,7 @@ add_task(async () => { filter.ondata = event => { filter.write(event.data); }; - filter.onstop = event => { + filter.onstop = () => { filter.write(new TextEncoder().encode(" End")); filter.close(); }; diff --git a/toolkit/components/extensions/test/mochitest/test_ext_streamfilter_processswitch.html b/toolkit/components/extensions/test/mochitest/test_ext_streamfilter_processswitch.html index 049178cad0..7240e01c02 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_streamfilter_processswitch.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_streamfilter_processswitch.html @@ -36,7 +36,7 @@ add_task(async () => { filter.ondata = event => { filter.write(event.data); }; - filter.onstop = event => { + filter.onstop = () => { filter.write(new TextEncoder().encode(" End")); filter.close(); }; diff --git a/toolkit/components/extensions/test/mochitest/test_ext_subframes_privileges.html b/toolkit/components/extensions/test/mochitest/test_ext_subframes_privileges.html index fd034f0b65..f791d08602 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_subframes_privileges.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_subframes_privileges.html @@ -303,7 +303,7 @@ add_task(async function test_sub_subframe_conduit_verified_env() { `, }; - async function expectErrors(ext, log) { + async function expectErrors(ext) { let err = await ext.awaitMessage("content_child"); is(err, "Bad sender context envType: content_child"); diff --git a/toolkit/components/extensions/test/mochitest/test_ext_tabs_executeScript_good.html b/toolkit/components/extensions/test/mochitest/test_ext_tabs_executeScript_good.html index 9b0f41f789..0704b93be9 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_tabs_executeScript_good.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_tabs_executeScript_good.html @@ -16,7 +16,7 @@ async function testHasPermission(params) { let contentSetup = params.contentSetup || (() => Promise.resolve()); async function background(contentSetup) { - browser.runtime.onMessage.addListener((msg, sender) => { + browser.runtime.onMessage.addListener((msg) => { browser.test.assertEq(msg, "script ran", "script ran"); browser.test.notifyPass("executeScript"); }); diff --git a/toolkit/components/extensions/test/mochitest/test_ext_tabs_permissions.html b/toolkit/components/extensions/test/mochitest/test_ext_tabs_permissions.html index 217139f12b..062e3a79e3 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_tabs_permissions.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_tabs_permissions.html @@ -69,8 +69,7 @@ const helperExtensionDef = { hasTitleChangeInfo = false; browser.tabs.onUpdated.addListener(function listener( tabId, - changeInfo, - tab + changeInfo ) { if (changeInfo.url?.endsWith(message.data.urlHash)) { hasURLChangeInfo = true; @@ -413,7 +412,7 @@ async function test_restricted_properties( let hasURLChangeInfo = false, hasTitleChangeInfo = false; - function onUpdateListener(tabId, changeInfo, tab) { + function onUpdateListener(tabId, changeInfo) { if (changeInfo.url?.endsWith(urlHash)) { hasURLChangeInfo = true; } @@ -550,7 +549,7 @@ async function test_onUpdateFilter(testCases, permissions) { async background() { let listenerGotCalled = false; - function onUpdateListener(tabId, changeInfo, tab) { + function onUpdateListener() { listenerGotCalled = true; } diff --git a/toolkit/components/extensions/test/mochitest/test_ext_web_accessible_incognito.html b/toolkit/components/extensions/test/mochitest/test_ext_web_accessible_incognito.html index d1c41d2030..1009eb0496 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_web_accessible_incognito.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_web_accessible_incognito.html @@ -17,7 +17,7 @@ let image = atob("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAA" + const IMAGE_ARRAYBUFFER = Uint8Array.from(image, byte => byte.charCodeAt(0)).buffer; async function testImageLoading(src, expectedAction) { - let imageLoadingPromise = new Promise((resolve, reject) => { + let imageLoadingPromise = new Promise((resolve) => { let cleanupListeners; let testImage = new window.Image(); // Set the src via wrappedJSObject so the load is triggered with the diff --git a/toolkit/components/extensions/test/mochitest/test_ext_web_accessible_resources.html b/toolkit/components/extensions/test/mochitest/test_ext_web_accessible_resources.html index c13e40e265..c8ab397e4a 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_web_accessible_resources.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_web_accessible_resources.html @@ -27,7 +27,7 @@ const IMAGE_ARRAYBUFFER = Uint8Array.from(image, byte => byte.charCodeAt(0)) const ANDROID = navigator.userAgent.includes("Android"); async function testImageLoading(src, expectedAction) { - let imageLoadingPromise = new Promise((resolve, reject) => { + let imageLoadingPromise = new Promise((resolve) => { let cleanupListeners; let testImage = document.createElement("img"); // Set the src via wrappedJSObject so the load is triggered with the diff --git a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html index f260f040a1..ec5f00a18c 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html @@ -79,13 +79,13 @@ add_task(async function test_webRequest_auth_nonblocking_forwardAuthProvider() { "nsIAuthPrompt2"]), getInterface: ChromeUtils.generateQI(["nsIAuthPromptProvider", "nsIAuthPrompt2"]), - promptAuth(channel, level, authInfo) { + promptAuth() { throw Components.Exception("", Cr.NS_ERROR_NO_INTERFACE); }, - getAuthPrompt(reason, iid) { + getAuthPrompt() { return this; }, - asyncPromptAuth(channel, callback, context, level, authInfo) { + asyncPromptAuth(channel, callback, context) { // We just cancel here, we're only ensuring that non-webrequest // notificationcallbacks get called if webrequest doesn't handle it. Promise.resolve().then(() => { @@ -138,10 +138,10 @@ add_task(async function test_webRequest_auth_nonblocking_forwardAuthPrompt2() { QueryInterface: ChromeUtils.generateQI(["nsIInterfaceRequestor", "nsIAuthPrompt2"]), getInterface: ChromeUtils.generateQI(["nsIAuthPrompt2"]), - promptAuth(request, level, authInfo) { + promptAuth() { throw Components.Exception("", Cr.NS_ERROR_NO_INTERFACE); }, - asyncPromptAuth(request, callback, context, level, authInfo) { + asyncPromptAuth(request) { // We just cancel here, we're only ensuring that non-webrequest // notificationcallbacks get called if webrequest doesn't handle it. Promise.resolve().then(() => { diff --git a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_background_events.html b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_background_events.html index 86cec62fb4..5ac3dccaa7 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_background_events.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_background_events.html @@ -35,7 +35,7 @@ add_task(async function test_webRequest_serviceworker_events() { "onErrorOccurred", ]); - function listener(name, details) { + function listener(name) { browser.test.assertTrue(eventNames.has(name), `received ${name}`); eventNames.delete(name); if (name == "onCompleted") { diff --git a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_basic.html b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_basic.html index 9d57d55681..1e769a3156 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_basic.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_basic.html @@ -303,7 +303,7 @@ add_task(async function test_webRequest_tabId() { add_task(async function test_webRequest_tabId_browser() { async function background(url) { let tabId; - browser.test.onMessage.addListener(async (msg, expected) => { + browser.test.onMessage.addListener(async (msg) => { if (msg == "create") { let tab = await browser.tabs.create({url}); tabId = tab.id; diff --git a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_errors.html b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_errors.html index cbfc5c17e7..d29638b408 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_errors.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_errors.html @@ -23,7 +23,7 @@ async function test_connection_refused(url, expectedError) { }, {urls: [""]}); let tabId; - browser.test.onMessage.addListener(async (msg, expected) => { + browser.test.onMessage.addListener(async () => { await browser.tabs.remove(tabId); browser.test.sendMessage("done"); }); diff --git a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_hsts.html b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_hsts.html index e66b5c471a..7b06a30551 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_hsts.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_hsts.html @@ -15,13 +15,13 @@ function getExtension() { async function background() { let expect; let urls = ["*://*.example.org/tests/*"]; - browser.webRequest.onBeforeRequest.addListener(details => { + browser.webRequest.onBeforeRequest.addListener(() => { browser.test.assertEq(expect.shift(), "onBeforeRequest"); }, {urls}, ["blocking"]); - browser.webRequest.onBeforeSendHeaders.addListener(details => { + browser.webRequest.onBeforeSendHeaders.addListener(() => { browser.test.assertEq(expect.shift(), "onBeforeSendHeaders"); }, {urls}, ["blocking", "requestHeaders"]); - browser.webRequest.onSendHeaders.addListener(details => { + browser.webRequest.onSendHeaders.addListener(() => { browser.test.assertEq(expect.shift(), "onSendHeaders"); }, {urls}, ["requestHeaders"]); @@ -82,10 +82,10 @@ function getExtension() { } return {responseHeaders: headers}; }, {urls}, ["blocking", "responseHeaders"]); - browser.webRequest.onBeforeRedirect.addListener(details => { + browser.webRequest.onBeforeRedirect.addListener(() => { browser.test.assertEq(expect.shift(), "onBeforeRedirect"); }, {urls}); - browser.webRequest.onResponseStarted.addListener(details => { + browser.webRequest.onResponseStarted.addListener(() => { browser.test.assertEq(expect.shift(), "onResponseStarted"); }, {urls}); browser.webRequest.onCompleted.addListener(details => { diff --git a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_redirect_bypass_cors.html b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_redirect_bypass_cors.html index 87dbbd6598..7ba92f5c80 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_redirect_bypass_cors.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_redirect_bypass_cors.html @@ -57,7 +57,7 @@ add_task(async function test_webRequest_redirect_cors_bypass() { let win = window.open(WIN_URL); // Creating a message channel to the new tab. const channel = new BroadcastChannel("test_bus"); - await new Promise((resolve, reject) => { + await new Promise((resolve) => { channel.onmessage = async function(fetch_result) { // Fetch result data will either be the text content of file_sample.txt -> 'Sample' // or a network-Error. diff --git a/toolkit/components/extensions/test/mochitest/webrequest_chromeworker.js b/toolkit/components/extensions/test/mochitest/webrequest_chromeworker.js index 14d3ad2bab..9fb71430bf 100644 --- a/toolkit/components/extensions/test/mochitest/webrequest_chromeworker.js +++ b/toolkit/components/extensions/test/mochitest/webrequest_chromeworker.js @@ -2,7 +2,7 @@ /* eslint-env worker */ -onmessage = function (event) { +onmessage = function () { fetch("https://example.com/example.txt").then(() => { postMessage("Done!"); }); diff --git a/toolkit/components/extensions/test/xpcshell/data/file_page_xhr.html b/toolkit/components/extensions/test/xpcshell/data/file_page_xhr.html index 387b5285f5..58b053f7d9 100644 --- a/toolkit/components/extensions/test/xpcshell/data/file_page_xhr.html +++ b/toolkit/components/extensions/test/xpcshell/data/file_page_xhr.html @@ -8,7 +8,7 @@