Revision control

1
<!DOCTYPE html>
2
<meta charset=utf-8>
3
<title>Crash accessing a CSSAnimation's current time after removal of its target</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 100ms";
24
25
const animations = target.getAnimations();
26
assert_equals(animations.length, 1, "The target element has one animation.");
27
28
const animation = animations[0];
29
animation.finish();
30
31
assert_equals(animation.currentTime, 100, "The animation's current time is 100 after animation completes.");
32
target.remove();
33
assert_equals(animation.currentTime, null, "The animation's current time is null after removing its target element.");
34
}, "Current time is null when removing an animation's target after completion.");
35
36
</script>
37
</body>