blob: 4b1504abcad3e7db0413cddbf33361ea49454af1 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->
<meta charset=utf-8>
<title>Crash setting a CSSAnimation's property via style after setting its effect to null</title>
<style>
@keyframes animation {
from {
margin-left: 0px;
}
to {
margin-left: 100px;
}
}
</style>
<body>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
'use strict';
test(t => {
const target = document.body.appendChild(document.createElement("div"));
target.style.animation = "animation 1s";
const animations = target.getAnimations();
assert_equals(animations.length, 1, "The target element has one animation.");
animations[0].effect = null;
target.style.animationDuration = "2s";
}, "Setting a CSSAnimation's property via style after setting its effect to null does not crash.");
</script>
</body>