diff --git a/testing/marionette/harness/marionette_harness/www/dom/indexedDB/basicIDB_PBM.html b/testing/marionette/harness/marionette_harness/www/dom/indexedDB/basicIDB_PBM.html index 90472d64d2c8..8b0b425b81bc 100644 --- a/testing/marionette/harness/marionette_harness/www/dom/indexedDB/basicIDB_PBM.html +++ b/testing/marionette/harness/marionette_harness/www/dom/indexedDB/basicIDB_PBM.html @@ -10,7 +10,7 @@ var req = indexedDB.open(name, ver); req.onerror = reject; - req.onsuccess = (event) => { + req.onsuccess = () => { resolve(req.result); }; diff --git a/testing/marionette/harness/marionette_harness/www/html5/geolocation.js b/testing/marionette/harness/marionette_harness/www/html5/geolocation.js index 4fb4a4747b4c..1c0132a73238 100644 --- a/testing/marionette/harness/marionette_harness/www/html5/geolocation.js +++ b/testing/marionette/harness/marionette_harness/www/html5/geolocation.js @@ -17,7 +17,7 @@ function success(position) { message.innerHTML += "
Altitude: " + position.coords.altitude + "
"; } -function error(msg) { +function error() { let message = document.getElementById("status"); message.innerHTML = "Failed to get geolocation."; } diff --git a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs index 741882d9be7d..1793a6646fe7 100644 --- a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs +++ b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs @@ -704,7 +704,7 @@ export var BrowserTestUtils = { * @resolves When STATE_START reaches the tab's progress listener */ browserStarted(browser, expectedURI) { - let testFn = function (aStateFlags, aStatus) { + let testFn = function (aStateFlags) { return ( aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK && aStateFlags & Ci.nsIWebProgressListener.STATE_START @@ -763,7 +763,7 @@ export var BrowserTestUtils = { } else { urlMatches = urlToMatch => urlToMatch != "about:blank"; } - return new Promise((resolve, reject) => { + return new Promise(resolve => { tabbrowser.tabContainer.addEventListener( "TabOpen", function tabOpenListener(openEvent) { @@ -829,15 +829,9 @@ export var BrowserTestUtils = { * @resolves When onLocationChange fires. */ waitForLocationChange(tabbrowser, url) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { let progressListener = { - onLocationChange( - aBrowser, - aWebProgress, - aRequest, - aLocationURI, - aFlags - ) { + onLocationChange(aBrowser, aWebProgress, aRequest, aLocationURI) { if ( (url && aLocationURI.spec != url) || (!url && aLocationURI.spec == "about:blank") @@ -885,7 +879,7 @@ export var BrowserTestUtils = { } return new Promise((resolve, reject) => { - let observe = async (win, topic, data) => { + let observe = async (win, topic) => { if (topic != "domwindowopened") { return; } @@ -1002,7 +996,7 @@ export var BrowserTestUtils = { */ domWindowOpened(win, checkFn) { return new Promise(resolve => { - async function observer(subject, topic, data) { + async function observer(subject, topic) { if (topic == "domwindowopened" && (!win || subject === win)) { let observedWindow = subject; if (checkFn && !(await checkFn(observedWindow))) { @@ -1055,7 +1049,7 @@ export var BrowserTestUtils = { */ domWindowClosed(win) { return new Promise(resolve => { - function observer(subject, topic, data) { + function observer(subject, topic) { if (topic == "domwindowclosed" && (!win || subject === win)) { Services.ww.unregisterNotification(observer); resolve(subject); @@ -1167,7 +1161,7 @@ export var BrowserTestUtils = { win.gBrowser._insertBrowser(win.gBrowser.getTabForBrowser(browser)); }); - let observer = (subject, topic, data) => { + let observer = subject => { if (browserSet.has(subject)) { browserSet.delete(subject); } @@ -1202,7 +1196,7 @@ export var BrowserTestUtils = { return new Promise(resolve => { let browser = tab.linkedBrowser; let flushTopic = "sessionstore-browser-shutdown-flush"; - let observer = (subject, topic, data) => { + let observer = subject => { if (subject === browser) { Services.obs.removeObserver(observer, flushTopic); // Wait for the next event tick to make sure other listeners are @@ -1615,7 +1609,7 @@ export var BrowserTestUtils = { } }, - observe(subject, topic, data) { + observe(subject, topic) { switch (topic) { case "test-complete": this._cleanupContentEventListeners(); @@ -2054,7 +2048,7 @@ export var BrowserTestUtils = { let expectedPromises = []; let crashCleanupPromise = new Promise((resolve, reject) => { - let observer = (subject, topic, data) => { + let observer = (subject, topic) => { if (topic != "ipc:content-shutdown") { reject("Received incorrect observer topic: " + topic); return; @@ -2129,7 +2123,7 @@ export var BrowserTestUtils = { if (shouldShowTabCrashPage) { expectedPromises.push( - new Promise((resolve, reject) => { + new Promise(resolve => { browser.addEventListener( "AboutTabCrashedReady", function onCrash() { @@ -2187,7 +2181,7 @@ export var BrowserTestUtils = { }); let sawNormalCrash = false; - let observer = (subject, topic, data) => { + let observer = () => { sawNormalCrash = true; }; @@ -2232,7 +2226,7 @@ export var BrowserTestUtils = { waitForAttribute(attr, element, value) { let MutationObserver = element.ownerGlobal.MutationObserver; return new Promise(resolve => { - let mut = new MutationObserver(mutations => { + let mut = new MutationObserver(() => { if ( (!value && element.hasAttribute(attr)) || (value && element.getAttribute(attr) === value) @@ -2263,7 +2257,7 @@ export var BrowserTestUtils = { let MutationObserver = element.ownerGlobal.MutationObserver; return new Promise(resolve => { dump("Waiting for removal\n"); - let mut = new MutationObserver(mutations => { + let mut = new MutationObserver(() => { if (!element.hasAttribute(attr)) { resolve(); mut.disconnect(); diff --git a/testing/mochitest/BrowserTestUtils/content/content-about-page-utils.js b/testing/mochitest/BrowserTestUtils/content/content-about-page-utils.js index e20100db4bfe..759e283bcb59 100644 --- a/testing/mochitest/BrowserTestUtils/content/content-about-page-utils.js +++ b/testing/mochitest/BrowserTestUtils/content/content-about-page-utils.js @@ -14,7 +14,7 @@ function AboutPage(aboutHost, chromeURL, uriFlags) { AboutPage.prototype = { QueryInterface: ChromeUtils.generateQI(["nsIAboutModule"]), - getURIFlags(aURI) { + getURIFlags() { // eslint-disable-line no-unused-vars return this.uriFlags; }, diff --git a/testing/mochitest/api.js b/testing/mochitest/api.js index bd578f03b873..fa4422f2900a 100644 --- a/testing/mochitest/api.js +++ b/testing/mochitest/api.js @@ -26,7 +26,7 @@ const windowTracker = { Services.obs.addObserver(this, "chrome-document-global-created"); }, - async observe(window, topic, data) { + async observe(window, topic) { if (topic === "chrome-document-global-created") { await new Promise(resolve => window.addEventListener("DOMContentLoaded", resolve, { once: true }) diff --git a/testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage_browser-chrome.js b/testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage_browser-chrome.js index 4015bd6edf57..3095934ffdaa 100644 --- a/testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage_browser-chrome.js +++ b/testing/mochitest/baselinecoverage/browser_chrome/browser_baselinecoverage_browser-chrome.js @@ -13,7 +13,7 @@ add_task(async function () { gBrowser, url: "about:blank", }, - async function (browser) { + async function () { ok(true, "Collecting baseline coverage for browser-chrome tests."); await new Promise(c => setTimeout(c, 30 * 1000)); } diff --git a/testing/mochitest/browser-test.js b/testing/mochitest/browser-test.js index 98b905560556..1f9798bb368a 100644 --- a/testing/mochitest/browser-test.js +++ b/testing/mochitest/browser-test.js @@ -45,7 +45,7 @@ var TabDestroyObserver = { Services.obs.removeObserver(this, "message-manager-disconnect"); }, - observe(subject, topic, data) { + observe(subject, topic) { if (topic == "message-manager-close") { this.outstanding.add(subject); } else if (topic == "message-manager-disconnect") { @@ -516,7 +516,7 @@ Tester.prototype = { this.SimpleTest.waitForFocus(aCallback); }, - finish: function Tester_finish(aSkipSummary) { + finish: function Tester_finish() { var passCount = this.tests.reduce((a, f) => a + f.passCount, 0); var failCount = this.tests.reduce((a, f) => a + f.failCount, 0); var todoCount = this.tests.reduce((a, f) => a + f.todoCount, 0); @@ -564,7 +564,7 @@ Tester.prototype = { this.repeat = 0; }, - observe: function Tester_observe(aSubject, aTopic, aData) { + observe: function Tester_observe(aSubject, aTopic) { if (!aTopic) { this.onConsoleMessage(aSubject); } diff --git a/testing/mochitest/server.js b/testing/mochitest/server.js index 740404d94ea1..934f0b281cb7 100644 --- a/testing/mochitest/server.js +++ b/testing/mochitest/server.js @@ -215,7 +215,7 @@ function createMochitestServer(serverBasePath) { }); return file; }, - QueryInterface(aIID) { + QueryInterface() { return this; }, }; diff --git a/testing/mochitest/tests/Harness_sanity/SpecialPowersLoadChromeScript.js b/testing/mochitest/tests/Harness_sanity/SpecialPowersLoadChromeScript.js index 9591f3bca483..92a84e1ffa0c 100644 --- a/testing/mochitest/tests/Harness_sanity/SpecialPowersLoadChromeScript.js +++ b/testing/mochitest/tests/Harness_sanity/SpecialPowersLoadChromeScript.js @@ -6,7 +6,7 @@ addMessageListener("foo", function (message) { sendAsyncMessage("bar", message); }); -addMessageListener("valid-assert", function (message) { +addMessageListener("valid-assert", function () { assert.ok(true, "valid assertion"); assert.equal(1, 1, "another valid assertion"); sendAsyncMessage("valid-assert-done"); diff --git a/testing/mochitest/tests/Harness_sanity/test_SpecialPowersExtension.html b/testing/mochitest/tests/Harness_sanity/test_SpecialPowersExtension.html index 34b75933a037..3d374735a6a6 100644 --- a/testing/mochitest/tests/Harness_sanity/test_SpecialPowersExtension.html +++ b/testing/mochitest/tests/Harness_sanity/test_SpecialPowersExtension.html @@ -14,11 +14,11 @@