undefined reference to 'JSC::B3::BasicBlock::fallThrough() const
[WebKit-https.git] / LayoutTests / http / wpt / web-animations / interfaces / Animation / playState.html
1 <!DOCTYPE html>
2 <meta charset=utf-8>
3 <title>Animation.playState</title>
4 <link rel="help" href="https://w3c.github.io/web-animations/#dom-animation-playstate">
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 <script src="../../testcommon.js"></script>
8 <body>
9 <div id="log"></div>
10 <script>
11 'use strict';
12
13 promise_test(function(t) {
14   var div = createDiv(t);
15   var animation = div.animate({}, 100 * MS_PER_SEC);
16
17   assert_equals(animation.playState, 'pending');
18   return animation.ready.then(function() {
19     assert_equals(animation.playState, 'running');
20   });
21 }, 'Animation.playState reports \'pending\'->\'running\' when initially ' +
22    'played');
23
24 promise_test(function(t) {
25   var div = createDiv(t);
26   var animation = div.animate({}, 100 * MS_PER_SEC);
27   animation.pause();
28
29   assert_equals(animation.playState, 'pending');
30   return animation.ready.then(function() {
31     assert_equals(animation.playState, 'paused');
32   });
33 }, 'Animation.playState reports \'pending\'->\'paused\' when pausing');
34
35 test(function(t) {
36   var div = createDiv(t);
37   var animation = div.animate({}, 100 * MS_PER_SEC);
38   animation.cancel();
39   assert_equals(animation.playState, 'idle');
40 }, 'Animation.playState is \'idle\' when canceled.');
41
42 test(function(t) {
43   var div = createDiv(t);
44   var animation = div.animate({}, 100 * MS_PER_SEC);
45   animation.cancel();
46   animation.currentTime = 50 * MS_PER_SEC;
47   assert_equals(animation.playState, 'paused',
48                 'After seeking an idle animation, it is effectively paused');
49 }, 'Animation.playState is \'paused\' after cancelling an animation, ' +
50    'seeking it makes it paused');
51
52 </script>
53 </body>