Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Unified Diff: LayoutTests/web-animations-api/animation-timeline-detached-no-crash.html

Issue 1154423006: When cancelling an animation, add missing timeline-detach check. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add test Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/animation/Animation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/web-animations-api/animation-timeline-detached-no-crash.html
diff --git a/LayoutTests/web-animations-api/animation-timeline-detached-no-crash.html b/LayoutTests/web-animations-api/animation-timeline-detached-no-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..46e569e3172c14ee2162d389330faade4be42d26
--- /dev/null
+++ b/LayoutTests/web-animations-api/animation-timeline-detached-no-crash.html
@@ -0,0 +1,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>
« no previous file with comments | « no previous file | Source/core/animation/Animation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698