| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| function waitNFrames(numberOfFrames, continuation) |
| (function rAFCallback() { |
| if (elapsedFrames++ >= numberOfFrames) |
| requestAnimationFrame(rAFCallback); |
| const keyframes = { marginLeft: ["50px", "100px"] }; |
| const timing = { duration: 50, fill: "forwards" }; |
| document.getElementById("target").animate(keyframes, timing).addEventListener("finish", event => { |
| const numberOfTimelineInvalidationsWhenFinished = internals.numberOfAnimationTimelineInvalidations(); |
| assert_equals(internals.numberOfAnimationTimelineInvalidations(), numberOfTimelineInvalidationsWhenFinished); |
| }, "There should not be any updates made to the timeline after a forward-filling animation completes."); |