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

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

Issue 1999243002: Import wpt@5df9b57edb3307a87d5187804b29c8ddd2aa14e1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add expectations files (using run-webkit-tests --new-baseline) Created 4 years, 6 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 <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 <link rel="stylesheet" href="../../../../../resources/testharness.css">
10 <body>
11 <div id="log"></div>
12 <script>
13 'use strict';
14
15 test(function(t) {
16 var animation = new Animation(new KeyframeEffect(createDiv(t), null),
17 document.timeline);
18 assert_equals(animation.startTime, null, 'startTime is unresolved');
19 }, 'startTime of a newly created (idle) animation is unresolved');
20
21 test(function(t) {
22 var animation = new Animation(new KeyframeEffect(createDiv(t), null),
23 document.timeline);
24 animation.play();
25 assert_equals(animation.startTime, null, 'startTime is unresolved');
26 }, 'startTime of a play-pending animation is unresolved');
27
28 test(function(t) {
29 var animation = new Animation(new KeyframeEffect(createDiv(t), null),
30 document.timeline);
31 animation.pause();
32 assert_equals(animation.startTime, null, 'startTime is unresolved');
33 }, 'startTime of a pause-pending animation is unresolved');
34
35 test(function(t) {
36 var animation = createDiv(t).animate(null);
37 assert_equals(animation.startTime, null, 'startTime is unresolved');
38 }, 'startTime of a play-pending animation created using Element.animate'
39 + ' shortcut is unresolved');
40
41 promise_test(function(t) {
42 var animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
43 return animation.ready.then(function() {
44 assert_greater_than(animation.startTime, 0, 'startTime when running');
45 });
46 }, 'startTime is resolved when running');
47
48 </script>
49 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698