summaryrefslogtreecommitdiffstats
path: root/browser/modules/test
diff options
context:
space:
mode:
Diffstat (limited to 'browser/modules/test')
-rw-r--r--browser/modules/test/browser/browser_PageActions.js6
-rw-r--r--browser/modules/test/browser/browser_ProcessHangNotifications.js7
-rw-r--r--browser/modules/test/browser/browser_UnsubmittedCrashHandler.js2
-rw-r--r--browser/modules/test/browser/browser_UsageTelemetry_interaction.js16
-rw-r--r--browser/modules/test/browser/browser_UsageTelemetry_private_and_restore.js2
-rw-r--r--browser/modules/test/browser/browser_preloading_tab_moving.js2
-rw-r--r--browser/modules/test/browser/formValidation/browser_form_validation.js8
-rw-r--r--browser/modules/test/browser/head.js2
-rw-r--r--browser/modules/test/unit/test_FirefoxBridgeExtensionUtils.js2
9 files changed, 24 insertions, 23 deletions
diff --git a/browser/modules/test/browser/browser_PageActions.js b/browser/modules/test/browser/browser_PageActions.js
index 4f86962a01..c40bfd97d7 100644
--- a/browser/modules/test/browser/browser_PageActions.js
+++ b/browser/modules/test/browser/browser_PageActions.js
@@ -578,7 +578,7 @@ add_task(async function withIframe() {
pinnedToUrlbar: true,
title: "Test iframe",
wantsIframe: true,
- onCommand(event, buttonNode) {
+ onCommand() {
onCommandCallCount++;
},
onIframeShowing(iframeNode, panelNode) {
@@ -1171,10 +1171,10 @@ add_task(async function transient() {
id: "test-transient",
title: "Test transient",
_transient: true,
- onPlacedInPanel(buttonNode) {
+ onPlacedInPanel() {
onPlacedInPanelCount++;
},
- onBeforePlacedInWindow(win) {
+ onBeforePlacedInWindow() {
onBeforePlacedInWindowCount++;
},
})
diff --git a/browser/modules/test/browser/browser_ProcessHangNotifications.js b/browser/modules/test/browser/browser_ProcessHangNotifications.js
index d176f911ef..9150c36d4c 100644
--- a/browser/modules/test/browser/browser_ProcessHangNotifications.js
+++ b/browser/modules/test/browser/browser_ProcessHangNotifications.js
@@ -2,7 +2,7 @@
const { WebExtensionPolicy } = Cu.getGlobalForObject(Services);
-function promiseNotificationShown(aWindow, aName) {
+function promiseNotificationShown(aWindow) {
return new Promise(resolve => {
let notificationBox = aWindow.gNotificationBox;
notificationBox.stack.addEventListener(
@@ -52,7 +52,7 @@ let TestHangReport = function (
hangType = SLOW_SCRIPT,
browser = gBrowser.selectedBrowser
) {
- this.promise = new Promise((resolve, reject) => {
+ this.promise = new Promise(resolve => {
this._resolver = resolve;
});
@@ -98,7 +98,8 @@ TestHangReport.prototype = {
};
// on dev edition we add a button for js debugging of hung scripts.
-let buttonCount = AppConstants.MOZ_DEV_EDITION ? 2 : 1;
+let buttonCount =
+ AppConstants.MOZ_DEV_EDITION || AppConstants.NIGHTLY_BUILD ? 2 : 1;
add_setup(async function () {
// Create a fake WebExtensionPolicy that we can use for
diff --git a/browser/modules/test/browser/browser_UnsubmittedCrashHandler.js b/browser/modules/test/browser/browser_UnsubmittedCrashHandler.js
index 4305d7f7df..6300bd17ba 100644
--- a/browser/modules/test/browser/browser_UnsubmittedCrashHandler.js
+++ b/browser/modules/test/browser/browser_UnsubmittedCrashHandler.js
@@ -98,7 +98,7 @@ function createPendingCrashReports(howMany, accessDate) {
};
let uuidGenerator = Services.uuid;
- // Some annotations are always present in the .extra file and CrashSubmit.jsm
+ // Some annotations are always present in the .extra file and CrashSubmit.sys.mjs
// expects there to be a ServerURL entry, so we'll add them here.
let extraFileContents = JSON.stringify({
ServerURL: SERVER_URL,
diff --git a/browser/modules/test/browser/browser_UsageTelemetry_interaction.js b/browser/modules/test/browser/browser_UsageTelemetry_interaction.js
index 2bc60d9697..5fa436a349 100644
--- a/browser/modules/test/browser/browser_UsageTelemetry_interaction.js
+++ b/browser/modules/test/browser/browser_UsageTelemetry_interaction.js
@@ -316,7 +316,7 @@ add_task(async function contextMenu_entrypoints() {
});
add_task(async function appMenu() {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
Services.telemetry.getSnapshotForKeyedScalars("main", true);
let shown = BrowserTestUtils.waitForEvent(
@@ -348,7 +348,7 @@ add_task(async function appMenu() {
});
add_task(async function devtools() {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
Services.telemetry.getSnapshotForKeyedScalars("main", true);
let shown = BrowserTestUtils.waitForEvent(
@@ -667,7 +667,7 @@ add_task(async function mainMenu() {
BrowserUsageTelemetry._resetAddonIds();
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
Services.telemetry.getSnapshotForKeyedScalars("main", true);
CustomizableUI.setToolbarVisibility("toolbar-menubar", true);
@@ -702,7 +702,7 @@ add_task(async function preferences() {
? "sync-pane-loaded"
: "privacy-pane-loaded";
let finalPrefPaneLoaded = TestUtils.topicObserved(finalPaneEvent, () => true);
- await BrowserTestUtils.withNewTab("about:preferences", async browser => {
+ await BrowserTestUtils.withNewTab("about:preferences", async () => {
await finalPrefPaneLoaded;
Services.telemetry.getSnapshotForKeyedScalars("main", true);
@@ -778,7 +778,7 @@ async function openLinkUsingContextMenu(link) {
}
async function history_appMenu(useContextClick) {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
let shown = BrowserTestUtils.waitForEvent(
elem("appMenu-popup"),
"popupshown"
@@ -819,7 +819,7 @@ add_task(async function history_appMenu_context_click() {
});
async function bookmarks_appMenu(useContextClick) {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
let shown = BrowserTestUtils.waitForEvent(
elem("appMenu-popup"),
"popupshown"
@@ -865,7 +865,7 @@ add_task(async function bookmarks_appMenu_context_click() {
});
async function bookmarks_library_navbar(useContextClick) {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
CustomizableUI.addWidgetToArea("library-button", "nav-bar");
let button = document.getElementById("library-button");
button.click();
@@ -908,7 +908,7 @@ add_task(async function bookmarks_library_navbar_context_click() {
});
async function history_library_navbar(useContextClick) {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
CustomizableUI.addWidgetToArea("library-button", "nav-bar");
let button = document.getElementById("library-button");
button.click();
diff --git a/browser/modules/test/browser/browser_UsageTelemetry_private_and_restore.js b/browser/modules/test/browser/browser_UsageTelemetry_private_and_restore.js
index 89222739be..94447c69ae 100644
--- a/browser/modules/test/browser/browser_UsageTelemetry_private_and_restore.js
+++ b/browser/modules/test/browser/browser_UsageTelemetry_private_and_restore.js
@@ -19,7 +19,7 @@ registerCleanupFunction(() => {
function promiseBrowserStateRestored() {
return new Promise(resolve => {
- Services.obs.addObserver(function observer(aSubject, aTopic) {
+ Services.obs.addObserver(function observer() {
Services.obs.removeObserver(
observer,
"sessionstore-browser-state-restored"
diff --git a/browser/modules/test/browser/browser_preloading_tab_moving.js b/browser/modules/test/browser/browser_preloading_tab_moving.js
index ce7cba9e85..1118657980 100644
--- a/browser/modules/test/browser/browser_preloading_tab_moving.js
+++ b/browser/modules/test/browser/browser_preloading_tab_moving.js
@@ -27,7 +27,7 @@ async function promiseNewTabLoadedInBrowser(browser) {
info(`Waiting for ${url} to be the location for the browser.`);
await new Promise(resolve => {
let progressListener = {
- onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
+ onLocationChange(aWebProgress, aRequest, aLocationURI) {
if (!url || aLocationURI.spec == url) {
browser.removeProgressListener(progressListener);
resolve();
diff --git a/browser/modules/test/browser/formValidation/browser_form_validation.js b/browser/modules/test/browser/formValidation/browser_form_validation.js
index 6348546c80..8e0584269f 100644
--- a/browser/modules/test/browser/formValidation/browser_form_validation.js
+++ b/browser/modules/test/browser/formValidation/browser_form_validation.js
@@ -161,7 +161,7 @@ add_task(async function () {
await clickChildElement(browser);
- await new Promise((resolve, reject) => {
+ await new Promise(resolve => {
// XXXndeakin This isn't really going to work when the content is another process
executeSoon(function () {
checkPopupHide();
@@ -289,7 +289,7 @@ add_task(async function () {
gInvalidFormPopup.firstElementChild.textContent
);
- await new Promise((resolve, reject) => {
+ await new Promise(resolve => {
EventUtils.sendString("a");
executeSoon(function () {
checkPopupShow(anchorRect);
@@ -475,7 +475,7 @@ add_task(async function () {
// Now, the element suffers from another error, the message should have
// been updated.
- await new Promise((resolve, reject) => {
+ await new Promise(resolve => {
// XXXndeakin This isn't really going to work when the content is another process
executeSoon(function () {
checkChildFocus(browser, gInvalidFormPopup.firstElementChild.textContent);
@@ -515,7 +515,7 @@ add_task(async function () {
gInvalidFormPopup,
"popuphidden"
);
- BrowserReloadSkipCache();
+ BrowserCommands.reloadSkipCache();
await popupHiddenPromise;
gBrowser.removeCurrentTab();
diff --git a/browser/modules/test/browser/head.js b/browser/modules/test/browser/head.js
index f852cdd641..da82fa1c39 100644
--- a/browser/modules/test/browser/head.js
+++ b/browser/modules/test/browser/head.js
@@ -95,7 +95,7 @@ function makeMockPermissionRequest(browser) {
allow() {
this._allowed = true;
},
- getDelegatePrincipal(aType) {
+ getDelegatePrincipal() {
return principal;
},
QueryInterface: ChromeUtils.generateQI(["nsIContentPermissionRequest"]),
diff --git a/browser/modules/test/unit/test_FirefoxBridgeExtensionUtils.js b/browser/modules/test/unit/test_FirefoxBridgeExtensionUtils.js
index 1273ee950b..77db0d8286 100644
--- a/browser/modules/test/unit/test_FirefoxBridgeExtensionUtils.js
+++ b/browser/modules/test/unit/test_FirefoxBridgeExtensionUtils.js
@@ -39,7 +39,7 @@ class StubbedRegistryKey {
this.#children = new Map(this.#originalChildren);
}
- open(accessLevel) {
+ open(_accessLevel) {
this.#openedForRead = true;
}