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

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

Issue 2614683002: CSS Animations: Fix flaky change-keyframes-name.html (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | 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 Name of A Keyframes Rule Using CSSOM</title> 7 <title>Test Changing Name of A Keyframes Rule 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;
11 left: 0; 11 left: 0;
12 top: 0; 12 top: 0;
13 height: 100px; 13 height: 100px;
14 width: 100px; 14 width: 100px;
15 background-color: blue; 15 background-color: blue;
16 -webkit-animation-duration: 0.5s; 16 -webkit-animation-duration: 0.5s;
suzyh_UTC10 (ex-contributor) 2017/01/04 23:29:49 Update to not use the prefixed properties?
17 -webkit-animation-timing-function: linear; 17 -webkit-animation-timing-function: linear;
18 -webkit-animation-name: bar; 18 -webkit-animation-name: bar;
19 } 19 }
20 @-webkit-keyframes foo { 20 @-webkit-keyframes foo {
21 from { left: 100px; } 21 from { left: 100px; }
22 40% { left: 200px; } 22 10% { left: 200px; }
23 60% { left: 200px; } 23 90% { left: 200px; }
24 to { left: 300px; } 24 to { left: 300px; }
25 } 25 }
26 </style> 26 </style>
27 <script src="resources/animation-test-helpers.js" type="text/javascript" cha rset="utf-8"></script> 27 <script src="resources/animation-test-helpers.js" type="text/javascript" cha rset="utf-8"></script>
28 <script type="text/javascript" charset="utf-8"> 28 <script type="text/javascript" charset="utf-8">
29 29
30 const expectedValues = [ 30 const expectedValues = [
31 // [time, element-id, property, expected-value, tolerance] 31 // [time, element-id, property, expected-value, tolerance]
32 [0.25, "box", "left", 200, 20], 32 [0.25, "box", "left", 200, 0],
suzyh_UTC10 (ex-contributor) 2017/01/04 23:29:49 To make this "0.25" time easier to understand, let
33 ]; 33 ];
34 34
35 function findKeyframesRule(rule) 35 function findKeyframesRule(rule)
36 { 36 {
37 var ss = document.styleSheets; 37 var ss = document.styleSheets;
38 for (var i = 0; i < ss.length; ++i) { 38 for (var i = 0; i < ss.length; ++i) {
39 for (var j = 0; j < ss[i].cssRules.length; ++j) { 39 for (var j = 0; j < ss[i].cssRules.length; ++j) {
40 if (ss[i].cssRules[j].type == window.CSSRule.WEBKIT_KEYFRAMES_RU LE && ss[i].cssRules[j].name == rule) 40 if (ss[i].cssRules[j].type == window.CSSRule.WEBKIT_KEYFRAMES_RU LE && ss[i].cssRules[j].name == rule)
41 return ss[i].cssRules[j]; 41 return ss[i].cssRules[j];
42 } 42 }
(...skipping 19 matching lines...) Expand all
62 testRunner.waitUntilDone(); 62 testRunner.waitUntilDone();
63 } 63 }
64 requestAnimationFrame(() => { 64 requestAnimationFrame(() => {
65 requestAnimationFrame(change); 65 requestAnimationFrame(change);
66 }); 66 });
67 } 67 }
68 68
69 </script> 69 </script>
70 </head> 70 </head>
71 <body onload="setup()"> 71 <body onload="setup()">
72 This test changes the name of the @keyframes rule so that it matches 72 This test changes the name of the @keyframes rule so that it matches
suzyh_UTC10 (ex-contributor) 2017/01/04 23:29:49 For clarity of reading can you please indent every
73 and makes sure the animation starts running. 73 and makes sure the animation starts running.
74 <div id="box"> 74 <div id="box">
75 </div> 75 </div>
76 <div id="pre-result"> 76 <div id="pre-result">
suzyh_UTC10 (ex-contributor) 2017/01/04 23:29:49 Unused?
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 | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698