No bug - Fix eslint fix failures from conflict between new eslint rule and changes affecting inspector's animation tests. r=eslint-fix CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 13 Mar 2018 14:11:55 +0200
changeset 407889 52af32e695ef94e54d5205bfa686aab22f330c3d
parent 407888 261fd7bc381b05e4fc13741c7f08cc4b8b579185
child 407890 f1e6aeb55b95a345abb3f3726f0610b038c77f48
push id100794
push userarchaeopteryx@coole-files.de
push dateTue, 13 Mar 2018 12:12:15 +0000
treeherdermozilla-inbound@52af32e695ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseslint-fix
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
No bug - Fix eslint fix failures from conflict between new eslint rule and changes affecting inspector's animation tests. r=eslint-fix CLOSED TREE
devtools/client/inspector/animation/test/browser_animation_current-time-label.js
devtools/client/inspector/animation/test/browser_animation_current-time-scrubber.js
devtools/client/inspector/animation/test/browser_animation_keyframes-progress-bar.js
devtools/client/inspector/animation/test/browser_animation_logic_auto-stop.js
devtools/client/inspector/animation/test/browser_animation_pause-resume-button.js
devtools/client/inspector/animation/test/browser_animation_pause-resume-button_spacebar.js
devtools/client/inspector/animation/test/browser_animation_playback-rate-selector.js
devtools/client/inspector/animation/test/browser_animation_rewind-button.js
devtools/client/inspector/animation/test/head.js
--- a/devtools/client/inspector/animation/test/browser_animation_current-time-label.js
+++ b/devtools/client/inspector/animation/test/browser_animation_current-time-label.js
@@ -2,17 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test for following CurrentTimeLabel component:
 // * element existence
 // * label content at plural timing
 
-add_task(async function () {
+add_task(async function() {
   await addTab(URL_ROOT + "doc_multi_timings.html");
   const { animationInspector, inspector, panel } = await openAnimationInspector();
 
   info("Checking current time label existence");
   const labelEl = panel.querySelector(".current-time-label");
   ok(labelEl, "current time label should exist");
 
   info("Checking current time label content");
--- a/devtools/client/inspector/animation/test/browser_animation_current-time-scrubber.js
+++ b/devtools/client/inspector/animation/test/browser_animation_current-time-scrubber.js
@@ -4,17 +4,17 @@
 "use strict";
 
 // Test for following CurrentTimeScrubber and CurrentTimeScrubberController components:
 // * element existence
 // * scrubber position validity
 // * make animations currentTime to change by click on the controller
 // * mouse drag on the scrubber
 
-add_task(async function () {
+add_task(async function() {
   await addTab(URL_ROOT + "doc_multi_timings.html");
   const { animationInspector, inspector, panel } = await openAnimationInspector();
 
   info("Checking scrubber controller existence");
   const controllerEl = panel.querySelector(".current-time-scrubber-controller");
   ok(controllerEl, "scrubber controller should exist");
 
   info("Checking scrubber existence");
--- a/devtools/client/inspector/animation/test/browser_animation_keyframes-progress-bar.js
+++ b/devtools/client/inspector/animation/test/browser_animation_keyframes-progress-bar.js
@@ -47,17 +47,17 @@ const POSITION_TESTCASES = [
   },
   {
     targetClassName: "fill-both-width-delay-iterationstart",
     scrubberPositions: [0, 0.33, 0.66, 0.833, 1],
     expectedPositions: [0.5, 0.5, 0.99, 0.25, 0.5],
   },
 ];
 
-add_task(async function () {
+add_task(async function() {
   await addTab(URL_ROOT + "doc_multi_timings.html");
   const { animationInspector, inspector, panel } = await openAnimationInspector();
 
   info("Checking progress bar position in multi effect timings");
   await clickOnPauseResumeButton(animationInspector, panel);
 
   for (const testcase of POSITION_TESTCASES) {
     info(`Checking progress bar position for ${ testcase.targetClassName }`);
--- a/devtools/client/inspector/animation/test/browser_animation_logic_auto-stop.js
+++ b/devtools/client/inspector/animation/test/browser_animation_logic_auto-stop.js
@@ -5,17 +5,17 @@
 
 // Animation inspector makes the current time to stop
 // after end of animation duration except iterations infinity.
 // Test followings:
 // * state of animations and UI components after end of animation duration
 // * state of animations and UI components after end of animation duration
 //   but iteration count is infinity
 
-add_task(async function () {
+add_task(async function() {
   await addTab(URL_ROOT + "doc_multi_timings.html");
   const { animationInspector, inspector, panel } = await openAnimationInspector();
 
   info("Checking state after end of animation duration");
   await selectNodeAndWaitForAnimations(".easing-step", inspector);
   const pixelsData = getDurationAndRate(animationInspector, panel, 5);
   await clickOnCurrentTimeScrubberController(animationInspector,
                                              panel, 1 - pixelsData.rate);
--- a/devtools/client/inspector/animation/test/browser_animation_pause-resume-button.js
+++ b/devtools/client/inspector/animation/test/browser_animation_pause-resume-button.js
@@ -5,17 +5,17 @@
 
 // Test for following PauseResumeButton component:
 // * element existence
 // * state during running animations
 // * state during pausing animations
 // * make animations to pause by push button
 // * make animations to resume by push button
 
-add_task(async function () {
+add_task(async function() {
   await addTab(URL_ROOT + "doc_custom_playback_rate.html");
   const { animationInspector, panel } = await openAnimationInspector();
 
   info("Checking pause/resume button existence");
   const buttonEl = panel.querySelector(".pause-resume-button");
   ok(buttonEl, "pause/resume button should exist");
 
   info("Checking state during running animations");
--- a/devtools/client/inspector/animation/test/browser_animation_pause-resume-button_spacebar.js
+++ b/devtools/client/inspector/animation/test/browser_animation_pause-resume-button_spacebar.js
@@ -2,17 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test for following PauseResumeButton component with spacebar:
 // * make animations to pause/resume by spacebar
 // * combination with other UI components
 
-add_task(async function () {
+add_task(async function() {
   await addTab(URL_ROOT + "doc_custom_playback_rate.html");
   const { animationInspector, panel } = await openAnimationInspector();
 
   info("Checking spacebar makes animations to pause");
   await sendSpaceKeyEvent(animationInspector, panel);
   assertAnimationsPausing(animationInspector, panel);
   await sendSpaceKeyEvent(animationInspector, panel);
   assertAnimationsRunning(animationInspector, panel);
--- a/devtools/client/inspector/animation/test/browser_animation_playback-rate-selector.js
+++ b/devtools/client/inspector/animation/test/browser_animation_playback-rate-selector.js
@@ -4,17 +4,17 @@
 "use strict";
 
 // Test for following PlaybackRateSelector component:
 // * element existence
 // * make playback rate of animations by the selector
 // * in case of animations have mixed playback rate
 // * in case of animations have playback rate which is not default selectable value
 
-add_task(async function () {
+add_task(async function() {
   await addTab(URL_ROOT + "doc_custom_playback_rate.html");
   const { animationInspector, inspector, panel } = await openAnimationInspector();
 
   info("Checking playback rate selector existence");
   const selectEl = panel.querySelector(".playback-rate-selector");
   ok(selectEl, "scrubber controller should exist");
 
   info("Checking playback rate existence which includes custom rate of animations");
--- a/devtools/client/inspector/animation/test/browser_animation_rewind-button.js
+++ b/devtools/client/inspector/animation/test/browser_animation_rewind-button.js
@@ -3,17 +3,17 @@
 
 "use strict";
 
 // Test for following RewindButton component:
 // * element existence
 // * make animations to rewind to zero
 // * the state should be always paused after rewinding
 
-add_task(async function () {
+add_task(async function() {
   await addTab(URL_ROOT + "doc_custom_playback_rate.html");
   const { animationInspector, panel } = await openAnimationInspector();
 
   info("Checking button existence");
   ok(panel.querySelector(".rewind-button"), "Rewind button should exist");
 
   info("Checking rewind button makes animations to rewind to zero");
   await clickOnRewindButton(animationInspector, panel);
--- a/devtools/client/inspector/animation/test/head.js
+++ b/devtools/client/inspector/animation/test/head.js
@@ -123,34 +123,34 @@ const clickOnDetailCloseButton = functio
 
 /**
  * Click on pause/resume button.
  *
  * @param {AnimationInspector} animationInspector
  * @param {AnimationsPanel} panel
  *        The panel instance.
  */
-const clickOnPauseResumeButton = async function (animationInspector, panel) {
+const clickOnPauseResumeButton = async function(animationInspector, panel) {
   info("Click on pause/resume button");
   const buttonEl = panel.querySelector(".pause-resume-button");
   const bounds = buttonEl.getBoundingClientRect();
   const x = bounds.width / 2;
   const y = bounds.height / 2;
   EventUtils.synthesizeMouse(buttonEl, x, y, {}, buttonEl.ownerGlobal);
   await waitForSummaryAndDetail(animationInspector);
 };
 
 /**
  * Click on rewind button.
  *
  * @param {AnimationInspector} animationInspector
  * @param {AnimationsPanel} panel
  *        The panel instance.
  */
-const clickOnRewindButton = async function (animationInspector, panel) {
+const clickOnRewindButton = async function(animationInspector, panel) {
   info("Click on rewind button");
   const buttonEl = panel.querySelector(".rewind-button");
   const bounds = buttonEl.getBoundingClientRect();
   const x = bounds.width / 2;
   const y = bounds.height / 2;
   EventUtils.synthesizeMouse(buttonEl, x, y, {}, buttonEl.ownerGlobal);
   await waitForSummaryAndDetail(animationInspector);
 };
@@ -160,37 +160,37 @@ const clickOnRewindButton = async functi
  *
  * @param {AnimationsPanel} panel
  * @param {Number} mouseDownPosition
  *        rate on scrubber controller pane.
  *        This method calculates
  *        `mouseDownPosition * offsetWidth + offsetLeft of scrubber controller pane`
  *        as the clientX of MouseEvent.
  */
-const clickOnCurrentTimeScrubberController = async function (animationInspector,
-                                                             panel,
-                                                             mouseDownPosition,
-                                                             mouseMovePosition) {
+const clickOnCurrentTimeScrubberController = async function(animationInspector,
+                                                            panel,
+                                                            mouseDownPosition,
+                                                            mouseMovePosition) {
   const controllerEl = panel.querySelector(".current-time-scrubber-controller");
   const bounds = controllerEl.getBoundingClientRect();
   const mousedonwX = bounds.width * mouseDownPosition;
 
   info(`Click ${ mousedonwX } on scrubber controller`);
   EventUtils.synthesizeMouse(controllerEl, mousedonwX, 0, {}, controllerEl.ownerGlobal);
   await waitForSummaryAndDetail(animationInspector);
 };
 
 /**
  * Click on playback rate selector to select given rate.
  *
  * @param {AnimationInspector} animationInspector
  * @param {AnimationsPanel} panel
  * @param {Number} rate
  */
-const clickOnPlaybackRateSelector = async function (animationInspector, panel, rate) {
+const clickOnPlaybackRateSelector = async function(animationInspector, panel, rate) {
   info(`Click on playback rate selector to select ${rate}`);
   const selectEl = panel.querySelector(".playback-rate-selector");
   const optionEl = [...selectEl.options].filter(o => Number(o.value) === rate)[0];
 
   if (!optionEl) {
     ok(false, `Could not find an option for rate ${ rate } in the rate selector. ` +
               `Values are: ${ [...selectEl.options].map(o => o.value) }`);
     return;
@@ -212,21 +212,21 @@ const clickOnPlaybackRateSelector = asyn
  *        `mouseDownPosition * offsetWidth + offsetLeft of scrubber controller pane`
  *        as the clientX of MouseEvent.
  * @param {Number} mouseMovePosition
  *        Dispatch mousemove event with mouseMovePosition after mousedown.
  *        Calculation for clinetX is same to above.
  * @param {Number} mouseYPixel
  *        Y of mouse in pixel.
  */
-const dragOnCurrentTimeScrubber = async function (animationInspector,
-                                                  panel,
-                                                  mouseDownPosition,
-                                                  mouseMovePosition,
-                                                  mouseYPixel) {
+const dragOnCurrentTimeScrubber = async function(animationInspector,
+                                                 panel,
+                                                 mouseDownPosition,
+                                                 mouseMovePosition,
+                                                 mouseYPixel) {
   const controllerEl = panel.querySelector(".current-time-scrubber");
   const bounds = controllerEl.getBoundingClientRect();
   const mousedonwX = bounds.width * mouseDownPosition;
   const mousemoveX = bounds.width * mouseMovePosition;
 
   info(`Drag on scrubber from ${ mousedonwX } to ${ mousemoveX }`);
   EventUtils.synthesizeMouse(controllerEl, mousedonwX, mouseYPixel,
                              { type: "mousedown" }, controllerEl.ownerGlobal);
@@ -246,17 +246,17 @@ const dragOnCurrentTimeScrubber = async 
  *        rate on scrubber controller pane.
  *        This method calculates
  *        `mouseDownPosition * offsetWidth + offsetLeft of scrubber controller pane`
  *        as the clientX of MouseEvent.
  * @param {Number} mouseMovePosition
  *        Dispatch mousemove event with mouseMovePosition after mousedown.
  *        Calculation for clinetX is same to above.
  */
-const dragOnCurrentTimeScrubberController = async function (animationInspector,
+const dragOnCurrentTimeScrubberController = async function(animationInspector,
                                                             panel,
                                                             mouseDownPosition,
                                                             mouseMovePosition) {
   const controllerEl = panel.querySelector(".current-time-scrubber-controller");
   const bounds = controllerEl.getBoundingClientRect();
   const mousedonwX = bounds.width * mouseDownPosition;
   const mousemoveX = bounds.width * mouseMovePosition;
 
@@ -279,17 +279,17 @@ const dragOnCurrentTimeScrubberControlle
  * @param {AnimationsPanel} panel
  * @param {Number} pixels
  * @return {Object}
  *         {
  *           duration,
  *           rate,
  *         }
  */
-const getDurationAndRate = function (animationInspector, panel, pixels) {
+const getDurationAndRate = function(animationInspector, panel, pixels) {
   const controllerEl = panel.querySelector(".current-time-scrubber-controller");
   const bounds = controllerEl.getBoundingClientRect();
   const duration =
     animationInspector.state.timeScale.getDuration() / bounds.width * pixels;
   const rate = 1 / bounds.width * pixels;
   return { duration, rate };
 };
 
@@ -317,17 +317,17 @@ const selectNodeAndWaitForAnimations = a
 };
 
 /**
  * Send keyboard event of space to given panel.
  *
  * @param {AnimationInspector} animationInspector
  * @param {AnimationsPanel} panel
  */
-const sendSpaceKeyEvent = async function (animationInspector, panel) {
+const sendSpaceKeyEvent = async function(animationInspector, panel) {
   panel.focus();
   EventUtils.sendKey("SPACE", panel.ownerGlobal);
   await waitForSummaryAndDetail(animationInspector);
 };
 
 /**
  * Set the sidebar width by given parameter.
  *
@@ -392,17 +392,17 @@ const waitForAllSummaryGraph = async fun
   }
 };
 
 /**
  * Wait for rendering of all summary graph and detail.
  *
  * @param {AnimationInspector} inspector
  */
-const waitForSummaryAndDetail = async function (animationInspector) {
+const waitForSummaryAndDetail = async function(animationInspector) {
   await Promise.all([
     waitForAllSummaryGraph(animationInspector),
     waitForAnimationDetail(animationInspector),
   ]);
 };
 
 /**
  * Check whether current time of all animations and UI are given specified time.