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

Side by Side Diff: LayoutTests/web-animations-api/timeline-updates-players.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 <!-- This tests that players get updated even if they have previously had their source content removed or go out of effect. --> 5 <!-- This tests that players get updated even if they have previously had their source content removed or go out of effect. -->
6 6
7 <div id='element'></div> 7 <div id='element'></div>
8 8
9 <script> 9 <script>
10 var element = document.getElementById('element'); 10 var element = document.getElementById('element');
11 var animation = new Animation(element, [{left: '0px'}, {left: '100px'}], 10); 11 var keyframeEffect = new KeyframeEffect(element, [{left: '0px'}, {left: '100px'} ], 10);
12 test(function() { 12 test(function() {
13 var player = document.timeline.play(animation); 13 var player = document.timeline.play(keyframeEffect);
14 player.finish(); 14 player.finish();
15 assert_equals(getComputedStyle(element).left, 'auto'); 15 assert_equals(getComputedStyle(element).left, 'auto');
16 16
17 player.play(); 17 player.play();
18 assert_equals(getComputedStyle(element).left, '0px'); 18 assert_equals(getComputedStyle(element).left, '0px');
19 19
20 player.finish(); 20 player.finish();
21 }, 'Player updated after finish and play'); 21 }, 'Player updated after finish and play');
22 22
23 test(function() { 23 test(function() {
24 var player = document.timeline.play(animation); 24 var player = document.timeline.play(keyframeEffect);
25 assert_equals(getComputedStyle(element).left, '0px'); 25 assert_equals(getComputedStyle(element).left, '0px');
26 var source = player.source 26 var source = player.source
27 player.source = null; 27 player.source = null;
28 assert_equals(getComputedStyle(element).left, 'auto'); 28 assert_equals(getComputedStyle(element).left, 'auto');
29 29
30 player.source = source; 30 player.source = source;
31 assert_equals(getComputedStyle(element).left, '0px'); 31 assert_equals(getComputedStyle(element).left, '0px');
32 32
33 player.finish(); 33 player.finish();
34 }, 'Player updated after clear and set source'); 34 }, 'Player updated after clear and set source');
35 </script> 35 </script>
OLDNEW
« no previous file with comments | « LayoutTests/web-animations-api/timeline-play-animation.html ('k') | LayoutTests/web-animations-api/transitions-replay.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698