Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / web-animations-api / player-cancel-events.html
blob0941323957bd5060effb7a0e9b87addf04b6bb61
1 <!DOCTYPE html>
2 <body>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script>
6 var anim1 = document.body.animate([], 100000);
7 var anim2 = document.body.animate([], 100000);
8 var anim3 = document.body.animate([], 100000);
10 var noFinish = async_test('Animation finish event should not fire when cancelled');
12 anim1.onfinish = function() {
13 noFinish.step(function() {
14 anim3.finish();
15 });
18 anim2.onfinish = function() {
19 noFinish.step(function() {
20 assert_true(false);
21 });
24 anim3.onfinish = function() {
25 noFinish.done();
28 anim1.finish();
29 anim2.cancel();
30 </script>