# HG changeset patch # User J. Ryan Stinnett # Date 1520879078 18000 # Node ID 49cce2c9e2ab21606a9abcdc0ab0af991806957f # Parent da0a84a4deaf1ce1b3b1cb7b093a3050cca13baa Bug 1443081 - Apply spacing via `eslint --fix` for DevTools - part 20. r=jdescottes MozReview-Commit-ID: 2RVNt140Zte diff --git a/devtools/server/tests/browser/animation.html b/devtools/server/tests/browser/animation.html --- a/devtools/server/tests/browser/animation.html +++ b/devtools/server/tests/browser/animation.html @@ -158,13 +158,13 @@
diff --git a/devtools/server/tests/browser/browser_accessibility_node.js b/devtools/server/tests/browser/browser_accessibility_node.js --- a/devtools/server/tests/browser/browser_accessibility_node.js +++ b/devtools/server/tests/browser/browser_accessibility_node.js @@ -1,17 +1,17 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // Checks for the AccessibleActor -add_task(async function () { +add_task(async function() { let {client, walker, accessibility} = await initAccessibilityFrontForUrl(MAIN_DOMAIN + "doc_accessibility.html"); let a11yWalker = await accessibility.getWalker(); await accessibility.enable(); let buttonNode = await walker.querySelector(walker.rootNode, "#button"); let accessibleFront = await a11yWalker.getAccessibleFor(buttonNode); diff --git a/devtools/server/tests/browser/browser_accessibility_node_events.js b/devtools/server/tests/browser/browser_accessibility_node_events.js --- a/devtools/server/tests/browser/browser_accessibility_node_events.js +++ b/devtools/server/tests/browser/browser_accessibility_node_events.js @@ -1,17 +1,17 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // Checks for the AccessibleActor events -add_task(async function () { +add_task(async function() { let {client, walker, accessibility} = await initAccessibilityFrontForUrl(MAIN_DOMAIN + "doc_accessibility.html"); let a11yWalker = await accessibility.getWalker(); await accessibility.enable(); let rootNode = await walker.getRootNode(); let a11yDoc = await a11yWalker.getAccessibleFor(rootNode); let buttonNode = await walker.querySelector(walker.rootNode, "#button"); diff --git a/devtools/server/tests/browser/browser_accessibility_simple.js b/devtools/server/tests/browser/browser_accessibility_simple.js --- a/devtools/server/tests/browser/browser_accessibility_simple.js +++ b/devtools/server/tests/browser/browser_accessibility_simple.js @@ -10,17 +10,17 @@ function checkAccessibilityState(accessi let { enabled, canBeDisabled, canBeEnabled } = accessibility; is(enabled, expected.enabled, "Enabled state is correct."); is(canBeDisabled, expected.canBeDisabled, "canBeDisabled state is correct."); is(canBeEnabled, expected.canBeEnabled, "canBeEnabled state is correct."); } // Simple checks for the AccessibilityActor and AccessibleWalkerActor -add_task(async function () { +add_task(async function() { let { walker: domWalker, client, accessibility} = await initAccessibilityFrontForUrl( "data:text/html;charset=utf-8,test
"); ok(accessibility, "The AccessibilityFront was created"); ok(accessibility.getWalker, "The getWalker method exists"); let a11yWalker = await accessibility.getWalker(); ok(a11yWalker, "The AccessibleWalkerFront was returned"); diff --git a/devtools/server/tests/browser/browser_accessibility_walker.js b/devtools/server/tests/browser/browser_accessibility_walker.js --- a/devtools/server/tests/browser/browser_accessibility_walker.js +++ b/devtools/server/tests/browser/browser_accessibility_walker.js @@ -1,17 +1,17 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // Checks for the AccessibleWalkerActor -add_task(async function () { +add_task(async function() { let {client, walker, accessibility} = await initAccessibilityFrontForUrl(MAIN_DOMAIN + "doc_accessibility.html"); let a11yWalker = await accessibility.getWalker(); ok(a11yWalker, "The AccessibleWalkerFront was returned"); await accessibility.enable(); let rootNode = await walker.getRootNode(); diff --git a/devtools/server/tests/browser/browser_animation_emitMutations.js b/devtools/server/tests/browser/browser_animation_emitMutations.js --- a/devtools/server/tests/browser/browser_animation_emitMutations.js +++ b/devtools/server/tests/browser/browser_animation_emitMutations.js @@ -2,17 +2,17 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Test that the AnimationsActor emits events about changed animations on a // node after getAnimationPlayersForNode was called on that node. -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); info("Retrieve a non-animated node"); let node = await walker.querySelector(walker.rootNode, ".not-animated"); info("Retrieve the animation player for the node"); let players = await animations.getAnimationPlayersForNode(node); diff --git a/devtools/server/tests/browser/browser_animation_getFrames.js b/devtools/server/tests/browser/browser_animation_getFrames.js --- a/devtools/server/tests/browser/browser_animation_getFrames.js +++ b/devtools/server/tests/browser/browser_animation_getFrames.js @@ -2,17 +2,17 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Check that the AnimationPlayerActor exposes a getFrames method that returns // the list of keyframes in the animation. -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); info("Get the test node and its animation front"); let node = await walker.querySelector(walker.rootNode, ".simple-animation"); let [player] = await animations.getAnimationPlayersForNode(node); ok(player.getFrames, "The front has the getFrames method"); diff --git a/devtools/server/tests/browser/browser_animation_getMultipleStates.js b/devtools/server/tests/browser/browser_animation_getMultipleStates.js --- a/devtools/server/tests/browser/browser_animation_getMultipleStates.js +++ b/devtools/server/tests/browser/browser_animation_getMultipleStates.js @@ -2,17 +2,17 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Check that the duration, iterationCount and delay are retrieved correctly for // multiple animations. -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); await playerHasAnInitialState(walker, animations); await client.close(); gBrowser.removeCurrentTab(); }); diff --git a/devtools/server/tests/browser/browser_animation_getPlayers.js b/devtools/server/tests/browser/browser_animation_getPlayers.js --- a/devtools/server/tests/browser/browser_animation_getPlayers.js +++ b/devtools/server/tests/browser/browser_animation_getPlayers.js @@ -1,17 +1,17 @@ /* vim: set ft=javascript ts=2 et sw=2 tw=80: */ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Check the output of getAnimationPlayersForNode -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); await theRightNumberOfPlayersIsReturned(walker, animations); await playersCanBePausedAndResumed(walker, animations); await client.close(); gBrowser.removeCurrentTab(); diff --git a/devtools/server/tests/browser/browser_animation_getProperties.js b/devtools/server/tests/browser/browser_animation_getProperties.js --- a/devtools/server/tests/browser/browser_animation_getProperties.js +++ b/devtools/server/tests/browser/browser_animation_getProperties.js @@ -4,17 +4,17 @@ "use strict"; // Check that the AnimationPlayerActor exposes a getProperties method that // returns the list of animated properties in the animation. const URL = MAIN_DOMAIN + "animation.html"; -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(URL); info("Get the test node and its animation front"); let node = await walker.querySelector(walker.rootNode, ".simple-animation"); let [player] = await animations.getAnimationPlayersForNode(node); ok(player.getProperties, "The front has the getProperties method"); diff --git a/devtools/server/tests/browser/browser_animation_getStateAfterFinished.js b/devtools/server/tests/browser/browser_animation_getStateAfterFinished.js --- a/devtools/server/tests/browser/browser_animation_getStateAfterFinished.js +++ b/devtools/server/tests/browser/browser_animation_getStateAfterFinished.js @@ -6,17 +6,17 @@ "use strict"; // Check that the right duration/iterationCount/delay are retrieved even when // the node has multiple animations and one of them already ended before getting // the player objects. // See devtools/server/actors/animation.js |getPlayerIndex| for more // information. -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); info("Retrieve a non animated node"); let node = await walker.querySelector(walker.rootNode, ".not-animated"); info("Apply the multiple-animations-2 class to start the animations"); await node.modifyAttributes([ diff --git a/devtools/server/tests/browser/browser_animation_getSubTreeAnimations.js b/devtools/server/tests/browser/browser_animation_getSubTreeAnimations.js --- a/devtools/server/tests/browser/browser_animation_getSubTreeAnimations.js +++ b/devtools/server/tests/browser/browser_animation_getSubTreeAnimations.js @@ -4,17 +4,17 @@ "use strict"; // Check that the AnimationsActor can retrieve all animations inside a node's // subtree (but not going into iframes). const URL = MAIN_DOMAIN + "animation.html"; -add_task(async function () { +add_task(async function() { info("Creating a test document with 2 iframes containing animated nodes"); let {client, walker, animations} = await initAnimationsFrontForUrl( "data:text/html;charset=utf-8," + ""); info("Try retrieving all animations from the root doc's node"); let rootBody = await walker.querySelector(walker.rootNode, "body"); diff --git a/devtools/server/tests/browser/browser_animation_keepFinished.js b/devtools/server/tests/browser/browser_animation_keepFinished.js --- a/devtools/server/tests/browser/browser_animation_keepFinished.js +++ b/devtools/server/tests/browser/browser_animation_keepFinished.js @@ -5,17 +5,17 @@ "use strict"; // Test that the AnimationsActor doesn't report finished animations as removed. // Indeed, animations that only have the "finished" playState can be modified // still, so we want the AnimationsActor to preserve the corresponding // AnimationPlayerActor. -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); info("Retrieve a non-animated node"); let node = await walker.querySelector(walker.rootNode, ".not-animated"); info("Retrieve the animation player for the node"); let players = await animations.getAnimationPlayersForNode(node); diff --git a/devtools/server/tests/browser/browser_animation_playPauseIframe.js b/devtools/server/tests/browser/browser_animation_playPauseIframe.js --- a/devtools/server/tests/browser/browser_animation_playPauseIframe.js +++ b/devtools/server/tests/browser/browser_animation_playPauseIframe.js @@ -4,17 +4,17 @@ "use strict"; // Check that the AnimationsActor can pause/play all animations even those // within iframes. const URL = MAIN_DOMAIN + "animation.html"; -add_task(async function () { +add_task(async function() { info("Creating a test document with 2 iframes containing animated nodes"); let {client, walker, animations} = await initAnimationsFrontForUrl( "data:text/html;charset=utf-8," + "" + ""); info("Getting the 2 iframe container nodes and animated nodes in them"); diff --git a/devtools/server/tests/browser/browser_animation_playPauseSeveral.js b/devtools/server/tests/browser/browser_animation_playPauseSeveral.js --- a/devtools/server/tests/browser/browser_animation_playPauseSeveral.js +++ b/devtools/server/tests/browser/browser_animation_playPauseSeveral.js @@ -10,17 +10,17 @@ // List of selectors that match "all" animated nodes in the test page. // This list misses a bunch of animated nodes on purpose. Only the ones that // have infinite animations are listed. This is done to avoid intermittents // caused when finite animations are already done playing by the time the test // runs. const ALL_ANIMATED_NODES = [".simple-animation", ".multiple-animations", ".delayed-animation"]; -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); info("Pause all animations in the test document"); await animations.pauseAll(); await checkStates(walker, animations, ALL_ANIMATED_NODES, "paused"); info("Play all animations in the test document"); diff --git a/devtools/server/tests/browser/browser_animation_playerState.js b/devtools/server/tests/browser/browser_animation_playerState.js --- a/devtools/server/tests/browser/browser_animation_playerState.js +++ b/devtools/server/tests/browser/browser_animation_playerState.js @@ -1,17 +1,17 @@ /* vim: set ft=javascript ts=2 et sw=2 tw=80: */ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Check the animation player's initial state -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); await playerHasAnInitialState(walker, animations); await playerStateIsCorrect(walker, animations); await client.close(); gBrowser.removeCurrentTab(); diff --git a/devtools/server/tests/browser/browser_animation_reconstructState.js b/devtools/server/tests/browser/browser_animation_reconstructState.js --- a/devtools/server/tests/browser/browser_animation_reconstructState.js +++ b/devtools/server/tests/browser/browser_animation_reconstructState.js @@ -2,17 +2,17 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Check that, even though the AnimationPlayerActor only sends the bits of its // state that change, the front reconstructs the whole state everytime. -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); await playerHasCompleteStateAtAllTimes(walker, animations); await client.close(); gBrowser.removeCurrentTab(); }); diff --git a/devtools/server/tests/browser/browser_animation_refreshTransitions.js b/devtools/server/tests/browser/browser_animation_refreshTransitions.js --- a/devtools/server/tests/browser/browser_animation_refreshTransitions.js +++ b/devtools/server/tests/browser/browser_animation_refreshTransitions.js @@ -3,17 +3,17 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // When a transition finishes, no "removed" event is sent because it may still // be used, but when it restarts again (transitions back), then a new // AnimationPlayerFront should be sent, and the old one should be removed. -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); info("Retrieve the test node"); let node = await walker.querySelector(walker.rootNode, ".all-transitions"); info("Retrieve the animation players for the node"); let players = await animations.getAnimationPlayersForNode(node); diff --git a/devtools/server/tests/browser/browser_animation_setCurrentTime.js b/devtools/server/tests/browser/browser_animation_setCurrentTime.js --- a/devtools/server/tests/browser/browser_animation_setCurrentTime.js +++ b/devtools/server/tests/browser/browser_animation_setCurrentTime.js @@ -2,17 +2,17 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Check that a player's currentTime can be changed and that the AnimationsActor // allows changing many players' currentTimes at once. -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); await testSetCurrentTime(walker, animations); await testSetCurrentTimes(walker, animations); await client.close(); gBrowser.removeCurrentTab(); diff --git a/devtools/server/tests/browser/browser_animation_setPlaybackRate.js b/devtools/server/tests/browser/browser_animation_setPlaybackRate.js --- a/devtools/server/tests/browser/browser_animation_setPlaybackRate.js +++ b/devtools/server/tests/browser/browser_animation_setPlaybackRate.js @@ -2,17 +2,17 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Check that a player's playbackRate can be changed, and that multiple players // can have their rates changed at the same time. -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); info("Retrieve an animated node"); let node = await walker.querySelector(walker.rootNode, ".simple-animation"); info("Retrieve the animation player for the node"); let [player] = await animations.getAnimationPlayersForNode(node); diff --git a/devtools/server/tests/browser/browser_animation_simple.js b/devtools/server/tests/browser/browser_animation_simple.js --- a/devtools/server/tests/browser/browser_animation_simple.js +++ b/devtools/server/tests/browser/browser_animation_simple.js @@ -1,17 +1,17 @@ /* vim: set ft=javascript ts=2 et sw=2 tw=80: */ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Simple checks for the AnimationsActor -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl( "data:text/html;charset=utf-8,test
"); ok(animations, "The AnimationsFront was created"); ok(animations.getAnimationPlayersForNode, "The getAnimationPlayersForNode method exists"); ok(animations.toggleAll, "The toggleAll method exists"); ok(animations.playAll, "The playAll method exists"); diff --git a/devtools/server/tests/browser/browser_animation_updatedState.js b/devtools/server/tests/browser/browser_animation_updatedState.js --- a/devtools/server/tests/browser/browser_animation_updatedState.js +++ b/devtools/server/tests/browser/browser_animation_updatedState.js @@ -2,17 +2,17 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ /* eslint-disable mozilla/no-arbitrary-setTimeout */ "use strict"; // Check the animation player's updated state -add_task(async function () { +add_task(async function() { let {client, walker, animations} = await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html"); await playStateIsUpdatedDynamically(walker, animations); await client.close(); gBrowser.removeCurrentTab(); }); diff --git a/devtools/server/tests/browser/browser_canvasframe_helper_01.js b/devtools/server/tests/browser/browser_canvasframe_helper_01.js --- a/devtools/server/tests/browser/browser_canvasframe_helper_01.js +++ b/devtools/server/tests/browser/browser_canvasframe_helper_01.js @@ -3,20 +3,20 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Simple CanvasFrameAnonymousContentHelper tests. const TEST_URL = "data:text/html;charset=utf-8,CanvasFrameAnonymousContentHelper test"; -add_task(async function () { +add_task(async function() { let browser = await addTab(TEST_URL); - await ContentTask.spawn(browser, null, async function () { + await ContentTask.spawn(browser, null, async function() { const {require} = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {}); const {HighlighterEnvironment} = require("devtools/server/actors/highlighters"); const { CanvasFrameAnonymousContentHelper } = require("devtools/server/actors/highlighters/utils/markup"); let doc = content.document; let nodeBuilder = () => { diff --git a/devtools/server/tests/browser/browser_canvasframe_helper_02.js b/devtools/server/tests/browser/browser_canvasframe_helper_02.js --- a/devtools/server/tests/browser/browser_canvasframe_helper_02.js +++ b/devtools/server/tests/browser/browser_canvasframe_helper_02.js @@ -2,20 +2,20 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Test that the CanvasFrameAnonymousContentHelper does not insert content in // XUL windows. -add_task(async function () { +add_task(async function() { let browser = await addTab("about:preferences"); - await ContentTask.spawn(browser, null, async function () { + await ContentTask.spawn(browser, null, async function() { const {require} = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {}); const {HighlighterEnvironment} = require("devtools/server/actors/highlighters"); const { CanvasFrameAnonymousContentHelper } = require("devtools/server/actors/highlighters/utils/markup"); let doc = content.document; let nodeBuilder = () => { diff --git a/devtools/server/tests/browser/browser_canvasframe_helper_03.js b/devtools/server/tests/browser/browser_canvasframe_helper_03.js --- a/devtools/server/tests/browser/browser_canvasframe_helper_03.js +++ b/devtools/server/tests/browser/browser_canvasframe_helper_03.js @@ -3,19 +3,19 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Test the CanvasFrameAnonymousContentHelper event handling mechanism. const TEST_URL = "data:text/html;charset=utf-8,CanvasFrameAnonymousContentHelper test"; -add_task(async function () { +add_task(async function() { let browser = await addTab(TEST_URL); - await ContentTask.spawn(browser, null, async function () { + await ContentTask.spawn(browser, null, async function() { const {require} = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {}); const {HighlighterEnvironment} = require("devtools/server/actors/highlighters"); const { CanvasFrameAnonymousContentHelper } = require("devtools/server/actors/highlighters/utils/markup"); let doc = content.document; let nodeBuilder = () => { diff --git a/devtools/server/tests/browser/browser_canvasframe_helper_04.js b/devtools/server/tests/browser/browser_canvasframe_helper_04.js --- a/devtools/server/tests/browser/browser_canvasframe_helper_04.js +++ b/devtools/server/tests/browser/browser_canvasframe_helper_04.js @@ -7,20 +7,20 @@ // Test the CanvasFrameAnonymousContentHelper re-inserts the content when the // page reloads. const TEST_URL_1 = "data:text/html;charset=utf-8,CanvasFrameAnonymousContentHelper test 1"; const TEST_URL_2 = "data:text/html;charset=utf-8,CanvasFrameAnonymousContentHelper test 2"; -add_task(async function () { +add_task(async function() { let browser = await addTab(TEST_URL_1); await injectEventUtilsInContentTask(browser); - await ContentTask.spawn(browser, TEST_URL_2, async function (url2) { + await ContentTask.spawn(browser, TEST_URL_2, async function(url2) { const {require} = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {}); const {HighlighterEnvironment} = require("devtools/server/actors/highlighters"); const { CanvasFrameAnonymousContentHelper } = require("devtools/server/actors/highlighters/utils/markup"); let doc = content.document; let nodeBuilder = () => { diff --git a/devtools/server/tests/browser/browser_canvasframe_helper_05.js b/devtools/server/tests/browser/browser_canvasframe_helper_05.js --- a/devtools/server/tests/browser/browser_canvasframe_helper_05.js +++ b/devtools/server/tests/browser/browser_canvasframe_helper_05.js @@ -4,19 +4,19 @@ "use strict"; // Test some edge cases of the CanvasFrameAnonymousContentHelper event handling // mechanism. const TEST_URL = "data:text/html;charset=utf-8,CanvasFrameAnonymousContentHelper test"; -add_task(async function () { +add_task(async function() { let browser = await addTab(TEST_URL); - await ContentTask.spawn(browser, null, async function () { + await ContentTask.spawn(browser, null, async function() { const {require} = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {}); const {HighlighterEnvironment} = require("devtools/server/actors/highlighters"); const { CanvasFrameAnonymousContentHelper } = require("devtools/server/actors/highlighters/utils/markup"); let doc = content.document; let nodeBuilder = () => { diff --git a/devtools/server/tests/browser/browser_canvasframe_helper_06.js b/devtools/server/tests/browser/browser_canvasframe_helper_06.js --- a/devtools/server/tests/browser/browser_canvasframe_helper_06.js +++ b/devtools/server/tests/browser/browser_canvasframe_helper_06.js @@ -4,19 +4,19 @@ "use strict"; // Test support for event propagation stop in the // CanvasFrameAnonymousContentHelper event handling mechanism. const TEST_URL = "data:text/html;charset=utf-8,CanvasFrameAnonymousContentHelper test"; -add_task(async function () { +add_task(async function() { let browser = await addTab(TEST_URL); - await ContentTask.spawn(browser, null, async function () { + await ContentTask.spawn(browser, null, async function() { const {require} = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {}); const {HighlighterEnvironment} = require("devtools/server/actors/highlighters"); const { CanvasFrameAnonymousContentHelper } = require("devtools/server/actors/highlighters/utils/markup"); let doc = content.document; let nodeBuilder = () => { diff --git a/devtools/server/tests/browser/browser_layout_getGrids.js b/devtools/server/tests/browser/browser_layout_getGrids.js --- a/devtools/server/tests/browser/browser_layout_getGrids.js +++ b/devtools/server/tests/browser/browser_layout_getGrids.js @@ -102,17 +102,17 @@ const GRID_FRAGMENT_DATA = { start: 100, state: "static", type: "explicit" } ] } }; -add_task(async function () { +add_task(async function() { let { client, walker, layout } = await initLayoutFrontForUrl(MAIN_DOMAIN + "grid.html"); let grids = await layout.getGrids(walker.rootNode); let grid = grids[0]; let { gridFragments } = grid; is(grids.length, 1, "One grid was returned."); is(gridFragments.length, 1, "One grid fragment was returned."); ok(Array.isArray(gridFragments), "An array of grid fragments was returned."); diff --git a/devtools/server/tests/browser/browser_layout_simple.js b/devtools/server/tests/browser/browser_layout_simple.js --- a/devtools/server/tests/browser/browser_layout_simple.js +++ b/devtools/server/tests/browser/browser_layout_simple.js @@ -1,17 +1,17 @@ /* vim: set ft=javascript ts=2 et sw=2 tw=80: */ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Simple checks for the LayoutActor and GridActor -add_task(async function () { +add_task(async function() { let {client, walker, layout} = await initLayoutFrontForUrl( "data:text/html;charset=utf-8,test
"); ok(layout, "The LayoutFront was created"); ok(layout.getGrids, "The getGrids method exists"); let didThrow = false; try { diff --git a/devtools/server/tests/browser/browser_markers-cycle-collection.js b/devtools/server/tests/browser/browser_markers-cycle-collection.js --- a/devtools/server/tests/browser/browser_markers-cycle-collection.js +++ b/devtools/server/tests/browser/browser_markers-cycle-collection.js @@ -4,17 +4,17 @@ /** * Test that we get "nsCycleCollector::Collect" and * "nsCycleCollector::ForgetSkippable" markers when we force cycle collection. */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); -add_task(async function () { +add_task(async function() { // This test runs very slowly on linux32 debug EC2 instances. requestLongerTimeout(2); await addTab(MAIN_DOMAIN + "doc_force_cc.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); diff --git a/devtools/server/tests/browser/browser_markers-docloading-01.js b/devtools/server/tests/browser/browser_markers-docloading-01.js --- a/devtools/server/tests/browser/browser_markers-docloading-01.js +++ b/devtools/server/tests/browser/browser_markers-docloading-01.js @@ -4,17 +4,17 @@ /** * Test that we get DOMContentLoaded and Load markers */ "use strict"; const { TimelineFront } = require("devtools/shared/fronts/timeline"); const MARKER_NAMES = ["document::DOMContentLoaded", "document::Load"]; -add_task(async function () { +add_task(async function() { let browser = await addTab(MAIN_DOMAIN + "doc_innerHTML.html"); // eslint-disable-next-line mozilla/no-cpows-in-tests let doc = browser.contentDocument; initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = TimelineFront(client, form); diff --git a/devtools/server/tests/browser/browser_markers-docloading-02.js b/devtools/server/tests/browser/browser_markers-docloading-02.js --- a/devtools/server/tests/browser/browser_markers-docloading-02.js +++ b/devtools/server/tests/browser/browser_markers-docloading-02.js @@ -4,17 +4,17 @@ /** * Test that we get DOMContentLoaded and Load markers */ "use strict"; const { TimelineFront } = require("devtools/shared/fronts/timeline"); const MARKER_NAMES = ["document::DOMContentLoaded", "document::Load"]; -add_task(async function () { +add_task(async function() { let browser = await addTab(MAIN_DOMAIN + "doc_innerHTML.html"); // eslint-disable-next-line mozilla/no-cpows-in-tests let doc = browser.contentDocument; initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = TimelineFront(client, form); diff --git a/devtools/server/tests/browser/browser_markers-docloading-03.js b/devtools/server/tests/browser/browser_markers-docloading-03.js --- a/devtools/server/tests/browser/browser_markers-docloading-03.js +++ b/devtools/server/tests/browser/browser_markers-docloading-03.js @@ -4,17 +4,17 @@ /** * Test that we get DOMContentLoaded and Load markers */ "use strict"; const { TimelineFront } = require("devtools/shared/fronts/timeline"); const MARKER_NAMES = ["document::DOMContentLoaded", "document::Load"]; -add_task(async function () { +add_task(async function() { let browser = await addTab(MAIN_DOMAIN + "doc_innerHTML.html"); // eslint-disable-next-line mozilla/no-cpows-in-tests let doc = browser.contentDocument; initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = TimelineFront(client, form); diff --git a/devtools/server/tests/browser/browser_markers-gc.js b/devtools/server/tests/browser/browser_markers-gc.js --- a/devtools/server/tests/browser/browser_markers-gc.js +++ b/devtools/server/tests/browser/browser_markers-gc.js @@ -4,17 +4,17 @@ /** * Test that we get "GarbageCollection" markers. */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); const MARKER_NAME = "GarbageCollection"; -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "doc_force_gc.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = PerformanceFront(client, form); await front.connect(); let rec = await front.startRecording({ withMarkers: true }); diff --git a/devtools/server/tests/browser/browser_markers-minor-gc.js b/devtools/server/tests/browser/browser_markers-minor-gc.js --- a/devtools/server/tests/browser/browser_markers-minor-gc.js +++ b/devtools/server/tests/browser/browser_markers-minor-gc.js @@ -4,17 +4,17 @@ /** * Test that we get "MinorGC" markers when we continue to steadily allocate * objects. */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); -add_task(async function () { +add_task(async function() { // This test runs very slowly on linux32 debug EC2 instances. requestLongerTimeout(2); await addTab(MAIN_DOMAIN + "doc_allocations.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); diff --git a/devtools/server/tests/browser/browser_markers-parse-html.js b/devtools/server/tests/browser/browser_markers-parse-html.js --- a/devtools/server/tests/browser/browser_markers-parse-html.js +++ b/devtools/server/tests/browser/browser_markers-parse-html.js @@ -4,17 +4,17 @@ /** * Test that we get "Parse HTML" markers. */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); const MARKER_NAME = "Parse HTML"; -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "doc_innerHTML.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = PerformanceFront(client, form); await front.connect(); let rec = await front.startRecording({ withMarkers: true }); diff --git a/devtools/server/tests/browser/browser_markers-styles.js b/devtools/server/tests/browser/browser_markers-styles.js --- a/devtools/server/tests/browser/browser_markers-styles.js +++ b/devtools/server/tests/browser/browser_markers-styles.js @@ -4,17 +4,17 @@ /** * Test that we get "Styles" markers with correct meta. */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); const MARKER_NAME = "Styles"; -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "doc_perf.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = PerformanceFront(client, form); await front.connect(); let rec = await front.startRecording({ withMarkers: true }); diff --git a/devtools/server/tests/browser/browser_markers-timestamp.js b/devtools/server/tests/browser/browser_markers-timestamp.js --- a/devtools/server/tests/browser/browser_markers-timestamp.js +++ b/devtools/server/tests/browser/browser_markers-timestamp.js @@ -6,17 +6,17 @@ */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); const { pmmConsoleMethod, pmmLoadFrameScripts, pmmClearFrameScripts } = require("devtools/client/performance/test/helpers/profiler-mm-utils"); const MARKER_NAME = "TimeStamp"; -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "doc_perf.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = PerformanceFront(client, form); await front.connect(); let rec = await front.startRecording({ withMarkers: true }); diff --git a/devtools/server/tests/browser/browser_navigateEvents.js b/devtools/server/tests/browser/browser_navigateEvents.js --- a/devtools/server/tests/browser/browser_navigateEvents.js +++ b/devtools/server/tests/browser/browser_navigateEvents.js @@ -67,26 +67,26 @@ function assertEvent(event, data) { is(data.nativeConsoleAPI, true, "nativeConsoleAPI is correct"); signalAllEventsReceived(); break; } } function waitForOnBeforeUnloadDialog(browser, callback) { - browser.addEventListener("DOMWillOpenModalDialog", async function (event) { + browser.addEventListener("DOMWillOpenModalDialog", async function(event) { let stack = browser.parentNode; let dialogs = stack.getElementsByTagName("tabmodalprompt"); await waitUntil(() => dialogs[0]); let {button0, button1} = dialogs[0].ui; callback(button0, button1); }, {capture: true, once: true}); } -var httpObserver = function (subject, topic, state) { +var httpObserver = function(subject, topic, state) { let channel = subject.QueryInterface(Ci.nsIHttpChannel); let url = channel.URI.spec; // Only listen for our document request, as many other requests can happen if (url == URL1 || url == URL2) { assertEvent("request", url); } }; Services.obs.addObserver(httpObserver, "http-on-modify-request"); @@ -97,68 +97,68 @@ function onMessage({ data }) { async function connectAndAttachTab() { // Ensure having a minimal server initDebuggerServer(); // Connect to this tab let transport = DebuggerServer.connectPipe(); let client = new DebuggerClient(transport); - client.addListener("tabNavigated", function (event, packet) { + client.addListener("tabNavigated", function(event, packet) { assertEvent("tabNavigated", packet); }); let form = await connectDebuggerClient(client); let actorID = form.actor; await client.attachTab(actorID); return { client, actorID }; } -add_task(async function () { +add_task(async function() { // Open a test tab let browser = await addTab(URL1); // Listen for alert() call being made in navigate-first during unload - waitForOnBeforeUnloadDialog(browser, function (btnLeave, btnStay) { + waitForOnBeforeUnloadDialog(browser, function(btnLeave, btnStay) { assertEvent("unload-dialog"); // accept to quit this page to another btnLeave.click(); }); // Listen for messages sent by the content task browser.messageManager.addMessageListener("devtools-test:event", onMessage); let { client, actorID } = await connectAndAttachTab(); - await ContentTask.spawn(browser, [actorID], async function (actorId) { + await ContentTask.spawn(browser, [actorID], async function(actorId) { const { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {}); const { DebuggerServer } = require("devtools/server/main"); const EventEmitter = require("devtools/shared/event-emitter"); // !Hack! Retrieve a server side object, the BrowserTabActor instance let tabActor = DebuggerServer.searchAllConnectionsForActor(actorId); // In order to listen to internal will-navigate/navigate events - EventEmitter.on(tabActor, "will-navigate", function (data) { + EventEmitter.on(tabActor, "will-navigate", function(data) { sendSyncMessage("devtools-test:event", { event: "will-navigate", data: { newURI: data.newURI } }); }); - EventEmitter.on(tabActor, "navigate", function (data) { + EventEmitter.on(tabActor, "navigate", function(data) { sendSyncMessage("devtools-test:event", { event: "navigate", data: { readyState: content.document.readyState } }); }); // Forward DOMContentLoaded and load events - addEventListener("DOMContentLoaded", function () { + addEventListener("DOMContentLoaded", function() { sendSyncMessage("devtools-test:event", { event: "DOMContentLoaded", data: { readyState: content.document.readyState } }); }, { capture: true }); - addEventListener("load", function () { + addEventListener("load", function() { sendSyncMessage("devtools-test:event", { event: "load", data: { readyState: content.document.readyState } }); }, { capture: true }); }); // Load another document in this doc to dispatch these events diff --git a/devtools/server/tests/browser/browser_perf-01.js b/devtools/server/tests/browser/browser_perf-01.js --- a/devtools/server/tests/browser/browser_perf-01.js +++ b/devtools/server/tests/browser/browser_perf-01.js @@ -1,17 +1,17 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; /** * Run through a series of basic recording actions for the perf actor. */ -add_task(async function () { +add_task(async function() { const {front, client} = await initPerfFront(); // Assert the initial state. is(await front.isSupportedPlatform(), true, "This test only runs on supported platforms."); is(await front.isLockedForPrivateBrowsing(), false, "The browser is not in private browsing mode."); is(await front.isActive(), false, diff --git a/devtools/server/tests/browser/browser_perf-02.js b/devtools/server/tests/browser/browser_perf-02.js --- a/devtools/server/tests/browser/browser_perf-02.js +++ b/devtools/server/tests/browser/browser_perf-02.js @@ -1,17 +1,17 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; /** * Test what happens when other tools control the profiler. */ -add_task(async function () { +add_task(async function() { const {front, client} = await initPerfFront(); // Simulate other tools by getting an independent handle on the Gecko Profiler. // eslint-disable-next-line mozilla/use-services const geckoProfiler = Cc["@mozilla.org/tools/profiler;1"].getService(Ci.nsIProfiler); is(await front.isActive(), false, "The profiler hasn't been started yet."); diff --git a/devtools/server/tests/browser/browser_perf-03.js b/devtools/server/tests/browser/browser_perf-03.js --- a/devtools/server/tests/browser/browser_perf-03.js +++ b/devtools/server/tests/browser/browser_perf-03.js @@ -2,17 +2,17 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; /** * Test that the profiler emits events when private browsing windows are opened * and closed. */ -add_task(async function () { +add_task(async function() { const {front, client} = await initPerfFront(); is(await front.isLockedForPrivateBrowsing(), false, "The profiler is not locked for private browsing."); // Open up a new private browser window, and assert the correct events are fired. const profilerLocked = once(front, "profile-locked-by-private-browsing"); const privateWindow = await BrowserTestUtils.openNewBrowserWindow({private: true}); diff --git a/devtools/server/tests/browser/browser_perf-allocation-data.js b/devtools/server/tests/browser/browser_perf-allocation-data.js --- a/devtools/server/tests/browser/browser_perf-allocation-data.js +++ b/devtools/server/tests/browser/browser_perf-allocation-data.js @@ -4,17 +4,17 @@ /** * Test that we have allocation data coming from the front. */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "doc_allocations.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = PerformanceFront(client, form); await front.connect(); diff --git a/devtools/server/tests/browser/browser_perf-profiler-01.js b/devtools/server/tests/browser/browser_perf-profiler-01.js --- a/devtools/server/tests/browser/browser_perf-profiler-01.js +++ b/devtools/server/tests/browser/browser_perf-profiler-01.js @@ -7,17 +7,17 @@ * a recording is stopped. */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); const { pmmIsProfilerActive, pmmLoadFrameScripts } = require("devtools/client/performance/test/helpers/profiler-mm-utils"); -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "doc_perf.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = PerformanceFront(client, form); await front.connect(); diff --git a/devtools/server/tests/browser/browser_perf-profiler-02.js b/devtools/server/tests/browser/browser_perf-profiler-02.js --- a/devtools/server/tests/browser/browser_perf-profiler-02.js +++ b/devtools/server/tests/browser/browser_perf-profiler-02.js @@ -6,17 +6,17 @@ * is destroyed if there are other consumers using it. */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); const { pmmIsProfilerActive, pmmLoadFrameScripts } = require("devtools/client/performance/test/helpers/profiler-mm-utils"); -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "doc_perf.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let firstFront = PerformanceFront(client, form); await firstFront.connect(); pmmLoadFrameScripts(gBrowser); diff --git a/devtools/server/tests/browser/browser_perf-profiler-03.js b/devtools/server/tests/browser/browser_perf-profiler-03.js --- a/devtools/server/tests/browser/browser_perf-profiler-03.js +++ b/devtools/server/tests/browser/browser_perf-profiler-03.js @@ -8,17 +8,17 @@ * addon was installed and automatically activated the profiler module). */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); const { pmmIsProfilerActive, pmmStartProfiler, pmmLoadFrameScripts, pmmClearFrameScripts } = require("devtools/client/performance/test/helpers/profiler-mm-utils"); -add_task(async function () { +add_task(async function() { // Ensure the profiler is already running when the test starts. pmmLoadFrameScripts(gBrowser); let entries = 1000000; let interval = 1; let features = ["js"]; await pmmStartProfiler({ entries, interval, features }); ok((await pmmIsProfilerActive()), diff --git a/devtools/server/tests/browser/browser_perf-realtime-markers.js b/devtools/server/tests/browser/browser_perf-realtime-markers.js --- a/devtools/server/tests/browser/browser_perf-realtime-markers.js +++ b/devtools/server/tests/browser/browser_perf-realtime-markers.js @@ -4,17 +4,17 @@ /** * Test functionality of real time markers. */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "doc_perf.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = PerformanceFront(client, form); await front.connect(); diff --git a/devtools/server/tests/browser/browser_perf-recording-actor-01.js b/devtools/server/tests/browser/browser_perf-recording-actor-01.js --- a/devtools/server/tests/browser/browser_perf-recording-actor-01.js +++ b/devtools/server/tests/browser/browser_perf-recording-actor-01.js @@ -5,17 +5,17 @@ * Tests the state of a recording rec from start to finish for recording, * completed, and rec data. */ "use strict"; const { PerformanceFront } = require("devtools/shared/fronts/performance"); -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "doc_perf.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = PerformanceFront(client, form); await front.connect(); diff --git a/devtools/server/tests/browser/browser_perf-recording-actor-02.js b/devtools/server/tests/browser/browser_perf-recording-actor-02.js --- a/devtools/server/tests/browser/browser_perf-recording-actor-02.js +++ b/devtools/server/tests/browser/browser_perf-recording-actor-02.js @@ -7,17 +7,17 @@ "use strict"; var BUFFER_SIZE = 20000; var config = { bufferSize: BUFFER_SIZE }; const { PerformanceFront } = require("devtools/shared/fronts/performance"); -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "doc_perf.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = PerformanceFront(client, form); await front.connect(); diff --git a/devtools/server/tests/browser/browser_perf-samples-01.js b/devtools/server/tests/browser/browser_perf-samples-01.js --- a/devtools/server/tests/browser/browser_perf-samples-01.js +++ b/devtools/server/tests/browser/browser_perf-samples-01.js @@ -8,17 +8,17 @@ "use strict"; // time in ms const WAIT_TIME = 1000; const { PerformanceFront } = require("devtools/shared/fronts/performance"); -add_task(async function () { +add_task(async function() { await SpecialPowers.pushPrefEnv({"set": [["privacy.reduceTimerPrecision", false]]}); await addTab(MAIN_DOMAIN + "doc_perf.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = PerformanceFront(client, form); await front.connect(); diff --git a/devtools/server/tests/browser/browser_perf-samples-02.js b/devtools/server/tests/browser/browser_perf-samples-02.js --- a/devtools/server/tests/browser/browser_perf-samples-02.js +++ b/devtools/server/tests/browser/browser_perf-samples-02.js @@ -9,17 +9,17 @@ "use strict"; // Time in ms const WAIT_TIME = 1000; const { PerformanceFront } = require("devtools/shared/fronts/performance"); -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "doc_perf.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = PerformanceFront(client, form); await front.connect(); diff --git a/devtools/server/tests/browser/browser_register_actor.js b/devtools/server/tests/browser/browser_register_actor.js --- a/devtools/server/tests/browser/browser_register_actor.js +++ b/devtools/server/tests/browser/browser_register_actor.js @@ -46,17 +46,17 @@ function cleanupActor(actorFront) { function getCount(actor, callback) { return gClient.request({ to: actor, type: "count" }, callback); } -var checkActorState = async function (helloActor, callback) { +var checkActorState = async function(helloActor, callback) { let response = await getCount(helloActor); ok(!response.error, "No error"); is(response.count, 1, "The counter must be valid"); response = await getCount(helloActor); ok(!response.error, "No error"); is(response.count, 2, "The counter must be valid"); diff --git a/devtools/server/tests/browser/browser_storage_cookies-duplicate-names.js b/devtools/server/tests/browser/browser_storage_cookies-duplicate-names.js --- a/devtools/server/tests/browser/browser_storage_cookies-duplicate-names.js +++ b/devtools/server/tests/browser/browser_storage_cookies-duplicate-names.js @@ -37,17 +37,17 @@ const TESTDATA = { path: "/path3/", host: "test1.example.org", isDomain: false, isSecure: false, } ] }; -add_task(async function () { +add_task(async function() { await openTabAndSetupStorage(MAIN_DOMAIN + "storage-cookies-same-name.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = StorageFront(client, form); let data = await front.listStores(); @@ -65,17 +65,17 @@ add_task(async function () { }); function testCookies(cookiesActor) { let numHosts = Object.keys(cookiesActor.hosts).length; is(numHosts, 1, "Correct number of host entries for cookies"); return testCookiesObjects(0, cookiesActor.hosts, cookiesActor); } -var testCookiesObjects = async function (index, hosts, cookiesActor) { +var testCookiesObjects = async function(index, hosts, cookiesActor) { let host = Object.keys(hosts)[index]; let matchItems = data => { is(data.total, TESTDATA[host].length, "Number of cookies in host " + host + " matches"); for (let item of data.data) { let found = false; for (let toMatch of TESTDATA[host]) { if (item.name === toMatch.name && diff --git a/devtools/server/tests/browser/browser_storage_dynamic_windows.js b/devtools/server/tests/browser/browser_storage_dynamic_windows.js --- a/devtools/server/tests/browser/browser_storage_dynamic_windows.js +++ b/devtools/server/tests/browser/browser_storage_dynamic_windows.js @@ -237,17 +237,17 @@ function testRemoveIframe(front) { iframe.remove(); break; } } }); }); } -add_task(async function () { +add_task(async function() { await openTabAndSetupStorage(MAIN_DOMAIN + "storage-dynamic-windows.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = StorageFront(client, form); let data = await front.listStores(); await testStores(data, front); diff --git a/devtools/server/tests/browser/browser_storage_listings.js b/devtools/server/tests/browser/browser_storage_listings.js --- a/devtools/server/tests/browser/browser_storage_listings.js +++ b/devtools/server/tests/browser/browser_storage_listings.js @@ -343,17 +343,17 @@ async function testStores(data) { } function testCookies(cookiesActor) { is(Object.keys(cookiesActor.hosts).length, 3, "Correct number of host entries for cookies"); return testCookiesObjects(0, cookiesActor.hosts, cookiesActor); } -var testCookiesObjects = async function (index, hosts, cookiesActor) { +var testCookiesObjects = async function(index, hosts, cookiesActor) { let host = Object.keys(hosts)[index]; let matchItems = data => { let cookiesLength = 0; for (let secureCookie of storeMap.cookies[host]) { if (secureCookie.isSecure) { ++cookiesLength; } } @@ -388,17 +388,17 @@ var testCookiesObjects = async function }; function testLocalStorage(localStorageActor) { is(Object.keys(localStorageActor.hosts).length, 3, "Correct number of host entries for local storage"); return testLocalStorageObjects(0, localStorageActor.hosts, localStorageActor); } -var testLocalStorageObjects = async function (index, hosts, localStorageActor) { +var testLocalStorageObjects = async function(index, hosts, localStorageActor) { let host = Object.keys(hosts)[index]; let matchItems = data => { is(data.total, storeMap.localStorage[host].length, "Number of local storage items in host " + host + " matches"); for (let item of data.data) { let found = false; for (let toMatch of storeMap.localStorage[host]) { if (item.name == toMatch.name) { @@ -422,17 +422,17 @@ var testLocalStorageObjects = async func function testSessionStorage(sessionStorageActor) { is(Object.keys(sessionStorageActor.hosts).length, 3, "Correct number of host entries for session storage"); return testSessionStorageObjects(0, sessionStorageActor.hosts, sessionStorageActor); } -var testSessionStorageObjects = async function (index, hosts, sessionStorageActor) { +var testSessionStorageObjects = async function(index, hosts, sessionStorageActor) { let host = Object.keys(hosts)[index]; let matchItems = data => { is(data.total, storeMap.sessionStorage[host].length, "Number of session storage items in host " + host + " matches"); for (let item of data.data) { let found = false; for (let toMatch of storeMap.sessionStorage[host]) { if (item.name == toMatch.name) { @@ -449,17 +449,17 @@ var testSessionStorageObjects = async fu ok(!!storeMap.sessionStorage[host], "Host is present in the list : " + host); matchItems(await sessionStorageActor.getStoreObjects(host)); if (index == Object.keys(hosts).length - 1) { return; } await testSessionStorageObjects(++index, hosts, sessionStorageActor); }; -var testIndexedDB = async function (indexedDBActor) { +var testIndexedDB = async function(indexedDBActor) { is(Object.keys(indexedDBActor.hosts).length, 3, "Correct number of host entries for indexed db"); for (let host in indexedDBActor.hosts) { for (let item of indexedDBActor.hosts[host]) { let parsedItem = JSON.parse(item); let found = false; for (let toMatch of IDBValues.listStoresResponse[host]) { @@ -472,17 +472,17 @@ var testIndexedDB = async function (inde } } await testIndexedDBs(0, indexedDBActor.hosts, indexedDBActor); await testObjectStores(0, indexedDBActor.hosts, indexedDBActor); await testIDBEntries(0, indexedDBActor.hosts, indexedDBActor); }; -var testIndexedDBs = async function (index, hosts, indexedDBActor) { +var testIndexedDBs = async function(index, hosts, indexedDBActor) { let host = Object.keys(hosts)[index]; let matchItems = data => { is(data.total, IDBValues.dbDetails[host].length, "Number of indexed db in host " + host + " matches"); for (let item of data.data) { let found = false; for (let toMatch of IDBValues.dbDetails[host]) { if (item.uniqueKey == toMatch.db) { @@ -502,17 +502,17 @@ var testIndexedDBs = async function (ind ok(!!IDBValues.dbDetails[host], "Host is present in the list : " + host); matchItems(await indexedDBActor.getStoreObjects(host)); if (index == Object.keys(hosts).length - 1) { return; } await testIndexedDBs(++index, hosts, indexedDBActor); }; -var testObjectStores = async function (ix, hosts, indexedDBActor) { +var testObjectStores = async function(ix, hosts, indexedDBActor) { let host = Object.keys(hosts)[ix]; let matchItems = (data, db) => { is(data.total, IDBValues.objectStoreDetails[host][db].length, "Number of object stores in host " + host + " matches"); for (let item of data.data) { let found = false; for (let toMatch of IDBValues.objectStoreDetails[host][db]) { if (item.objectStore == toMatch.objectStore) { @@ -553,17 +553,17 @@ var testObjectStores = async function (i ), objName[0]); } if (ix == Object.keys(hosts).length - 1) { return; } await testObjectStores(++ix, hosts, indexedDBActor); }; -var testIDBEntries = async function (index, hosts, indexedDBActor) { +var testIDBEntries = async function(index, hosts, indexedDBActor) { let host = Object.keys(hosts)[index]; let matchItems = (data, obj) => { is(data.total, IDBValues.entries[host][obj].length, "Number of items in object store " + obj + " matches"); for (let item of data.data) { let found = false; for (let toMatch of IDBValues.entries[host][obj]) { if (item.name == toMatch.name) { @@ -591,17 +591,17 @@ var testIDBEntries = async function (ind ), parsed[0] + "#" + parsed[1]); } if (index == Object.keys(hosts).length - 1) { return; } await testObjectStores(++index, hosts, indexedDBActor); }; -add_task(async function () { +add_task(async function() { await openTabAndSetupStorage(MAIN_DOMAIN + "storage-listings.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = StorageFront(client, form); let data = await front.listStores(); await testStores(data); diff --git a/devtools/server/tests/browser/browser_storage_updates.js b/devtools/server/tests/browser/browser_storage_updates.js --- a/devtools/server/tests/browser/browser_storage_updates.js +++ b/devtools/server/tests/browser/browser_storage_updates.js @@ -4,17 +4,17 @@ "use strict"; const {StorageFront} = require("devtools/shared/fronts/storage"); const TESTS = [ // index 0 { - action: function (win) { + action: function(win) { info('win.addCookie("c1", "foobar1")'); win.addCookie("c1", "foobar1"); info('win.addCookie("c2", "foobar2")'); win.addCookie("c2", "foobar2"); info('win.localStorage.setItem("l1", "foobar1")'); win.localStorage.setItem("l1", "foobar1"); @@ -33,17 +33,17 @@ const TESTS = [ "http://test1.example.org": ["l1"] } } } }, // index 1 { - action: function (win) { + action: function(win) { info('win.addCookie("c1", "new_foobar1")'); win.addCookie("c1", "new_foobar1"); info('win.localStorage.setItem("l2", "foobar2")'); win.localStorage.setItem("l2", "foobar2"); }, expected: { changed: { @@ -59,17 +59,17 @@ const TESTS = [ "http://test1.example.org": ["l2"] } } } }, // index 2 { - action: function (win) { + action: function(win) { info('win.removeCookie("c2")'); win.removeCookie("c2"); info('win.localStorage.removeItem("l1")'); win.localStorage.removeItem("l1"); info('win.localStorage.setItem("l3", "foobar3")'); win.localStorage.setItem("l3", "foobar3"); @@ -91,17 +91,17 @@ const TESTS = [ "http://test1.example.org": ["l3"] } } } }, // index 3 { - action: function (win) { + action: function(win) { info('win.removeCookie("c1")'); win.removeCookie("c1"); info('win.addCookie("c3", "foobar3")'); win.addCookie("c3", "foobar3"); info('win.localStorage.removeItem("l2")'); win.localStorage.removeItem("l2"); @@ -143,32 +143,32 @@ const TESTS = [ "http://test1.example.org": ["l2"] } } } }, // index 4 { - action: function (win) { + action: function(win) { info('win.sessionStorage.removeItem("s1")'); win.sessionStorage.removeItem("s1"); }, expected: { deleted: { sessionStorage: { "http://test1.example.org": ["s1"] } } } }, // index 5 { - action: function (win) { + action: function(win) { info("win.clearCookies()"); win.clearCookies(); }, expected: { deleted: { cookies: { "http://test1.example.org": [ getCookieId("c3", "test1.example.org", @@ -237,17 +237,17 @@ function onStoresUpdate(expected, {added info("Everything expected has been received for index " + index); } else { info("Still some updates pending for index " + index); } } function runTest({action, expected}, front, win, index) { return new Promise(resolve => { - front.once("stores-update", function (addedChangedDeleted) { + front.once("stores-update", function(addedChangedDeleted) { onStoresUpdate(expected, addedChangedDeleted, index); resolve(); }); info("Running test at index " + index); action(win); }); } @@ -291,17 +291,17 @@ function storesCleared(data) { } async function finishTests(client) { await client.close(); DebuggerServer.destroy(); finish(); } -add_task(async function () { +add_task(async function() { let browser = await addTab(MAIN_DOMAIN + "storage-updates.html"); // eslint-disable-next-line mozilla/no-cpows-in-tests let doc = browser.contentDocument; initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); diff --git a/devtools/server/tests/browser/browser_stylesheets_getTextEmpty.js b/devtools/server/tests/browser/browser_stylesheets_getTextEmpty.js --- a/devtools/server/tests/browser/browser_stylesheets_getTextEmpty.js +++ b/devtools/server/tests/browser/browser_stylesheets_getTextEmpty.js @@ -6,17 +6,17 @@ // Test that StyleSheetActor.getText handles empty text correctly. const {StyleSheetsFront} = require("devtools/shared/fronts/stylesheets"); const CONTENT = ""; const TEST_URI = "data:text/html;charset=utf-8," + encodeURIComponent(CONTENT); -add_task(async function () { +add_task(async function() { await addTab(TEST_URI); info("Initialising the debugger server and client."); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); info("Attaching to the active tab."); diff --git a/devtools/server/tests/browser/browser_stylesheets_nested-iframes.js b/devtools/server/tests/browser/browser_stylesheets_nested-iframes.js --- a/devtools/server/tests/browser/browser_stylesheets_nested-iframes.js +++ b/devtools/server/tests/browser/browser_stylesheets_nested-iframes.js @@ -4,17 +4,17 @@ "use strict"; // Test that StyleSheetsActor.getStyleSheets() works if an iframe does not have // a content document. const {StyleSheetsFront} = require("devtools/shared/fronts/stylesheets"); -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "stylesheets-nested-iframes.html"); info("Initialising the debugger server and client."); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); info("Attaching to the active tab."); diff --git a/devtools/server/tests/browser/browser_timeline.js b/devtools/server/tests/browser/browser_timeline.js --- a/devtools/server/tests/browser/browser_timeline.js +++ b/devtools/server/tests/browser/browser_timeline.js @@ -7,17 +7,17 @@ // Test that the timeline front's start/stop/isRecording methods work in a // simple use case, and that markers events are sent when operations occur. // Note that this test isn't concerned with which markers are actually recorded, // just that markers are recorded at all. // Trying to check marker types here may lead to intermittents, see bug 1066474. const {TimelineFront} = require("devtools/shared/fronts/timeline"); -add_task(async function () { +add_task(async function() { await addTab("data:text/html;charset=utf-8,mop"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = TimelineFront(client, form); ok(front, "The TimelineFront was created"); diff --git a/devtools/server/tests/browser/browser_timeline_actors.js b/devtools/server/tests/browser/browser_timeline_actors.js --- a/devtools/server/tests/browser/browser_timeline_actors.js +++ b/devtools/server/tests/browser/browser_timeline_actors.js @@ -5,17 +5,17 @@ "use strict"; // Test that the timeline can also record data from the memory and framerate // actors, emitted as events in tadem with the markers. const {TimelineFront} = require("devtools/shared/fronts/timeline"); -add_task(async function () { +add_task(async function() { await addTab("data:text/html;charset=utf-8,mop"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = TimelineFront(client, form); info("Start timeline marker recording"); @@ -58,12 +58,12 @@ add_task(async function () { * @param number interval [optional] * How often the predicate is invoked, in milliseconds. */ function waitUntil(predicate, interval = 10) { if (predicate()) { return Promise.resolve(true); } return new Promise(resolve => - setTimeout(function () { + setTimeout(function() { waitUntil(predicate).then(() => resolve(true)); }, interval)); } diff --git a/devtools/server/tests/browser/browser_timeline_iframes.js b/devtools/server/tests/browser/browser_timeline_iframes.js --- a/devtools/server/tests/browser/browser_timeline_iframes.js +++ b/devtools/server/tests/browser/browser_timeline_iframes.js @@ -5,17 +5,17 @@ "use strict"; // Test the timeline front receives markers events for operations that occur in // iframes. const {TimelineFront} = require("devtools/shared/fronts/timeline"); -add_task(async function () { +add_task(async function() { await addTab(MAIN_DOMAIN + "timeline-iframe-parent.html"); initDebuggerServer(); let client = new DebuggerClient(DebuggerServer.connectPipe()); let form = await connectDebuggerClient(client); let front = TimelineFront(client, form); info("Start timeline marker recording"); diff --git a/devtools/server/tests/browser/browser_webextension_inspected_window.js b/devtools/server/tests/browser/browser_webextension_inspected_window.js --- a/devtools/server/tests/browser/browser_webextension_inspected_window.js +++ b/devtools/server/tests/browser/browser_webextension_inspected_window.js @@ -57,17 +57,17 @@ function consoleEvalJS(consoleClient, js return new Promise(resolve => { consoleClient.evaluateJS(jsCode, resolve); }); } // Script used as the injectedScript option in the inspectedWindow.reload tests. function injectedScript() { if (!window.pageScriptExecutedFirst) { - window.addEventListener("DOMContentLoaded", function () { + window.addEventListener("DOMContentLoaded", function() { if (document.querySelector("pre")) { document.querySelector("pre").textContent = "injected script executed first"; } }, {once: true}); } } // Script evaluated in the target tab, to collect the results of injectedScript diff --git a/devtools/server/tests/browser/director-script-target.html b/devtools/server/tests/browser/director-script-target.html --- a/devtools/server/tests/browser/director-script-target.html +++ b/devtools/server/tests/browser/director-script-target.html @@ -1,17 +1,17 @@

debug script target

diff --git a/devtools/server/tests/browser/doc_allocations.html b/devtools/server/tests/browser/doc_allocations.html --- a/devtools/server/tests/browser/doc_allocations.html +++ b/devtools/server/tests/browser/doc_allocations.html @@ -3,17 +3,17 @@ diff --git a/devtools/server/tests/browser/head.js b/devtools/server/tests/browser/head.js --- a/devtools/server/tests/browser/head.js +++ b/devtools/server/tests/browser/head.js @@ -30,17 +30,17 @@ waitForExplicitFinish(); /** * Add a new test tab in the browser and load the given url. * @param {String} url The url to be loaded in the new tab * @return a promise that resolves to the new browser that the document * is loaded in. Note that we cannot return the document * directly, since this would be a CPOW in the e10s case, * and Promises cannot be resolved with CPOWs (see bug 1233497). */ -var addTab = async function (url) { +var addTab = async function(url) { info(`Adding a new tab with URL: ${url}`); let tab = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, url); await BrowserTestUtils.browserLoaded(tab.linkedBrowser); info(`Tab added and URL ${url} loaded`); return tab.linkedBrowser; }; @@ -237,27 +237,27 @@ function busyWait(time) { * @param number interval [optional] * How often the predicate is invoked, in milliseconds. */ function waitUntil(predicate, interval = 10) { if (predicate()) { return Promise.resolve(true); } return new Promise(resolve => { - setTimeout(function () { + setTimeout(function() { waitUntil(predicate).then(() => resolve(true)); }, interval); }); } function waitForMarkerType(front, types, predicate, unpackFun = (name, data) => data.markers, eventName = "timeline-data") { types = [].concat(types); - predicate = predicate || function () { + predicate = predicate || function() { return true; }; let filteredMarkers = []; let { promise, resolve } = defer(); info("Waiting for markers of type: " + types); function handler(name, data) { diff --git a/devtools/server/tests/browser/navigate-first.html b/devtools/server/tests/browser/navigate-first.html --- a/devtools/server/tests/browser/navigate-first.html +++ b/devtools/server/tests/browser/navigate-first.html @@ -2,14 +2,14 @@ First diff --git a/devtools/server/tests/browser/storage-helpers.js b/devtools/server/tests/browser/storage-helpers.js --- a/devtools/server/tests/browser/storage-helpers.js +++ b/devtools/server/tests/browser/storage-helpers.js @@ -12,30 +12,30 @@ * @param url {String} The url to be opened in the new tab * * @return {Promise} A promise that resolves after storage inspector is ready */ async function openTabAndSetupStorage(url) { let content = await addTab(url); // Setup the async storages in main window and for all its iframes - await ContentTask.spawn(gBrowser.selectedBrowser, null, async function () { + await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() { /** * Get all windows including frames recursively. * * @param {Window} [baseWindow] * The base window at which to start looking for child windows * (optional). * @return {Set} * A set of windows. */ function getAllWindows(baseWindow) { let windows = new Set(); - let _getAllWindows = function (win) { + let _getAllWindows = function(win) { windows.add(win.wrappedJSObject); for (let i = 0; i < win.length; i++) { _getAllWindows(win[i]); } }; _getAllWindows(baseWindow); @@ -47,30 +47,30 @@ async function openTabAndSetupStorage(ur if (win.setup) { await win.setup(); } } }); } async function clearStorage() { - await ContentTask.spawn(gBrowser.selectedBrowser, null, async function () { + await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() { /** * Get all windows including frames recursively. * * @param {Window} [baseWindow] * The base window at which to start looking for child windows * (optional). * @return {Set} * A set of windows. */ function getAllWindows(baseWindow) { let windows = new Set(); - let _getAllWindows = function (win) { + let _getAllWindows = function(win) { windows.add(win.wrappedJSObject); for (let i = 0; i < win.length; i++) { _getAllWindows(win[i]); } }; _getAllWindows(baseWindow); diff --git a/devtools/server/tests/browser/timeline-iframe-child.html b/devtools/server/tests/browser/timeline-iframe-child.html --- a/devtools/server/tests/browser/timeline-iframe-child.html +++ b/devtools/server/tests/browser/timeline-iframe-child.html @@ -4,17 +4,17 @@ Timeline iframe test - child frame

Child frame

diff --git a/devtools/server/tests/mochitest/animation-data.html b/devtools/server/tests/mochitest/animation-data.html --- a/devtools/server/tests/mochitest/animation-data.html +++ b/devtools/server/tests/mochitest/animation-data.html @@ -98,17 +98,17 @@ 100% { margin-right: 600px; } }
diff --git a/devtools/server/tests/mochitest/hello-actor.js b/devtools/server/tests/mochitest/hello-actor.js --- a/devtools/server/tests/mochitest/hello-actor.js +++ b/devtools/server/tests/mochitest/hello-actor.js @@ -12,17 +12,17 @@ const helloSpec = protocol.generateActor count: { request: {}, response: {count: protocol.RetVal("number")} } } }); var HelloActor = protocol.ActorClassWithSpec(helloSpec, { - initialize: function () { + initialize: function() { protocol.Actor.prototype.initialize.apply(this, arguments); this.counter = 0; }, - count: function () { + count: function() { return ++this.counter; } }); diff --git a/devtools/server/tests/mochitest/inspector-eyedropper.html b/devtools/server/tests/mochitest/inspector-eyedropper.html --- a/devtools/server/tests/mochitest/inspector-eyedropper.html +++ b/devtools/server/tests/mochitest/inspector-eyedropper.html @@ -5,16 +5,16 @@ diff --git a/devtools/server/tests/mochitest/inspector-helpers.js b/devtools/server/tests/mochitest/inspector-helpers.js --- a/devtools/server/tests/mochitest/inspector-helpers.js +++ b/devtools/server/tests/mochitest/inspector-helpers.js @@ -10,31 +10,31 @@ const {DebuggerServer} = require("devtoo const Services = require("Services"); // promise is still used in tests using this helper const defer = require("devtools/shared/defer"); const {DocumentWalker: _documentWalker} = require("devtools/server/actors/inspector/document-walker"); // Always log packets when running tests. Services.prefs.setBoolPref("devtools.debugger.log", true); -SimpleTest.registerCleanupFunction(function () { +SimpleTest.registerCleanupFunction(function() { Services.prefs.clearUserPref("devtools.debugger.log"); }); if (!DebuggerServer.initialized) { DebuggerServer.init(); DebuggerServer.registerAllActors(); - SimpleTest.registerCleanupFunction(function () { + SimpleTest.registerCleanupFunction(function() { DebuggerServer.destroy(); }); } var gAttachCleanups = []; -SimpleTest.registerCleanupFunction(function () { +SimpleTest.registerCleanupFunction(function() { for (let cleanup of gAttachCleanups) { cleanup(); } }); /** * Open a tab, load the url, wait for it to signal its readiness, * find the tab with the debugger server, and call the callback. @@ -62,17 +62,17 @@ function attachURL(url, callback) { if (event.data === "ready") { client = new DebuggerClient(DebuggerServer.connectPipe()); client.connect().then(([applicationType, traits]) => { client.listTabs().then(response => { for (let tab of response.tabs) { if (tab.url === url) { window.removeEventListener("message", loadListener); // eslint-disable-next-line max-nested-callbacks - client.attachTab(tab.actor, function (_response, _tabClient) { + client.attachTab(tab.actor, function(_response, _tabClient) { try { callback(null, client, tab, win.document); } catch (ex) { Cu.reportError(ex); dump(ex); } }); break; diff --git a/devtools/server/tests/mochitest/inspector-search-data.html b/devtools/server/tests/mochitest/inspector-search-data.html --- a/devtools/server/tests/mochitest/inspector-search-data.html +++ b/devtools/server/tests/mochitest/inspector-search-data.html @@ -12,17 +12,17 @@ } #pseudo:after { content: "after element"; } diff --git a/devtools/server/tests/mochitest/inspector-traversal-data.html b/devtools/server/tests/mochitest/inspector-traversal-data.html --- a/devtools/server/tests/mochitest/inspector-traversal-data.html +++ b/devtools/server/tests/mochitest/inspector-traversal-data.html @@ -15,17 +15,17 @@ } #shadow::before { content: "Testing ::before on a shadow host"; } diff --git a/devtools/server/tests/mochitest/inspector_css-properties.html b/devtools/server/tests/mochitest/inspector_css-properties.html --- a/devtools/server/tests/mochitest/inspector_css-properties.html +++ b/devtools/server/tests/mochitest/inspector_css-properties.html @@ -1,12 +1,12 @@ diff --git a/devtools/server/tests/mochitest/memory-helpers.js b/devtools/server/tests/mochitest/memory-helpers.js --- a/devtools/server/tests/mochitest/memory-helpers.js +++ b/devtools/server/tests/mochitest/memory-helpers.js @@ -8,17 +8,17 @@ const { DebuggerClient } = require("devt const { DebuggerServer } = require("devtools/server/main"); const { MemoryFront } = require("devtools/shared/fronts/memory"); // Always log packets when running tests. Services.prefs.setBoolPref("devtools.debugger.log", true); var gReduceTimePrecision = Services.prefs.getBoolPref("privacy.reduceTimerPrecision"); Services.prefs.setBoolPref("privacy.reduceTimerPrecision", false); -SimpleTest.registerCleanupFunction(function () { +SimpleTest.registerCleanupFunction(function() { Services.prefs.clearUserPref("devtools.debugger.log"); Services.prefs.setBoolPref("privacy.reduceTimerPrecision", gReduceTimePrecision); }); function startServerAndGetSelectedTabMemory() { DebuggerServer.init(); DebuggerServer.registerAllActors(); let client = new DebuggerClient(DebuggerServer.connectPipe()); diff --git a/devtools/server/tests/mochitest/setup-in-child.js b/devtools/server/tests/mochitest/setup-in-child.js --- a/devtools/server/tests/mochitest/setup-in-child.js +++ b/devtools/server/tests/mochitest/setup-in-child.js @@ -1,20 +1,20 @@ "use strict"; const {Cc, Ci} = require("chrome"); const cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"] .getService(Ci.nsIMessageListenerManager); const { DebuggerServer } = require("devtools/server/main"); -exports.setupChild = function (a, b, c) { +exports.setupChild = function(a, b, c) { cpmm.sendAsyncMessage("test:setupChild", [a, b, c]); }; -exports.callParent = function () { +exports.callParent = function() { // Hack! Fetch DebuggerServerConnection objects directly within DebuggerServer guts. for (let id in DebuggerServer._connections) { let conn = DebuggerServer._connections[id]; conn.setupInParent({ module: "chrome://mochitests/content/chrome/devtools/server/tests/mochitest/setup-in-parent.js", setupParent: "setupParent", args: [{one: true}, 2, "three"] }); diff --git a/devtools/server/tests/mochitest/setup-in-parent.js b/devtools/server/tests/mochitest/setup-in-parent.js --- a/devtools/server/tests/mochitest/setup-in-parent.js +++ b/devtools/server/tests/mochitest/setup-in-parent.js @@ -1,12 +1,12 @@ "use strict"; var {Ci} = require("chrome"); var Services = require("Services"); -exports.setupParent = function ({mm, prefix}) { +exports.setupParent = function({mm, prefix}) { let args = [ !!mm.QueryInterface(Ci.nsIMessageSender), prefix ]; Services.obs.notifyObservers(null, "test:setupParent", JSON.stringify(args)); }; diff --git a/devtools/server/tests/mochitest/test_Debugger.Script.prototype.global.html b/devtools/server/tests/mochitest/test_Debugger.Script.prototype.global.html --- a/devtools/server/tests/mochitest/test_Debugger.Script.prototype.global.html +++ b/devtools/server/tests/mochitest/test_Debugger.Script.prototype.global.html @@ -14,17 +14,17 @@ Debugger.Script.prototype.global should
 
   
   
   
   
 
 
 
 
 
 
   
   
   
   
   
   
   
   
 
 
 
 
 
diff --git a/devtools/server/tests/mochitest/test_executeInGlobal-outerized_this.html b/devtools/server/tests/mochitest/test_executeInGlobal-outerized_this.html --- a/devtools/server/tests/mochitest/test_executeInGlobal-outerized_this.html +++ b/devtools/server/tests/mochitest/test_executeInGlobal-outerized_this.html @@ -16,29 +16,29 @@ object.
 
   
 
 
 
 
   
 
 
 
 
   
 
 
 
 
   
 
 
 
 
   
 
 
 
 
   
 
 
 
 
   
 
 
 
 
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 
 
 Mozilla Bug 1431900
 Test Document
diff --git a/devtools/server/tests/mochitest/test_inspector-duplicate-node.html b/devtools/server/tests/mochitest/test_inspector-duplicate-node.html
--- a/devtools/server/tests/mochitest/test_inspector-duplicate-node.html
+++ b/devtools/server/tests/mochitest/test_inspector-duplicate-node.html
@@ -8,26 +8,26 @@ https://bugzilla.mozilla.org/show_bug.cg
   Test for Bug 1208864
 
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 
 
 Mozilla Bug 921102
diff --git a/devtools/server/tests/mochitest/test_inspector-retain.html b/devtools/server/tests/mochitest/test_inspector-retain.html
--- a/devtools/server/tests/mochitest/test_inspector-retain.html
+++ b/devtools/server/tests/mochitest/test_inspector-retain.html
@@ -8,31 +8,31 @@ https://bugzilla.mozilla.org/show_bug.cg
   Test for Bug 
 
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 
 
 Mozilla Bug 1155653
 Test Document
diff --git a/devtools/server/tests/mochitest/test_inspector_getOffsetParent.html b/devtools/server/tests/mochitest/test_inspector_getOffsetParent.html
--- a/devtools/server/tests/mochitest/test_inspector_getOffsetParent.html
+++ b/devtools/server/tests/mochitest/test_inspector_getOffsetParent.html
@@ -8,121 +8,121 @@ https://bugzilla.mozilla.org/show_bug.cg
   Test for Bug 1345119
 
   
   
   
   
 
 
 Mozilla Bug 1345119
diff --git a/devtools/server/tests/mochitest/test_makeGlobalObjectReference.html b/devtools/server/tests/mochitest/test_makeGlobalObjectReference.html
--- a/devtools/server/tests/mochitest/test_makeGlobalObjectReference.html
+++ b/devtools/server/tests/mochitest/test_makeGlobalObjectReference.html
@@ -15,17 +15,17 @@ Debugger.prototype.makeGlobalObjectRefer
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
diff --git a/devtools/server/tests/mochitest/test_styles-applied.html b/devtools/server/tests/mochitest/test_styles-applied.html --- a/devtools/server/tests/mochitest/test_styles-applied.html +++ b/devtools/server/tests/mochitest/test_styles-applied.html @@ -8,27 +8,27 @@ https://bugzilla.mozilla.org/show_bug.cg Test for Bug Mozilla Bug 1175040 diff --git a/devtools/server/tests/mochitest/test_styles-matched.html b/devtools/server/tests/mochitest/test_styles-matched.html --- a/devtools/server/tests/mochitest/test_styles-matched.html +++ b/devtools/server/tests/mochitest/test_styles-matched.html @@ -10,28 +10,28 @@ https://bugzilla.mozilla.org/show_bug.cg