Bug 1278136 - Part 3: Test that animations with fill:backwards consumes the main-thread while it's in delay phase. r=birtles
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Fri, 08 Jul 2016 13:02:44 +0900
changeset 304194 18cbc19266b4e6f60a35b21d748dbb88c3f03d64
parent 304193 ef21ce58421ed02e0669f25c4822e6f8a2f8b344
child 304195 0164fbe346839e2c77f82e4f587d66760a37bc26
push id30416
push userkwierso@gmail.com
push dateFri, 08 Jul 2016 21:46:37 +0000
treeherdermozilla-central@383cedd6feb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1278136
milestone50.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 1278136 - Part 3: Test that animations with fill:backwards consumes the main-thread while it's in delay phase. r=birtles MozReview-Commit-ID: 3dDGPfgOvJl
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
@@ -442,11 +442,33 @@ promise_test(function(t) {
 
     animation.effect.target = null;
     assert_equals(animation.isRunningOnCompositor, false,
                   'Animation reports that it is NOT running on the ' +
                   'compositor after setting null target');
   });
 }, 'animation is removed from the compositor when setting null target');
 
+promise_test(function(t) {
+  var div = addDiv(t);
+  var animation = div.animate({ opacity: [ 0, 1 ] },
+                              { duration: 100 * MS_PER_SEC,
+                                delay: 100 * MS_PER_SEC,
+                                fill: 'backwards' });
+
+  return animation.ready.then(function() {
+    // Will be fixed in bug 1223658.
+    assert_equals(animation.isRunningOnCompositor, false,
+                  'Animation with fill:backwards in delay phase reports ' +
+                  'that it is NOT running on the compositor');
+
+    animation.currentTime = 100 * MS_PER_SEC;
+    return waitForFrame();
+ }).then(function() {
+    assert_equals(animation.isRunningOnCompositor, omtaEnabled,
+                  'Animation with fill:backwards in delay phase reports ' +
+                  'that it is running on the compositor after delay phase');
+  });
+}, 'animation with fill:backwards in delay phase is running on the ' +
+   ' main-thread while it is in delay phase');
 
 </script>
 </body>