Bug 1137966 - Try fixing toolkit/devtools/server/tests/browser/browser_animation_actors_05.js intermittent. r=bgrins, a=test-only
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 06 Aug 2015 08:46:34 -0700
changeset 281824 4f0a7eb67e2300bb50b47f921c6cc43a7a980b88
parent 281823 2a7b72e23d85c9a146273de948cc922d97376ff9
child 281825 811b126b48763b9f07aafe3bb3fa549bb75b7245
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins, test-only
bugs1137966
milestone41.0a2
Bug 1137966 - Try fixing toolkit/devtools/server/tests/browser/browser_animation_actors_05.js intermittent. r=bgrins, a=test-only
toolkit/devtools/server/tests/browser/browser_animation_actors_05.js
--- a/toolkit/devtools/server/tests/browser/browser_animation_actors_05.js
+++ b/toolkit/devtools/server/tests/browser/browser_animation_actors_05.js
@@ -36,22 +36,23 @@ add_task(function*() {
     let previousState = player.initialState;
     let onNewState = state => {
       ok(state.currentTime !== previousState.currentTime,
         "The time has changed since the last update");
       expected --;
       previousState = state;
       if (expected === 0) {
         player.off(player.AUTO_REFRESH_EVENT, onNewState);
+
+        info("Stop the auto-refresh");
+        player.stopAutoRefresh();
+
         resolve();
       }
     };
     player.on(player.AUTO_REFRESH_EVENT, onNewState);
   });
 
   yield onAllEventsReceived;
 
-  info("Stop the auto-refresh");
-  player.stopAutoRefresh();
-
   yield closeDebuggerClient(client);
   gBrowser.removeCurrentTab();
 });