Revision control

1
<!DOCTYPE html>
2
<meta charset=utf-8>
3
<title>Crash setting a CSS Animation to "none" after setting its effect to null</title>
4
<style>
5
@keyframes animation {
6
from {
7
margin-left: 0px;
8
}
9
to {
10
margin-left: 100px;
11
}
12
}
13
</style>
14
<body>
15
<script src="../resources/testharness.js"></script>
16
<script src="../resources/testharnessreport.js"></script>
17
<script>
18
19
'use strict';
20
21
test(t => {
22
const target = document.body.appendChild(document.createElement("div"));
23
target.style.animation = "animation 1s";
24
25
const animations = target.getAnimations();
26
assert_equals(animations.length, 1, "The target element has one animation.");
27
28
animations[0].effect = null;
29
30
target.style.animation = "none";
31
}, "Setting a CSS Animation to 'none' after setting its effect to null does not crash.");
32
33
</script>
34
</body>