Bug 1345280 - A test case that makes sure we don't compose anmation styles while computed timing is not changed. r?boris draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 08 Mar 2017 09:09:44 +0900
changeset 494829 1b548bffa88e4a4577d05cb8a65c465e0e719ac5
parent 494684 3d341b9ba5353b6b8ab45b6ca03dcb1b2d789faa
child 548228 d628927b978d3e667ce65d6b83dd5d5d55875d89
push id48163
push userhikezoe@mozilla.com
push dateWed, 08 Mar 2017 00:10:46 +0000
reviewersboris
bugs1345280
milestone55.0a1
Bug 1345280 - A test case that makes sure we don't compose anmation styles while computed timing is not changed. r?boris MozReview-Commit-ID: JMcXU3FBnU6
dom/animation/test/chrome/test_restyles.html
--- a/dom/animation/test/chrome/test_restyles.html
+++ b/dom/animation/test/chrome/test_restyles.html
@@ -846,12 +846,28 @@ waitForAllPaints(function() {
     var markers = yield observeStyling(5);
 
     is(markers.length, 0,
        'Discrete animation running on the main-thread in an out-of-view ' +
        'element should never cause restyles');
     yield ensureElementRemoval(div);
   });
 
+  add_task(function* no_restyling_while_computed_timing_is_not_changed() {
+    var div = addDiv(null);
+    var animation = div.animate({ backgroundColor: [ 'red', 'blue' ] },
+                                { duration: 100 * MS_PER_SEC,
+                                  easing: 'step-end' });
+
+    yield animation.ready;
+
+    var markers = yield observeStyling(5);
+
+    is(markers.length, 0,
+       'Animation running on the main-thread while computed timing is not ' +
+       'changed should never cause restyles');
+    yield ensureElementRemoval(div);
+  });
+
 });
 
 </script>
 </body>