Revision control

1
<script src="../resources/testharness.js"></script>
2
<script src="../resources/testharnessreport.js"></script>
3
<style>
4
5
div {
6
animation: anim 1s steps(10);
7
}
8
9
@keyframes anim {
10
50% { margin-left: 500px; }
11
}
12
13
</style>
14
<div></div>
15
<script>
16
17
async_test(async t => {
18
const animation = document.querySelector("div").getAnimations()[0];
19
20
await animation.ready;
21
22
animation.currentTime = 10;
23
assert_equals(internals.timeToNextAnimationTick(animation), 40, "Progress contained in the interval for an implicit 0% keyframe.");
24
25
animation.currentTime = 920;
26
assert_equals(internals.timeToNextAnimationTick(animation), 30, "Progress contained in the interval for an implicit 100% keyframe.");
27
28
t.done();
29
}, "Computing the time until the next tick for a CSS Animation with implicit steps() timing functions.");
30
31
</script>