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

Side by Side Diff: third_party/WebKit/LayoutTests/web-animations-api/player-ready-finished-ordering.html

Issue 2139153002: Prepare animation-*-ready-finished-ordering 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <script>
6 async_test(function(t) {
7 var player = document.documentElement.animate([], 100000);
8 var ready = false;
9 player.ready.then(function() {
10 t.step(function() {
11 ready = true;
12 });
13 });
14 player.finished.then(function() {
15 t.step(function() {
16 assert_true(ready);
17 });
18 t.done();
19 });
20 player.finish();
21 }, 'The ready promise should be resolved before the finished promise');
22
23 async_test(function(t) {
24 var player = document.documentElement.animate([], 100000);
25 var ready = false;
26 player.ready.then(null, function() {
27 t.step(function() {
28 ready = true;
29 });
30 });
31 player.finished.then(null, function() {
32 t.step(function() {
33 assert_true(ready);
34 });
35 t.done();
36 });
37 player.cancel();
38 }, 'The ready promise should be rejected before the finished promise');
39 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698