Bug 927349 part 23 - Wait on player.ready on test_running_on_compositor.html; r=jwatt
authorBrian Birtles <birtles@gmail.com>
Thu, 25 Dec 2014 16:28:24 +0900
changeset 221975 37343347ab6a63330a335a6745dac1f093b6d902
parent 221974 6a4a22732aed7933fcd6af8e55c10a2fb762877b
child 221976 413db6659fef3370473fc2511b7cc819c10999f9
push id53485
push userbbirtles@mozilla.com
push dateMon, 05 Jan 2015 11:10:01 +0000
treeherdermozilla-inbound@7d7ac60fb354 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs927349
milestone37.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 927349 part 23 - Wait on player.ready on test_running_on_compositor.html; r=jwatt
dom/animation/test/chrome/test_running_on_compositor.html
--- a/dom/animation/test/chrome/test_running_on_compositor.html
+++ b/dom/animation/test/chrome/test_running_on_compositor.html
@@ -39,28 +39,26 @@ const OMTAPrefKey = 'layers.offmainthrea
 var omtaEnabled = SpecialPowers.DOMWindowUtils.layerManagerRemote &&
                   SpecialPowers.getBoolPref(OMTAPrefKey);
 
 // FIXME: When we implement Element.animate, use that here instead of CSS
 // so that we remove any dependency on the CSS mapping.
 div.style.animation = 'anim 100s';
 var player = div.getAnimationPlayers()[0];
 
-// Wait so that animation can be set up.
-// FIXME: When we implement the AnimationPlayer.ready promise we should wait
-// on that here.
-window.requestAnimationFrame(function() {
+player.ready.then(function() {
   is(player.isRunningOnCompositor, omtaEnabled,
      'AnimationPlayer reports that it is running on the compositor'
      + ' during playback');
 
   div.style.animationPlayState = 'paused';
   window.getComputedStyle(div).animationPlayState;
 
-  // FIXME: Likewise, we should wait on AnimationPlayer.ready here too.
+  // FIXME: When we implement deferred pausing (bug 1109390), we should wait
+  // on player.ready here.
   window.requestAnimationFrame(function() {
     is(player.isRunningOnCompositor, false,
        'AnimationPlayer reports that it is NOT running on the compositor'
        + ' when paused');
     SimpleTest.finish();
   });
 });
 </script>