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 221320 6c345954bce5d898f1c8dfc4412ed1dc55371774
parent 221319 477f46897b0b90fcd858787f76fb71899156c5b2
child 221321 642e400b22a99f1967d620a172424113a934133f
push id28016
push userphilringnalda@gmail.com
push dateThu, 25 Dec 2014 19:58:27 +0000
treeherdermozilla-central@3a86099219cb [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>