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

Unified Diff: LayoutTests/web-animations-api/player-cancel-events.html

Issue 1158783011: Web Animations: Don't fire finish event when cancelling (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « LayoutTests/TestExpectations ('k') | LayoutTests/web-animations-api/player-cancel-finishes.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/web-animations-api/player-cancel-events.html
diff --git a/LayoutTests/web-animations-api/player-cancel-events.html b/LayoutTests/web-animations-api/player-cancel-events.html
new file mode 100644
index 0000000000000000000000000000000000000000..0941323957bd5060effb7a0e9b87addf04b6bb61
--- /dev/null
+++ b/LayoutTests/web-animations-api/player-cancel-events.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<body>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+var anim1 = document.body.animate([], 100000);
+var anim2 = document.body.animate([], 100000);
+var anim3 = document.body.animate([], 100000);
+
+var noFinish = async_test('Animation finish event should not fire when cancelled');
+
+anim1.onfinish = function() {
+ noFinish.step(function() {
+ anim3.finish();
+ });
+};
+
+anim2.onfinish = function() {
+ noFinish.step(function() {
+ assert_true(false);
+ });
+};
+
+anim3.onfinish = function() {
+ noFinish.done();
+};
+
+anim1.finish();
+anim2.cancel();
+</script>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/web-animations-api/player-cancel-finishes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698