undefined reference to 'JSC::B3::BasicBlock::fallThrough() const
[WebKit-https.git] / LayoutTests / http / wpt / web-animations / interfaces / Animation / startTime.html
1 <!DOCTYPE html>
2 <meta charset=utf-8>
3 <title>Animation.startTime tests</title>
4 <link rel="help"
5 href="https://w3c.github.io/web-animations/#dom-animation-starttime">
6 <script src="/resources/testharness.js"></script>
7 <script src="/resources/testharnessreport.js"></script>
8 <script src="../../testcommon.js"></script>
9 <body>
10 <div id="log"></div>
11 <script>
12 'use strict';
13
14 test(function(t) {
15   var animation = new Animation(new KeyframeEffect(createDiv(t), null),
16                                 document.timeline);
17   assert_equals(animation.startTime, null, 'startTime is unresolved');
18 }, 'startTime of a newly created (idle) animation is unresolved');
19
20 test(function(t) {
21   var animation = new Animation(new KeyframeEffect(createDiv(t), null),
22                                 document.timeline);
23   animation.play();
24   assert_equals(animation.startTime, null, 'startTime is unresolved');
25 }, 'startTime of a play-pending animation is unresolved');
26
27 test(function(t) {
28   var animation = new Animation(new KeyframeEffect(createDiv(t), null),
29                                 document.timeline);
30   animation.pause();
31   assert_equals(animation.startTime, null, 'startTime is unresolved');
32 }, 'startTime of a pause-pending animation is unresolved');
33
34 test(function(t) {
35   var animation = createDiv(t).animate(null);
36   assert_equals(animation.startTime, null, 'startTime is unresolved');
37 }, 'startTime of a play-pending animation created using Element.animate'
38    + ' shortcut is unresolved');
39
40 promise_test(function(t) {
41   var animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
42   return animation.ready.then(function() {
43     assert_greater_than(animation.startTime, 0, 'startTime when running');
44   });
45 }, 'startTime is resolved when running');
46
47 test(function(t) {
48   var animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
49   animation.cancel();
50   assert_equals(animation.startTime, null);
51   assert_equals(animation.currentTime, null);
52 }, 'startTime and currentTime are unresolved when animation is cancelled');
53
54 </script>
55 </body>