Revision control

1
<script src="../resources/testharness.js"></script>
2
<script src="../resources/testharnessreport.js"></script>
3
<div style="position: absolute; top: 0; left: 0; width: 100px; height: 100px; background-color: black;"></div>
4
<script>
5
6
async_test(t => {
7
8
const target = document.querySelector("div");
9
const animation = target.animate([
10
{ transform: "translateY(0px)", easing: "step-start" },
11
{ transform: "translateY(100px)", easing: "step-start" },
12
{ transform: "translateY(0px)" }
13
], 60 * 1000);
14
15
animation.ready.then(() => {
16
// We wait for two frames to ensure an accelerated animation would have been committed.
17
requestAnimationFrame(() => {
18
requestAnimationFrame(() => {
19
assert_equals(internals.acceleratedAnimationsForElement(target).length, 0, "The animation's target has no accelerated animation.");
20
t.done();
21
});
22
});
23
});
24
25
}, "An animation targeting an accelerated property should not be accelerated if it uses a steps timing function in one of its keyframes.");
26
27
</script>