diff options
Diffstat (limited to 'browser/components/customizableui')
23 files changed, 54 insertions, 100 deletions
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs index 5b09402dc1..9f9bbf37dc 100644 --- a/browser/components/customizableui/CustomizableUI.sys.mjs +++ b/browser/components/customizableui/CustomizableUI.sys.mjs @@ -1454,7 +1454,7 @@ var CustomizableUIInternal = { } }, - onCustomizeEnd(aWindow) { + onCustomizeEnd() { this._clearPreviousUIState(); }, @@ -6215,7 +6215,7 @@ class OverflowableToolbar { * nsIObserver implementation starts here. */ - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { // This nsIObserver method allows us to defer initialization until after // this window has finished painting and starting up. if ( diff --git a/browser/components/customizableui/CustomizableWidgets.sys.mjs b/browser/components/customizableui/CustomizableWidgets.sys.mjs index ab95e8e7db..1f37af7963 100644 --- a/browser/components/customizableui/CustomizableWidgets.sys.mjs +++ b/browser/components/customizableui/CustomizableWidgets.sys.mjs @@ -155,7 +155,7 @@ export const CustomizableWidgets = [ panelview.panelMultiView.addEventListener("PanelMultiViewHidden", this); window.addEventListener("unload", this); }, - onViewHiding(event) { + onViewHiding() { lazy.log.debug("History view is being hidden!"); }, onPanelMultiViewHidden(event) { @@ -175,7 +175,7 @@ export const CustomizableWidgets = [ } panelMultiView.removeEventListener("PanelMultiViewHidden", this); }, - onWindowUnload(event) { + onWindowUnload() { if (this._panelMenuView) { delete this._panelMenuView; } diff --git a/browser/components/customizableui/CustomizeMode.sys.mjs b/browser/components/customizableui/CustomizeMode.sys.mjs index 5f6d01d833..7b4ee373be 100644 --- a/browser/components/customizableui/CustomizeMode.sys.mjs +++ b/browser/components/customizableui/CustomizeMode.sys.mjs @@ -28,7 +28,6 @@ ChromeUtils.defineESModuleGetters(lazy, { AddonManager: "resource://gre/modules/AddonManager.sys.mjs", BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs", DragPositionManager: "resource:///modules/DragPositionManager.sys.mjs", - SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs", URILoadingHelper: "resource:///modules/URILoadingHelper.sys.mjs", }); ChromeUtils.defineLazyGetter(lazy, "gWidgetsBundle", function () { @@ -63,14 +62,14 @@ var gTab; function closeGlobalTab() { let win = gTab.ownerGlobal; if (win.gBrowser.browsers.length == 1) { - win.BrowserOpenTab(); + win.BrowserCommands.openTab(); } win.gBrowser.removeTab(gTab, { animate: true }); gTab = null; } var gTabsProgressListener = { - onLocationChange(aBrowser, aWebProgress, aRequest, aLocation, aFlags) { + onLocationChange(aBrowser, aWebProgress, aRequest, aLocation) { // Tear down customize mode when the customize mode tab loads some other page. // Customize mode will be re-entered if "about:blank" is loaded again, so // don't tear down in this case. @@ -221,7 +220,6 @@ CustomizeMode.prototype = { gTab = aTab; gTab.setAttribute("customizemode", "true"); - lazy.SessionStore.persistTabAttribute("customizemode"); if (gTab.linkedPanel) { gTab.linkedBrowser.stop(); @@ -663,7 +661,7 @@ CustomizeMode.prototype = { }); }, - async addToToolbar(aNode, aReason) { + async addToToolbar(aNode) { aNode = this._getCustomizableChildForNode(aNode); if (aNode.localName == "toolbarpaletteitem" && aNode.firstElementChild) { aNode = aNode.firstElementChild; @@ -1282,15 +1280,15 @@ CustomizeMode.prototype = { this._onUIChange(); }, - onWidgetMoved(aWidgetId, aArea, aOldPosition, aNewPosition) { + onWidgetMoved() { this._onUIChange(); }, - onWidgetAdded(aWidgetId, aArea, aPosition) { + onWidgetAdded() { this._onUIChange(); }, - onWidgetRemoved(aWidgetId, aArea) { + onWidgetRemoved() { this._onUIChange(); }, @@ -1649,7 +1647,7 @@ CustomizeMode.prototype = { delete this.paletteDragHandler; }, - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { switch (aTopic) { case "nsPref:changed": this._updateResetButton(); @@ -2329,7 +2327,7 @@ CustomizeMode.prototype = { } }, - _setGridDragActive(aDragOverNode, aDraggedItem, aValue) { + _setGridDragActive(aDragOverNode, aDraggedItem) { let targetArea = this._getCustomizableParent(aDragOverNode); let draggedWrapper = this.$("wrapper-" + aDraggedItem.id); let originArea = this._getCustomizableParent(draggedWrapper); @@ -2428,7 +2426,7 @@ CustomizeMode.prototype = { return aElement.closest(areas.map(a => "#" + CSS.escape(a)).join(",")); }, - _getDragOverNode(aEvent, aAreaElement, aAreaType, aDraggedItemId) { + _getDragOverNode(aEvent, aAreaElement, aAreaType) { let expectedParent = CustomizableUI.getCustomizationTarget(aAreaElement) || aAreaElement; if (!expectedParent.contains(aEvent.target)) { diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js index f99560bd42..cb32085fd7 100644 --- a/browser/components/customizableui/content/panelUI.js +++ b/browser/components/customizableui/content/panelUI.js @@ -6,7 +6,6 @@ ChromeUtils.defineESModuleGetters(this, { AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.sys.mjs", NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs", PanelMultiView: "resource:///modules/PanelMultiView.sys.mjs", - ToolbarPanelHub: "resource:///modules/asrouter/ToolbarPanelHub.jsm", }); /** @@ -167,9 +166,6 @@ const PanelUI = { this.menuButton.removeEventListener("mousedown", this); this.menuButton.removeEventListener("keypress", this); CustomizableUI.removeListener(this); - if (this.whatsNewPanel) { - this.whatsNewPanel.removeEventListener("ViewShowing", this); - } }, /** @@ -303,11 +299,6 @@ const PanelUI = { case "activate": this.updateNotifications(); break; - case "ViewShowing": - if (aEvent.target == this.whatsNewPanel) { - this.onWhatsNewPanelShowing(); - } - break; } }, @@ -412,7 +403,6 @@ const PanelUI = { return; } - this.ensureWhatsNewInitialized(viewNode); this.ensurePanicViewInitialized(viewNode); let container = aAnchor.closest("panelmultiview"); @@ -497,24 +487,6 @@ const PanelUI = { }, /** - * Sets up the event listener for when the What's New panel is shown. - * - * @param {panelview} panelView The What's New panelview. - */ - ensureWhatsNewInitialized(panelView) { - if (panelView.id != "PanelUI-whatsNew" || panelView._initialized) { - return; - } - - if (!this.whatsNewPanel) { - this.whatsNewPanel = panelView; - } - - panelView._initialized = true; - panelView.addEventListener("ViewShowing", this); - }, - - /** * Adds FTL before appending the panic view markup to the main DOM. * * @param {panelview} panelView The Panic View panelview. @@ -533,17 +505,6 @@ const PanelUI = { }, /** - * When the What's New panel is showing, we fetch the messages to show. - */ - onWhatsNewPanelShowing() { - ToolbarPanelHub.renderMessages( - window, - document, - "PanelUI-whatsNew-message-container" - ); - }, - - /** * NB: The enable- and disableSingleSubviewPanelAnimations methods only * affect the hiding/showing animations of single-subview panels (tempPanel * in the showSubView method). @@ -568,7 +529,7 @@ const PanelUI = { } }, - onWidgetAfterDOMChange(aNode, aNextNode, aContainer, aWasRemoval) { + onWidgetAfterDOMChange(aNode, aNextNode, aContainer) { if (aContainer == this.overflowFixedList) { this.updateOverflowStatus(); } @@ -601,7 +562,7 @@ const PanelUI = { } }, - _onHelpViewShow(aEvent) { + _onHelpViewShow() { // Call global menu setup function buildHelpMenu(); diff --git a/browser/components/customizableui/test/browser_1087303_button_fullscreen.js b/browser/components/customizableui/test/browser_1087303_button_fullscreen.js index f67e81b892..42f9b58370 100644 --- a/browser/components/customizableui/test/browser_1087303_button_fullscreen.js +++ b/browser/components/customizableui/test/browser_1087303_button_fullscreen.js @@ -44,7 +44,7 @@ function promiseFullscreenChange() { reject("Fullscreen change did not happen within " + 20000 + "ms"); }, 20000); - function onFullscreenChange(event) { + function onFullscreenChange() { clearTimeout(timeoutId); window.removeEventListener("fullscreen", onFullscreenChange, true); info("Fullscreen event received"); diff --git a/browser/components/customizableui/test/browser_1087303_button_preferences.js b/browser/components/customizableui/test/browser_1087303_button_preferences.js index 7db48341cb..86bc89f48e 100644 --- a/browser/components/customizableui/test/browser_1087303_button_preferences.js +++ b/browser/components/customizableui/test/browser_1087303_button_preferences.js @@ -47,7 +47,7 @@ function waitForPageLoad(aTab) { reject("Page didn't load within " + 20000 + "ms"); }, 20000); - async function onTabLoad(event) { + async function onTabLoad() { clearTimeout(timeoutId); aTab.linkedBrowser.removeEventListener("load", onTabLoad, true); info("Tab event received: load"); diff --git a/browser/components/customizableui/test/browser_1484275_PanelMultiView_toggle_with_other_popup.js b/browser/components/customizableui/test/browser_1484275_PanelMultiView_toggle_with_other_popup.js index 89b86dba20..5d44cb1664 100644 --- a/browser/components/customizableui/test/browser_1484275_PanelMultiView_toggle_with_other_popup.js +++ b/browser/components/customizableui/test/browser_1484275_PanelMultiView_toggle_with_other_popup.js @@ -21,7 +21,7 @@ add_task(async function test_PanelMultiView_toggle_with_other_popup() { gBrowser, url: TEST_URL, }, - async function (browser) { + async function () { // 1. Open the main menu. await gCUITestUtils.openMainMenu(); diff --git a/browser/components/customizableui/test/browser_885052_customize_mode_observers_disabed.js b/browser/components/customizableui/test/browser_885052_customize_mode_observers_disabed.js index 346608dc99..b174d2bccf 100644 --- a/browser/components/customizableui/test/browser_885052_customize_mode_observers_disabed.js +++ b/browser/components/customizableui/test/browser_885052_customize_mode_observers_disabed.js @@ -34,7 +34,7 @@ add_task(async function () { "Should not be in fullscreen sizemode before we enter fullscreen." ); - BrowserFullScreen(); + BrowserCommands.fullScreen(); await TestUtils.waitForCondition(() => isFullscreenSizeMode()); ok( fullscreenButton.checked, @@ -62,7 +62,7 @@ add_task(async function () { await endCustomizing(); - BrowserFullScreen(); + BrowserCommands.fullScreen(); fullscreenButton = document.getElementById("fullscreen-button"); await TestUtils.waitForCondition(() => !isFullscreenSizeMode()); ok( diff --git a/browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js b/browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js index 0cf9a93341..8f2dc87e19 100644 --- a/browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js +++ b/browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js @@ -124,18 +124,17 @@ add_task(async function disabled_button_in_panel() { button.remove(); }); -registerCleanupFunction(function () { +registerCleanupFunction(async function () { if (button && button.parentNode) { button.remove(); } if (menuButton && menuButton.parentNode) { menuButton.remove(); } - // Sadly this isn't task.jsm-enabled, so we can't wait for this to happen. But we should - // definitely close it here and hope it won't interfere with other tests. - // Of course, all the tests are meant to do this themselves, but if they fail... if (isOverflowOpen()) { + let panelHiddenPromise = promiseOverflowHidden(window); PanelUI.overflowPanel.hidePopup(); + await panelHiddenPromise; } CustomizableUI.reset(); }); diff --git a/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js b/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js index cc8842a3e8..42daab891f 100644 --- a/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js +++ b/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js @@ -21,7 +21,7 @@ add_task(async function () { let privateWindow = null; let observerWindowOpened = { - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { if (aTopic == "domwindowopened") { privateWindow = aSubject; privateWindow.addEventListener( diff --git a/browser/components/customizableui/test/browser_947914_button_newWindow.js b/browser/components/customizableui/test/browser_947914_button_newWindow.js index 591d13191e..910dd2a179 100644 --- a/browser/components/customizableui/test/browser_947914_button_newWindow.js +++ b/browser/components/customizableui/test/browser_947914_button_newWindow.js @@ -21,7 +21,7 @@ add_task(async function () { let newWindow = null; let observerWindowOpened = { - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { if (aTopic == "domwindowopened") { newWindow = aSubject; newWindow.addEventListener( diff --git a/browser/components/customizableui/test/browser_947914_button_zoomReset.js b/browser/components/customizableui/test/browser_947914_button_zoomReset.js index 7dc8299b28..c97e2f17d1 100644 --- a/browser/components/customizableui/test/browser_947914_button_zoomReset.js +++ b/browser/components/customizableui/test/browser_947914_button_zoomReset.js @@ -12,7 +12,7 @@ add_task(async function () { await BrowserTestUtils.withNewTab( { gBrowser, url: "http://example.com", waitForLoad: true }, - async function (browser) { + async function () { CustomizableUI.addWidgetToArea( "zoom-controls", CustomizableUI.AREA_FIXED_OVERFLOW_PANEL diff --git a/browser/components/customizableui/test/browser_972267_customizationchange_events.js b/browser/components/customizableui/test/browser_972267_customizationchange_events.js index 7d27b94136..fdd7236d65 100644 --- a/browser/components/customizableui/test/browser_972267_customizationchange_events.js +++ b/browser/components/customizableui/test/browser_972267_customizationchange_events.js @@ -11,7 +11,7 @@ add_task(async function () { let otherToolbox = newWindow.gNavToolbox; let handlerCalledCount = 0; - let handler = ev => { + let handler = () => { handlerCalledCount++; }; diff --git a/browser/components/customizableui/test/browser_customization_context_menus.js b/browser/components/customizableui/test/browser_customization_context_menus.js index 526b3abd1b..3f4c94fb72 100644 --- a/browser/components/customizableui/test/browser_customization_context_menus.js +++ b/browser/components/customizableui/test/browser_customization_context_menus.js @@ -171,8 +171,8 @@ add_task(async function urlbar_context() { let contextMenu = document.getElementById("toolbar-context-menu"); let shownPromise = popupShown(contextMenu); let urlBarContainer = document.getElementById("urlbar-container"); - // Need to make sure not to click within an edit field. - EventUtils.synthesizeMouse(urlBarContainer, 100, 1, { + // This clicks in the urlbar container margin, to avoid hitting the urlbar field. + EventUtils.synthesizeMouse(urlBarContainer, -2, 4, { type: "contextmenu", button: 2, }); @@ -549,7 +549,7 @@ add_task(async function custom_context_menus() { await startCustomizing(); is( widget.getAttribute("context"), - "", + null, "Should not have own context menu in the toolbar now that we're customizing." ); is( @@ -562,7 +562,7 @@ add_task(async function custom_context_menus() { simulateItemDrag(widget, panel); is( widget.getAttribute("context"), - "", + null, "Should not have own context menu when in the panel." ); is( @@ -577,7 +577,7 @@ add_task(async function custom_context_menus() { ); is( widget.getAttribute("context"), - "", + null, "Should not have own context menu when back in toolbar because we're still customizing." ); is( diff --git a/browser/components/customizableui/test/browser_editcontrols_update.js b/browser/components/customizableui/test/browser_editcontrols_update.js index 9f064e521a..1276606779 100644 --- a/browser/components/customizableui/test/browser_editcontrols_update.js +++ b/browser/components/customizableui/test/browser_editcontrols_update.js @@ -29,7 +29,7 @@ function expectCommandUpdate(count, testWindow = window) { supportsCommand(cmd) { return cmd == "cmd_delete"; }, - isCommandEnabled(cmd) { + isCommandEnabled() { if (!count) { ok(false, "unexpected update"); reject(); diff --git a/browser/components/customizableui/test/browser_open_in_lazy_tab.js b/browser/components/customizableui/test/browser_open_in_lazy_tab.js index c18de67698..696bfde69b 100644 --- a/browser/components/customizableui/test/browser_open_in_lazy_tab.js +++ b/browser/components/customizableui/test/browser_open_in_lazy_tab.js @@ -9,7 +9,7 @@ add_task(async function open_customize_mode_in_lazy_tab() { }); gCustomizeMode.setTab(tab); - is(tab.linkedPanel, "", "Tab should be lazy"); + is(tab.linkedPanel, null, "Tab should be lazy"); let title = gNavigatorBundle.getFormattedString("customizeMode.tabTitle", [ document.getElementById("bundle_brand").getString("brandShortName"), diff --git a/browser/components/customizableui/test/browser_panelUINotifications.js b/browser/components/customizableui/test/browser_panelUINotifications.js index 818fcbad39..d5f2cc0450 100644 --- a/browser/components/customizableui/test/browser_panelUINotifications.js +++ b/browser/components/customizableui/test/browser_panelUINotifications.js @@ -14,7 +14,7 @@ add_task(async function testMainActionCalled() { url: "about:blank", }; - await BrowserTestUtils.withNewTab(options, function (browser) { + await BrowserTestUtils.withNewTab(options, function () { is( PanelUI.notificationPanel.state, "closed", @@ -77,7 +77,7 @@ add_task(async function testSecondaryActionWorkflow() { url: "about:blank", }; - await BrowserTestUtils.withNewTab(options, async function (browser) { + await BrowserTestUtils.withNewTab(options, async function () { is( PanelUI.notificationPanel.state, "closed", @@ -167,7 +167,7 @@ add_task(async function testDownloadingBadge() { url: "about:blank", }; - await BrowserTestUtils.withNewTab(options, async function (browser) { + await BrowserTestUtils.withNewTab(options, async function () { let mainActionCalled = false; let mainAction = { callback: () => { @@ -225,7 +225,7 @@ add_task(async function testDownloadingBadge() { * then we display any other badges that are remaining. */ add_task(async function testInteractionWithBadges() { - await BrowserTestUtils.withNewTab("about:blank", async function (browser) { + await BrowserTestUtils.withNewTab("about:blank", async function () { // Remove the fxa toolbar button from the navbar to ensure the notification // is displayed on the app menu button. let { CustomizableUI } = ChromeUtils.importESModule( @@ -328,7 +328,7 @@ add_task(async function testInteractionWithBadges() { * This tests that adding a badge will not dismiss any existing doorhangers. */ add_task(async function testAddingBadgeWhileDoorhangerIsShowing() { - await BrowserTestUtils.withNewTab("about:blank", function (browser) { + await BrowserTestUtils.withNewTab("about:blank", function () { is( PanelUI.notificationPanel.state, "closed", @@ -468,7 +468,7 @@ add_task(async function testMultipleBadges() { * Tests that non-badges also operate like a stack. */ add_task(async function testMultipleNonBadges() { - await BrowserTestUtils.withNewTab("about:blank", async function (browser) { + await BrowserTestUtils.withNewTab("about:blank", async function () { is( PanelUI.notificationPanel.state, "closed", diff --git a/browser/components/customizableui/test/browser_panelUINotifications_fullscreen_noAutoHideToolbar.js b/browser/components/customizableui/test/browser_panelUINotifications_fullscreen_noAutoHideToolbar.js index 853c39e89f..d90f928ed9 100644 --- a/browser/components/customizableui/test/browser_panelUINotifications_fullscreen_noAutoHideToolbar.js +++ b/browser/components/customizableui/test/browser_panelUINotifications_fullscreen_noAutoHideToolbar.js @@ -20,7 +20,7 @@ function waitForDocshellActivated() { content.document, "visibilitychange", true /* capture */, - aEvent => { + () => { return content.browsingContext.isActive; } ); diff --git a/browser/components/customizableui/test/browser_panelUINotifications_modals.js b/browser/components/customizableui/test/browser_panelUINotifications_modals.js index 87be14fcee..a3aa6d058a 100644 --- a/browser/components/customizableui/test/browser_panelUINotifications_modals.js +++ b/browser/components/customizableui/test/browser_panelUINotifications_modals.js @@ -8,10 +8,6 @@ const { AppMenuNotifications } = ChromeUtils.importESModule( ); add_task(async function testModals() { - await SpecialPowers.pushPrefEnv({ - set: [["prompts.windowPromptSubDialog", true]], - }); - is( PanelUI.notificationPanel.state, "closed", diff --git a/browser/components/customizableui/test/browser_panelUINotifications_multiWindow.js b/browser/components/customizableui/test/browser_panelUINotifications_multiWindow.js index fd75763857..edda165692 100644 --- a/browser/components/customizableui/test/browser_panelUINotifications_multiWindow.js +++ b/browser/components/customizableui/test/browser_panelUINotifications_multiWindow.js @@ -15,7 +15,7 @@ add_task(async function testDoesNotShowDoorhangerForBackgroundWindow() { url: "about:blank", }; - await BrowserTestUtils.withNewTab(options, async function (browser) { + await BrowserTestUtils.withNewTab(options, async function () { let win = await BrowserTestUtils.openNewBrowserWindow(); await SimpleTest.promiseFocus(win); let mainActionCalled = false; @@ -95,7 +95,7 @@ add_task( url: "about:blank", }; - await BrowserTestUtils.withNewTab(options, async function (browser) { + await BrowserTestUtils.withNewTab(options, async function () { let win = await BrowserTestUtils.openNewBrowserWindow(); await SimpleTest.promiseFocus(win); AppMenuNotifications.showNotification("update-manual", { callback() {} }); @@ -140,7 +140,7 @@ add_task( url: "about:blank", }; - await BrowserTestUtils.withNewTab(options, async function (browser) { + await BrowserTestUtils.withNewTab(options, async function () { let win = await BrowserTestUtils.openNewBrowserWindow(); await SimpleTest.promiseFocus(win); AppMenuNotifications.showNotification("update-manual", { callback() {} }); diff --git a/browser/components/customizableui/test/browser_switch_to_customize_mode.js b/browser/components/customizableui/test/browser_switch_to_customize_mode.js index 55e80d3517..e3988cb41e 100644 --- a/browser/components/customizableui/test/browser_switch_to_customize_mode.js +++ b/browser/components/customizableui/test/browser_switch_to_customize_mode.js @@ -18,7 +18,7 @@ add_task(async function () { await finishedCustomizing; let startedCount = 0; - let handler = e => startedCount++; + let handler = () => startedCount++; gNavToolbox.addEventListener("customizationstarting", handler); await startCustomizing(); CustomizableUI.removeWidgetFromArea("stop-reload-button"); diff --git a/browser/components/customizableui/test/browser_synced_tabs_menu.js b/browser/components/customizableui/test/browser_synced_tabs_menu.js index ff60167fea..33c8f6a845 100644 --- a/browser/components/customizableui/test/browser_synced_tabs_menu.js +++ b/browser/components/customizableui/test/browser_synced_tabs_menu.js @@ -40,7 +40,7 @@ function updateTabsPanel() { return promiseTabsUpdated; } -// This is the mock we use for SyncedTabs.jsm - tests may override various +// This is the mock we use for SyncedTabs.sys.mjs - tests may override various // functions. let mockedInternal = { get isConfiguredToSyncTabs() { @@ -378,7 +378,7 @@ add_task(async function () { // There is a single node saying there's no tabs for the client. node = node.nextElementSibling; is(node.nodeName, "label", "node is a label"); - is(node.getAttribute("itemtype"), "", "node is neither a tab nor a client"); + is(node.getAttribute("itemtype"), null, "node is neither a tab nor a client"); node = node.nextElementSibling; is(node, null, "no more siblings"); @@ -514,7 +514,7 @@ add_task(async function () { return promise; } - showMoreButton = checkTabsPage(25, "Show More Tabs"); + showMoreButton = checkTabsPage(25, "Show more tabs"); await clickShowMoreButton(); checkTabsPage(77, null); diff --git a/browser/components/customizableui/test/head.js b/browser/components/customizableui/test/head.js index f8c0d02a12..bc1e88ed61 100644 --- a/browser/components/customizableui/test/head.js +++ b/browser/components/customizableui/test/head.js @@ -267,7 +267,7 @@ function openAndLoadWindow(aOptions, aWaitForDelayedStartup = false) { return new Promise(resolve => { let win = OpenBrowserWindow(aOptions); if (aWaitForDelayedStartup) { - Services.obs.addObserver(function onDS(aSubject, aTopic, aData) { + Services.obs.addObserver(function onDS(aSubject) { if (aSubject != win) { return; } @@ -309,7 +309,7 @@ function promisePanelElementShown(win, aPanel) { let timeoutId = win.setTimeout(() => { reject("Panel did not show within 20 seconds."); }, 20000); - function onPanelOpen(e) { + function onPanelOpen() { aPanel.removeEventListener("popupshown", onPanelOpen); win.clearTimeout(timeoutId); resolve(); @@ -328,7 +328,7 @@ function promisePanelElementHidden(win, aPanel) { let timeoutId = win.setTimeout(() => { reject("Panel did not hide within 20 seconds."); }, 20000); - function onPanelClose(e) { + function onPanelClose() { aPanel.removeEventListener("popuphidden", onPanelClose); win.clearTimeout(timeoutId); executeSoon(resolve); @@ -352,7 +352,7 @@ function subviewShown(aSubview) { let timeoutId = win.setTimeout(() => { reject("Subview (" + aSubview.id + ") did not show within 20 seconds."); }, 20000); - function onViewShown(e) { + function onViewShown() { aSubview.removeEventListener("ViewShown", onViewShown); win.clearTimeout(timeoutId); resolve(); @@ -367,7 +367,7 @@ function subviewHidden(aSubview) { let timeoutId = win.setTimeout(() => { reject("Subview (" + aSubview.id + ") did not hide within 20 seconds."); }, 20000); - function onViewHiding(e) { + function onViewHiding() { aSubview.removeEventListener("ViewHiding", onViewHiding); win.clearTimeout(timeoutId); resolve(); @@ -406,7 +406,7 @@ function promiseTabLoadEvent(aTab, aURL) { * @return {Promise} resolved when the requisite mutation shows up. */ function promiseAttributeMutation(aNode, aAttribute, aFilterFn) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { info("waiting for mutation of attribute '" + aAttribute + "'."); let obs = new MutationObserver(mutations => { for (let mut of mutations) { |