2 <script src=
"../resources/testharness.js"></script>
3 <script src=
"../resources/testharnessreport.js"></script>
5 <!-- This tests that animation timeline current time and playback rate works correctly. -->
9 document
.timeline
.currentTime
= 1000;
10 assert_approx_equals(document
.timeline
.currentTime
, 1000, 0.1);
11 assert_equals(document
.timeline
.playbackRate
, 1);
13 document
.timeline
.playbackRate
= 1;
14 document
.timeline
.currentTime
= 2000;
15 assert_approx_equals(document
.timeline
.currentTime
, 2000, 0.1);
16 assert_equals(document
.timeline
.playbackRate
, 1);
18 document
.timeline
.playbackRate
= 0.5;
19 assert_approx_equals(document
.timeline
.currentTime
, 2000, 0.1);
20 document
.timeline
.currentTime
= 3000;
21 assert_approx_equals(document
.timeline
.currentTime
, 3000, 0.1);
22 assert_equals(document
.timeline
.playbackRate
, 0.5);
23 }, 'Current time is set correctly on the animation timeline.');