blob: 23e140133bb09a61cec157eda7741bf4474fc946 [file] [log] [blame]
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div style="position: absolute; top: 0; left: 0; width: 100px; height: 100px; background-color: black;"></div>
<script>
async_test(t => {
const target = document.querySelector("div");
const animation = target.animate([
{ transform: "translateY(0px)", easing: "step-start" },
{ transform: "translateY(100px)", easing: "step-start" },
{ transform: "translateY(0px)" }
], 60 * 1000);
animation.ready.then(() => {
// We wait for two frames to ensure an accelerated animation would have been committed.
requestAnimationFrame(() => {
requestAnimationFrame(() => {
assert_equals(internals.acceleratedAnimationsForElement(target).length, 0, "The animation's target has no accelerated animation.");
t.done();
});
});
});
}, "An animation targeting an accelerated property should not be accelerated if it uses a steps timing function in one of its keyframes.");
</script>