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

Unified Diff: LayoutTests/web-animations-api/finish-event-after-gc.html

Issue 284323004: Web Animations: Make AnimationPlayer an ActiveDOMObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 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/AnimationPlayer.h » ('j') | Source/core/animation/AnimationPlayer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/web-animations-api/finish-event-after-gc.html
diff --git a/LayoutTests/web-animations-api/finish-event-after-gc.html b/LayoutTests/web-animations-api/finish-event-after-gc.html
new file mode 100644
index 0000000000000000000000000000000000000000..7cba44fbb539ef19b86c2f9360217699a5c934be
--- /dev/null
+++ b/LayoutTests/web-animations-api/finish-event-after-gc.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<body>
+<script>
+var layoutTest = async_test('Finish event should be delivered even if a GC occurs. This test passes if it does not time out.');
+var events = 0;
+
+function finish() {
+ if (window.GCController)
+ GCController.collect();
+ if (++events == 2)
+ layoutTest.done();
+}
+
+// Use a distinct, unreferenced instance of the handler function.
+document.body.animate([]).onfinish = finish.bind();
+document.body.animate([]).onfinish = finish.bind();
+
+if (window.GCController)
+ GCController.collect();
+</script>
« no previous file with comments | « no previous file | Source/core/animation/AnimationPlayer.h » ('j') | Source/core/animation/AnimationPlayer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698