Revision control

1
<style>
2
3
#target {
4
position: absolute;
5
top: 0;
6
left: 0;
7
width: 100px;
8
height: 100px;
9
background-color: black;
10
transform: translateX(50px);
11
}
12
13
</style>
14
<div id="target"></div>
15
<script src="../resources/ui-helper.js"></script>
16
<script>
17
18
(async () => {
19
if (window.testRunner)
20
testRunner.waitUntilDone();
21
22
// Start an animation that lasts a day.
23
const duration = 24 * 60 * 60 * 1000;
24
const animation = document.getElementById("target").animate({ translate: "200px" }, duration);
25
animation.currentTime = duration / 2;
26
27
// Wait until the animation has been applied.
28
await animation.ready;
29
await UIHelper.ensureStablePresentationUpdate();
30
31
if (window.testRunner)
32
testRunner.notifyDone();
33
})();
34
35
</script>