| animation: foo linear 10s; |
| from { transform: "translateX(100px)" }; |
| to { transform: "none" }; |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| function waitNFrames(numberOfFrames, continuation) |
| (function rAFCallback() { |
| if (elapsedFrames++ >= numberOfFrames) |
| requestAnimationFrame(rAFCallback); |
| const initialNumberOfTimelineInvalidations = internals.numberOfAnimationTimelineInvalidations(); |
| assert_greater_than(internals.numberOfAnimationTimelineInvalidations(), initialNumberOfTimelineInvalidations, "There should be updates made to the timeline as an animation is set up."); |
| document.getElementById("target").style.display = "none"; |
| const numberOfTimelineInvalidationsAfterInterruption = internals.numberOfAnimationTimelineInvalidations(); |
| requestAnimationFrame(() => { |
| assert_equals(internals.numberOfAnimationTimelineInvalidations(), numberOfTimelineInvalidationsAfterInterruption, "There should not be any updates made to the timeline after interrupting the single running animation."); |
| }, "Interrupting an animation by setting 'display: none' should stop invalidating the animation timeline."); |