blob: 812c6757f08e77e7bf130d38bd883caaa5f35832 [file] [log] [blame]
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<style>
div {
animation: anim 1s steps(10);
}
@keyframes anim {
50% { margin-left: 500px; }
}
</style>
<div></div>
<script>
promise_test(async t => {
const animation = document.querySelector("div").getAnimations()[0];
await animation.ready;
animation.currentTime = 10;
assert_equals(internals.timeToNextAnimationTick(animation), 40, "Progress contained in the interval for an implicit 0% keyframe.");
animation.currentTime = 920;
assert_equals(internals.timeToNextAnimationTick(animation), 30, "Progress contained in the interval for an implicit 100% keyframe.");
}, "Computing the time until the next tick for a CSS Animation with implicit steps() timing functions.");
</script>