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

Side by Side Diff: LayoutTests/web-animations-api/timeline-play-animation.html

Issue 1113173003: Web Animations: Update naming to reflect spec changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: No, really. Created 5 years, 7 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 4
5 <body> 5 <body>
6 <div id='e'></div> 6 <div id='e'></div>
7 </body> 7 </body>
8 8
9 <script> 9 <script>
10 var element = document.getElementById('e'); 10 var element = document.getElementById('e');
11 var style = getComputedStyle(element); 11 var style = getComputedStyle(element);
12 var duration = 1; 12 var duration = 1;
13 13
14 var animation = new Animation(element, 14 var keyframeEffect = new KeyframeEffect(element,
15 [{opacity: '1', offset: 0}, 15 [{opacity: '1', offset: 0},
16 {opacity: '0', offset: 1}], 16 {opacity: '0', offset: 1}],
17 duration); 17 duration);
18 18
19 test(function() { 19 test(function() {
20 var player = document.timeline.play(animation); 20 var player = document.timeline.play(keyframeEffect);
21 player.pause(); 21 player.pause();
22 player.currentTime = duration / 2; 22 player.currentTime = duration / 2;
23 assert_equals(style.opacity, '0.5'); 23 assert_equals(style.opacity, '0.5');
24 }, 'Calling document.timeline.play() should start an animation.'); 24 }, 'Calling document.timeline.play() should start an animation.');
25 </script> 25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698