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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/Animation/ready.html

Issue 2697453005: Import wpt@758b3b4cfa805067f36121333ba031e583d3a62c (Closed)
Patch Set: Add -expected.txt files. Created 3 years, 10 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset=utf-8> 2 <meta charset=utf-8>
3 <title>Animation.ready</title> 3 <title>Animation.ready</title>
4 <link rel="help" href="https://w3c.github.io/web-animations/#dom-animation-ready "> 4 <link rel="help" href="https://w3c.github.io/web-animations/#dom-animation-ready ">
5 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testharnessreport.js"></script>
7 <script src="../../testcommon.js"></script> 7 <script src="../../testcommon.js"></script>
8 <body> 8 <body>
9 <div id="log"></div> 9 <div id="log"></div>
10 <script> 10 <script>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 var retPromise = animation.ready.then(function() { 64 var retPromise = animation.ready.then(function() {
65 assert_unreached('ready promise was fulfilled'); 65 assert_unreached('ready promise was fulfilled');
66 }).catch(function(err) { 66 }).catch(function(err) {
67 assert_equals(err.name, 'AbortError', 67 assert_equals(err.name, 'AbortError',
68 'ready promise is rejected with AbortError'); 68 'ready promise is rejected with AbortError');
69 }); 69 });
70 70
71 animation.cancel(); 71 animation.cancel();
72 72
73 return retPromise; 73 return retPromise;
74 }, 'ready promise is rejected when a pause-pending animation is cancelled by' 74 }, 'ready promise is rejected when a play-pending animation is cancelled by'
75 + ' calling cancel()'); 75 + ' calling cancel()');
76 76
77 promise_test(function(t) { 77 promise_test(function(t) {
78 var div = createDiv(t); 78 var div = createDiv(t);
79 var animation = div.animate({}, 100 * MS_PER_SEC); 79 var animation = div.animate({}, 100 * MS_PER_SEC);
80 return animation.ready.then(function() { 80 return animation.ready.then(function() {
81 animation.pause(); 81 animation.pause();
82 // Set up listeners on pause-pending ready promise 82 // Set up listeners on pause-pending ready promise
83 var retPromise = animation.ready.then(function() { 83 var retPromise = animation.ready.then(function() {
84 assert_unreached('ready promise was fulfilled'); 84 assert_unreached('ready promise was fulfilled');
85 }).catch(function(err) { 85 }).catch(function(err) {
86 assert_equals(err.name, 'AbortError', 86 assert_equals(err.name, 'AbortError',
87 'ready promise is rejected with AbortError'); 87 'ready promise is rejected with AbortError');
88 }); 88 });
89 animation.cancel(); 89 animation.cancel();
90 return retPromise; 90 return retPromise;
91 }); 91 });
92 }, 'ready promise is rejected when a pause-pending animation is cancelled by' 92 }, 'ready promise is rejected when a pause-pending animation is cancelled by'
93 + ' calling cancel()'); 93 + ' calling cancel()');
94 94
95 </script> 95 </script>
96 </body> 96 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698