Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / web-animations-api / timeline-time.html
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <body>
6     <div id='element'></div>
7 </body>
8
9 <script>
10 var element = document.getElementById('element');
11 var duration = 1;
12
13 var animation = new Animation(element,
14     [{opacity: '1', offset: 0},
15     {opacity: '0', offset: 1}],
16     duration);
17
18 test(function() {
19     var startTime = document.timeline.currentTime;
20     var player = document.timeline.play(animation);
21     player.finish();
22     var finishTime = document.timeline.currentTime;
23     assert_greater_than_equal(startTime, 0);
24     assert_equals(startTime, finishTime);
25 }, 'document.timeline.currentTime should not change within a script block.');
26 </script>