Bug 1443480 - manual eslint fixes. r=jryans
MozReview-Commit-ID: I2unzIQLprb
--- a/devtools/client/animationinspector/components/animation-details.js
+++ b/devtools/client/animationinspector/components/animation-details.js
@@ -85,17 +85,17 @@ AnimationDetails.prototype = {
* @param {Array} CSS property names.
* e.g. ["background-color", "opacity", ...]
* @return {Object} Animation type mapped with CSS property name.
* e.g. { "background-color": "color", }
* "opacity": "float", ... }
*/
async getAnimationTypes(propertyNames) {
if (this.serverTraits.hasGetAnimationTypes) {
- return await this.animation.getAnimationTypes(propertyNames);
+ return this.animation.getAnimationTypes(propertyNames);
}
// Set animation type 'none' since does not support getAnimationTypes.
const animationTypes = {};
propertyNames.forEach(propertyName => {
animationTypes[propertyName] = "none";
});
return Promise.resolve(animationTypes);
},
--- a/devtools/client/animationinspector/test/browser_animation_detail_displayed.js
+++ b/devtools/client/animationinspector/test/browser_animation_detail_displayed.js
@@ -76,10 +76,10 @@ add_task(async function() {
* @param {AnimationTimeline} AnimationTimeline component
* @param {DOMNode} animation-detail element
* @return {Promise} which wait for close the detail pane
*/
async function clickCloseButtonForDetailPanel(timeline, element) {
const button = element.querySelector(".animation-detail-header button");
const onclosed = timeline.once("animation-detail-closed");
EventUtils.sendMouseEvent({type: "click"}, button, element.ownerDocument.defaultView);
- return await onclosed;
+ return onclosed;
}
--- a/devtools/client/animationinspector/test/head.js
+++ b/devtools/client/animationinspector/test/head.js
@@ -82,30 +82,30 @@ async function reloadTab(inspector) {
* loaded in the toolbox
* @param {String} reason
* Defaults to "test" which instructs the inspector not
* to highlight the node upon selection
* @return {Promise} Resolves when the inspector is updated with the new node
and animations of its subtree are properly displayed.
*/
var selectNodeAndWaitForAnimations = async function(data, inspector, reason = "test") {
- // We want to make sure the rest of the test waits for the animations to
- // be properly displayed (wait for all target DOM nodes to be previewed).
- let {AnimationsController, AnimationsPanel} =
- inspector.sidebar.getWindowForTab(TAB_NAME);
- let onUiUpdated = AnimationsPanel.once(AnimationsPanel.UI_UPDATED_EVENT);
+ // We want to make sure the rest of the test waits for the animations to
+ // be properly displayed (wait for all target DOM nodes to be previewed).
+ let {AnimationsController, AnimationsPanel} =
+ inspector.sidebar.getWindowForTab(TAB_NAME);
+ let onUiUpdated = AnimationsPanel.once(AnimationsPanel.UI_UPDATED_EVENT);
- await selectNode(data, inspector, reason);
+ await selectNode(data, inspector, reason);
- await onUiUpdated;
- if (AnimationsController.animationPlayers.length !== 0) {
- await waitForAnimationTimelineRendering(AnimationsPanel);
- await waitForAllAnimationTargets(AnimationsPanel);
- }
- };
+ await onUiUpdated;
+ if (AnimationsController.animationPlayers.length !== 0) {
+ await waitForAnimationTimelineRendering(AnimationsPanel);
+ await waitForAllAnimationTargets(AnimationsPanel);
+ }
+};
/**
* Check if there are the expected number of animations being displayed in the
* panel right now.
* @param {AnimationsPanel} panel
* @param {Number} nbAnimations The expected number of animations.
* @param {String} msg An optional string to be used as the assertion message.
*/
@@ -395,17 +395,17 @@ async function clickOnTimelineHeader(pan
const header = timeline.timeHeaderEl;
const clientX = header.offsetLeft + header.offsetWidth * position;
EventUtils.sendMouseEvent({ type: "mousedown", clientX: clientX },
header, header.ownerDocument.defaultView);
info(`Click at (${ clientX }, 0) on timeline header`);
EventUtils.sendMouseEvent({ type: "mouseup", clientX: clientX }, header,
header.ownerDocument.defaultView);
- return await onTimelineDataChanged;
+ return onTimelineDataChanged;
}
/**
* Prevent the toolbox common highlighter from making backend requests.
* @param {Toolbox} toolbox
*/
function disableHighlighter(toolbox) {
toolbox._highlighter = {
@@ -442,17 +442,17 @@ async function clickOnAnimation(panel, i
let x = timeBlockBounds.width / 2;
let y = timeBlockBounds.height / 2;
if (timeBlock != timeBlock.ownerDocument.elementFromPoint(x, y)) {
// Move the mouse pointer a little since scrubber element may be at the point.
x += timeBlockBounds.width / 4;
}
EventUtils.synthesizeMouse(timeBlock, x, y, {}, timeBlock.ownerDocument.defaultView);
- return await onSelectionChanged;
+ return onSelectionChanged;
}
/**
* Get an instance of the Keyframes component from the timeline.
* @param {AnimationsPanel} panel The panel instance.
* @param {String} propertyName The name of the animated property.
* @return {Keyframes} The Keyframes component instance.
*/