Bug 1368472: wait if setCurrentTimes is running. r=gl
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Thu, 27 Jul 2017 21:17:34 +0900
changeset 420142 8480552d03bca3f7024cfb2051677920d7a9191d
parent 420141 7829ceaaec31214c53e8bc098df8ca0d9ac109dd
child 420143 95e19ac11ce91a189b3aa45023a550366df4b408
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1368472
milestone56.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
Bug 1368472: wait if setCurrentTimes is running. r=gl MozReview-Commit-ID: 3QsRNdta9Z9
devtools/client/animationinspector/test/browser_animation_timeline_scrubber_movable.js
--- a/devtools/client/animationinspector/test/browser_animation_timeline_scrubber_movable.js
+++ b/devtools/client/animationinspector/test/browser_animation_timeline_scrubber_movable.js
@@ -45,16 +45,21 @@ add_task(function* () {
   info("Try to drag the scrubber handle and check that the scrubber moves");
   let onDataChanged = timeline.once("timeline-data-changed");
   EventUtils.synthesizeMouse(scrubberHandleEl, 1, 20, {type: "mousedown"}, win);
   EventUtils.synthesizeMouse(timeHeaderEl, 0, 0, {type: "mousemove"}, win);
   EventUtils.synthesizeMouse(timeHeaderEl, 0, 0, {type: "mouseup"}, win);
   yield onDataChanged;
 
   checkScrubberIsAt(scrubberEl, timeHeaderEl, 0);
+
+  // Wait for promise of setCurrentTimes if setCurrentTimes is running.
+  if (panel.setCurrentTimeAllPromise) {
+    yield panel.setCurrentTimeAllPromise;
+  }
 });
 
 function* synthesizeInHeaderAndWaitForChange(timeline, x, y, type) {
   let onDataChanged = timeline.once("timeline-data-changed");
   EventUtils.synthesizeMouse(timeline.timeHeaderEl, x, y, {type}, timeline.win);
   yield onDataChanged;
 }