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

Side by Side Diff: third_party/WebKit/LayoutTests/web-animations-api/animation-finish-event-cancelled.html

Issue 2141823002: Prepare animation-finish-event-cancelled for upstreaming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/web-animations-api/player-cancel-events-nofinish.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <meta charset=utf-8>
3 <title>Canceling an animation: finish event</title>
4 <link rel="help" href="https://w3c.github.io/web-animations/#canceling-an-animat ion-section">
3 <script src="../resources/testharness.js"></script> 5 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 6 <script src="../resources/testharnessreport.js"></script>
7 <body>
5 <script> 8 <script>
6 var anim1 = document.body.animate([], 100000); 9 var anim1 = document.body.animate([], 100000);
7 var anim2 = document.body.animate([], 100000); 10 var anim2 = document.body.animate([], 100000);
8 var anim3 = document.body.animate([], 100000); 11 var anim3 = document.body.animate([], 100000);
alancutter (OOO until 2018) 2016/07/12 03:54:00 Use Infinity for duration.
9 12
10 var noFinish = async_test('Animation finish event should not fire when cancelled '); 13 var noFinish = async_test('Animation finish event should not fire when cancelled ');
11 14
12 anim1.onfinish = function() { 15 anim1.onfinish = function() {
alancutter (OOO until 2018) 2016/07/12 03:54:00 We should use the finished promise as that is pref
13 noFinish.step(function() { 16 noFinish.step(function() {
14 anim3.finish(); 17 anim3.finish();
15 }); 18 });
16 }; 19 };
17 20
18 anim2.onfinish = function() { 21 anim2.onfinish = function() {
19 noFinish.step(function() { 22 noFinish.step(function() {
20 assert_true(false); 23 assert_true(false);
alancutter (OOO until 2018) 2016/07/12 04:38:25 Use t.unreached_func('message'). Wrap this entire
21 }); 24 });
22 }; 25 };
23 26
24 anim3.onfinish = function() { 27 anim3.onfinish = function() {
25 noFinish.done(); 28 noFinish.done();
26 }; 29 };
27 30
28 anim1.finish(); 31 anim1.finish();
29 anim2.cancel(); 32 anim2.cancel();
30 </script> 33 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/web-animations-api/player-cancel-events-nofinish.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698