Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / web-animations-api / timeline-set-current-time.html
blob5e78f2c116a3e423ed7143963b77f9955b235cf3
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
5 <!-- This tests that animation timeline current time affects players correctly. -->
7 <div id='element'></div>
9 <script>
10 async_test(function(t) {
11 var player = element.animate([], 10);
12 var readyPromise = player.ready.then(function() {
13 t.step(function() {
14 assert_equals(player.currentTime, 0);
15 document.timeline.currentTime = player.startTime + 5;
16 assert_approx_equals(player.currentTime, 5, 0.1);
17 assert_equals(player.playState, "running");
19 document.timeline.currentTime = player.startTime + 15;
20 assert_approx_equals(player.currentTime, 10, 0.1);
21 assert_equals(player.playState, "finished");
23 document.timeline.currentTime = player.startTime;
24 assert_equals(player.currentTime, 0);
25 assert_equals(player.playState, "running");
27 document.timeline.currentTime = player.startTime + 5;
28 assert_approx_equals(player.currentTime, 5, 0.1);
29 assert_equals(player.playState, "running");
30 });
31 t.done();
32 });
33 }, 'Animation players are retriggered if timeline time changes');
35 </script>