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
--- 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>