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

Side by Side Diff: LayoutTests/animations/change-keyframes.html

Issue 1153493002: Remove CSSKeyframesRule.insertRule() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tests 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
« no previous file with comments | « no previous file | LayoutTests/animations/change-keyframes-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd"> 2 "http://www.w3.org/TR/html4/loose.dtd">
3 3
4 <html lang="en"> 4 <html lang="en">
5 <head> 5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <title>Test Changing Keyframes Using CSSOM</title> 7 <title>Test Changing Keyframes Using CSSOM</title>
8 <style type="text/css" media="screen"> 8 <style type="text/css" media="screen">
9 #box { 9 #box {
10 position: relative; 10 position: relative;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 0.6: function() { 50 0.6: function() {
51 document.getElementById('box').style.webkitAnimationName = "none"; 51 document.getElementById('box').style.webkitAnimationName = "none";
52 // a forced style-recalc aborts the previous animation 52 // a forced style-recalc aborts the previous animation
53 document.getElementById('box').offsetTop; 53 document.getElementById('box').offsetTop;
54 // change keyframes 54 // change keyframes
55 var keyframes = findKeyframesRule("anim"); 55 var keyframes = findKeyframesRule("anim");
56 keyframes.deleteRule("0%"); 56 keyframes.deleteRule("0%");
57 keyframes.deleteRule("40%"); 57 keyframes.deleteRule("40%");
58 keyframes.deleteRule("60%"); 58 keyframes.deleteRule("60%");
59 keyframes.deleteRule("100%"); 59 keyframes.deleteRule("100%");
60 keyframes.insertRule("0% { top: 50px; }"); 60 keyframes.appendRule("0% { top: 50px; }");
61 keyframes.insertRule("10% { top: 100px; }"); 61 keyframes.appendRule("10% { top: 100px; }");
62 keyframes.insertRule("90% { top: 100px; }"); 62 keyframes.appendRule("90% { top: 100px; }");
63 keyframes.insertRule("100% { top: 150px; }"); 63 keyframes.appendRule("100% { top: 150px; }");
64 document.getElementById('box').style.webkitAnimationName = "anim"; 64 document.getElementById('box').style.webkitAnimationName = "anim";
65 } 65 }
66 } 66 }
67 67
68 // FIXME: Consider whether we can support this kind of test (staggered start ) under the pause API 68 // FIXME: Consider whether we can support this kind of test (staggered start ) under the pause API
69 runAnimationTest(expectedValues, callbacks, null, 'do-not-use-pause-api'); 69 runAnimationTest(expectedValues, callbacks, null, 'do-not-use-pause-api');
70 </script> 70 </script>
71 </head> 71 </head>
72 <body> 72 <body>
73 This test performs an animation of the left property and makes sure it is animat ing. Then it stops 73 This test performs an animation of the left property and makes sure it is animat ing. Then it stops
74 the animation, changes the keyframes to an animation of the top property, restar ts the animation 74 the animation, changes the keyframes to an animation of the top property, restar ts the animation
75 and makes sure top is animating. 75 and makes sure top is animating.
76 <div id="box"> 76 <div id="box">
77 </div> 77 </div>
78 <div id="result"> 78 <div id="result">
79 </div> 79 </div>
80 </body> 80 </body>
81 </html> 81 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/animations/change-keyframes-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698