| <script src="../resources/ui-helper.js"></script> |
| testRunner.waitUntilDone(); |
| // Start an animation that lasts a day. |
| const duration = 24 * 60 * 60 * 1000; |
| const translateAnimation = document.getElementById("target").animate({ translate: "100px" }, duration); |
| translateAnimation.currentTime = duration / 2; |
| // Wait until the animation has been applied. |
| await translateAnimation.ready; |
| await UIHelper.ensureStablePresentationUpdate(); |
| // Add an extra animation. |
| const transformAnimation = document.getElementById("target").animate({ transform: "translateY(100px)" }, duration); |
| transformAnimation.currentTime = duration / 2; |
| // Wait until the new animation has been applied. |
| await transformAnimation.ready; |
| await UIHelper.ensureStablePresentationUpdate(); |