| Index: LayoutTests/web-animations-api/timeline-time.html
|
| diff --git a/LayoutTests/web-animations-api/timeline-play-animation.html b/LayoutTests/web-animations-api/timeline-time.html
|
| similarity index 50%
|
| copy from LayoutTests/web-animations-api/timeline-play-animation.html
|
| copy to LayoutTests/web-animations-api/timeline-time.html
|
| index 0e6f993e1c67468519446846c54b0955ddaaf153..359e22662fd636f74fc37d8e8e7173f7386501d4 100644
|
| --- a/LayoutTests/web-animations-api/timeline-play-animation.html
|
| +++ b/LayoutTests/web-animations-api/timeline-time.html
|
| @@ -3,12 +3,11 @@
|
| <script src="../resources/testharnessreport.js"></script>
|
|
|
| <body>
|
| - <div id='e'></div>
|
| + <div id='element'></div>
|
| </body>
|
|
|
| <script>
|
| -var element = document.getElementById('e');
|
| -var style = getComputedStyle(element);
|
| +var element = document.getElementById('element');
|
| var duration = 1;
|
|
|
| var animation = new Animation(element,
|
| @@ -17,9 +16,11 @@ var animation = new Animation(element,
|
| duration);
|
|
|
| test(function() {
|
| + var startTime = document.timeline.currentTime;
|
| var player = document.timeline.play(animation);
|
| - player.pause();
|
| - player.currentTime = duration / 2;
|
| - assert_equals(style.opacity, '0.5');
|
| -}, 'Calling document.timeline.play() should start an animation.');
|
| + player.finish();
|
| + var finishTime = document.timeline.currentTime;
|
| + assert_greater_than_equal(startTime, 0);
|
| + assert_equals(startTime, finishTime);
|
| +}, 'document.timeline.currentTime should not change within a script block.');
|
| </script>
|
|
|