summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/web-animations-api/animation-timeline-detached-no-crash.html
blob: 46e569e3172c14ee2162d389330faade4be42d26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>

<script>
test(function() {
    var doc = document.implementation.createDocument("", "", null);
    doc.createElement("div").animate([], 1000);
    var anim = doc.timeline.getAnimations()[0];
    doc = null;
    gc();
    anim.cancel();
}, 'Calling cancel() on an animation detached from its timeline should not crash.');
</script>