Revision control

1
<script src="../resources/testharness.js"></script>
2
<script src="../resources/testharnessreport.js"></script>
3
<div></div>
4
<script>
5
6
const noKeyframesTest = (keyframes, label) => {
7
promise_test(async () => {
8
const animation = document.querySelector("div").animate(keyframes, 1000);
9
await animation.ready;
10
animation.currentTime = 100;
11
assert_equals(internals.timeToNextAnimationTick(animation), 900);
12
}, `Computing the time until the next tick for an effect with ${label} keyframes parameter.`);
13
}
14
15
noKeyframesTest(null, "null");
16
noKeyframesTest({}, "{}");
17
noKeyframesTest([], "[]");
18
noKeyframesTest({ foo: "bar" }, "invalid CSS property");
19
20
</script>