Bug 1278136 - Part 3: Test that animations with fill:backwards consumes the main-thread while it's in delay phase. r?birtles draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Fri, 08 Jul 2016 13:02:44 +0900
changeset 385380 b5a27330f00bc6e49506988c233033f73f7f18a0
parent 385379 0ee465a584fa495614b976884f9731d93e0e0554
child 524921 1bc7f6279c0830d038d78357e8927e0fed2e8171
push id22495
push userhiikezoe@mozilla-japan.org
push dateFri, 08 Jul 2016 08:38:44 +0000
reviewersbirtles
bugs1278136
milestone50.0a1
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>