diff options
Diffstat (limited to 'browser/components/uitour')
-rw-r--r-- | browser/components/uitour/UITour-lib.js | 2 | ||||
-rw-r--r-- | browser/components/uitour/UITour.sys.mjs | 10 | ||||
-rw-r--r-- | browser/components/uitour/test/browser_UITour.js | 2 | ||||
-rw-r--r-- | browser/components/uitour/test/browser_UITour3.js | 10 | ||||
-rw-r--r-- | browser/components/uitour/test/browser_UITour_defaultBrowser.js | 6 | ||||
-rw-r--r-- | browser/components/uitour/test/browser_UITour_modalDialog.js | 2 | ||||
-rw-r--r-- | browser/components/uitour/test/head.js | 13 |
7 files changed, 19 insertions, 26 deletions
diff --git a/browser/components/uitour/UITour-lib.js b/browser/components/uitour/UITour-lib.js index 0df3059425..a83ec95200 100644 --- a/browser/components/uitour/UITour-lib.js +++ b/browser/components/uitour/UITour-lib.js @@ -9,7 +9,7 @@ if (typeof Mozilla == "undefined") { var Mozilla = {}; } -(function ($) { +(function () { "use strict"; // create namespace diff --git a/browser/components/uitour/UITour.sys.mjs b/browser/components/uitour/UITour.sys.mjs index fef68a5a95..920815fec5 100644 --- a/browser/components/uitour/UITour.sys.mjs +++ b/browser/components/uitour/UITour.sys.mjs @@ -339,7 +339,7 @@ export var UITour = { let callback = buttonData.callbackID; let button = { label: buttonData.label, - callback: event => { + callback: () => { this.sendPageCallback(browser, callback); }, }; @@ -694,7 +694,7 @@ export var UITour = { } }, - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { lazy.log.debug("observe: aTopic =", aTopic); switch (aTopic) { // The browser message manager is disconnected when the <browser> is @@ -918,7 +918,7 @@ export var UITour = { ); }, - getTarget(aWindow, aTargetName, aSticky = false) { + getTarget(aWindow, aTargetName) { lazy.log.debug("getTarget:", aTargetName); if (typeof aTargetName != "string" || !aTargetName) { lazy.log.warn("getTarget: Invalid target name specified"); @@ -1280,7 +1280,7 @@ export var UITour = { tooltipButtons.hidden = !aButtons.length; let tooltipClose = document.getElementById("UITourTooltipClose"); - let closeButtonCallback = event => { + let closeButtonCallback = () => { this.hideInfo(document.defaultView); if (aOptions && aOptions.closeButtonCallback) { aOptions.closeButtonCallback(); @@ -1301,7 +1301,7 @@ export var UITour = { tooltip.addEventListener( "popuphiding", - function (event) { + function () { tooltipClose.removeEventListener("command", closeButtonCallback); if (aOptions.targetCallback && aAnchor.removeTargetListener) { aAnchor.removeTargetListener(document, targetCallback); diff --git a/browser/components/uitour/test/browser_UITour.js b/browser/components/uitour/test/browser_UITour.js index d9e517af1f..c961ab3c0d 100644 --- a/browser/components/uitour/test/browser_UITour.js +++ b/browser/components/uitour/test/browser_UITour.js @@ -323,7 +323,7 @@ var tests = [ () => { highlight.addEventListener( "animationstart", - function (aEvent) { + function () { ok( true, "Animation occurred again even though the effect was the same" diff --git a/browser/components/uitour/test/browser_UITour3.js b/browser/components/uitour/test/browser_UITour3.js index 526994f420..2820fbd020 100644 --- a/browser/components/uitour/test/browser_UITour3.js +++ b/browser/components/uitour/test/browser_UITour3.js @@ -81,7 +81,7 @@ add_UITour_task(async function test_info_buttons_1() { ); is( buttons.children[0].getAttribute("image"), - "", + null, "Text should have no image" ); is(buttons.children[0].className, "", "Text should have no class"); @@ -94,7 +94,7 @@ add_UITour_task(async function test_info_buttons_1() { ); is( buttons.children[1].getAttribute("image"), - "", + null, "Link should have no image" ); is(buttons.children[1].className, "button-link", "Check link class"); @@ -107,7 +107,7 @@ add_UITour_task(async function test_info_buttons_1() { ); is( buttons.children[2].getAttribute("image"), - "", + null, "First button should have no image" ); is(buttons.children[2].className, "", "Button 1 should have no class"); @@ -173,7 +173,7 @@ add_UITour_task(async function test_info_buttons_2() { ); is( buttons.children[1].getAttribute("image"), - "", + null, "Link should have no image" ); ok( @@ -188,7 +188,7 @@ add_UITour_task(async function test_info_buttons_2() { ); is( buttons.children[2].getAttribute("image"), - "", + null, "First button should have no image" ); diff --git a/browser/components/uitour/test/browser_UITour_defaultBrowser.js b/browser/components/uitour/test/browser_UITour_defaultBrowser.js index 721ab2f8c0..a8572e49ab 100644 --- a/browser/components/uitour/test/browser_UITour_defaultBrowser.js +++ b/browser/components/uitour/test/browser_UITour_defaultBrowser.js @@ -12,10 +12,10 @@ Services.scriptloader.loadSubScript( function MockShellService() {} MockShellService.prototype = { QueryInterface: ChromeUtils.generateQI(["nsIShellService"]), - isDefaultBrowser(aStartupCheck, aForAllTypes) { + isDefaultBrowser() { return false; }, - setDefaultBrowser(aForAllUsers) { + setDefaultBrowser() { setDefaultBrowserCalled = true; }, shouldCheckDefaultBrowser: false, @@ -26,7 +26,7 @@ MockShellService.prototype = { BACKGROUND_FILL: 4, BACKGROUND_FIT: 5, BACKGROUND_SPAN: 6, - setDesktopBackground(aElement, aPosition) {}, + setDesktopBackground() {}, desktopBackgroundColor: 0, }; diff --git a/browser/components/uitour/test/browser_UITour_modalDialog.js b/browser/components/uitour/test/browser_UITour_modalDialog.js index a711ee2f2e..5d1e0a5303 100644 --- a/browser/components/uitour/test/browser_UITour_modalDialog.js +++ b/browser/components/uitour/test/browser_UITour_modalDialog.js @@ -39,7 +39,7 @@ var observer = SpecialPowers.wrapCallbackObject({ return this; }, - observe(subject, topic, data) { + observe() { var doc = getDialogDoc(); if (doc) { handleDialog(doc); diff --git a/browser/components/uitour/test/head.js b/browser/components/uitour/test/head.js index 07b941ba1c..6c7ca00d6e 100644 --- a/browser/components/uitour/test/head.js +++ b/browser/components/uitour/test/head.js @@ -194,14 +194,7 @@ function hideInfoPromise(...args) { * function name to call to generate the buttons/options instead of the * buttons/options themselves. This makes the signature differ from the content one. */ -function showInfoPromise( - target, - title, - text, - icon, - buttonsFunctionName, - optionsFunctionName -) { +function showInfoPromise() { let popup = document.getElementById("UITourTooltip"); let shownPromise = promisePanelElementShown(window, popup); return SpecialPowers.spawn(gTestTab.linkedBrowser, [[...arguments]], args => { @@ -271,7 +264,7 @@ function promisePanelElementEvent(win, aPanel, aEvent) { reject(aEvent + " event did not happen within 5 seconds."); }, 5000); - function onPanelEvent(e) { + function onPanelEvent() { aPanel.removeEventListener(aEvent, onPanelEvent); win.clearTimeout(timeoutId); // Wait one tick to let UITour.sys.mjs process the event as well. @@ -321,7 +314,7 @@ async function loadUITourTestPage(callback, host = "https://example.org/") { // return a function which calls the method of the same name on // contentWin.Mozilla.UITour in a ContentTask. let UITourHandler = { - get(target, prop, receiver) { + get(target, prop) { return (...args) => { let browser = gTestTab.linkedBrowser; // We need to proxy any callback functions using messages: |