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

Side by Side Diff: LayoutTests/animations/fill-mode-missing-from-to-keyframes.html

Issue 707713005: Don't require getPropertyCSSValue in animation fill-mode tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
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 missing keyframes with fill modes</title> 7 <title>Test missing keyframes with fill modes</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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 setTimeout(endTest, 0); // this set timeout should be ok in the test environment 113 setTimeout(endTest, 0); // this set timeout should be ok in the test environment
114 // since we're just giving style a chance to resolve 114 // since we're just giving style a chance to resolve
115 } 115 }
116 }; 116 };
117 117
118 function endTest() { 118 function endTest() {
119 119
120 for (var i=0; i < expectedValues.length; i++) { 120 for (var i=0; i < expectedValues.length; i++) {
121 var el = document.getElementById(expectedValues[i].id); 121 var el = document.getElementById(expectedValues[i].id);
122 var expectedValue = expectedValues[i].end; 122 var expectedValue = expectedValues[i].end;
123 var realValue = window.getComputedStyle(el).getPropertyCSSValue("lef t").getFloatValue(CSSPrimitiveValue.CSS_NUMBER); 123 var realValue = parseFloat(window.getComputedStyle(el).left);
124 if (Math.abs(expectedValue - realValue) < allowance) { 124 if (Math.abs(expectedValue - realValue) < allowance) {
125 result += "PASS"; 125 result += "PASS";
126 } else { 126 } else {
127 result += "FAIL"; 127 result += "FAIL";
128 } 128 }
129 result += " - end of animation - id: " + expectedValues[i].id + " ex pected: " + expectedValue + " actual: " + realValue + "<br>"; 129 result += " - end of animation - id: " + expectedValues[i].id + " ex pected: " + expectedValue + " actual: " + realValue + "<br>";
130 } 130 }
131 document.getElementById('result').innerHTML = result; 131 document.getElementById('result').innerHTML = result;
132 132
133 if (window.testRunner) 133 if (window.testRunner)
134 testRunner.notifyDone(); 134 testRunner.notifyDone();
135 } 135 }
136 136
137 window.onload = function () { 137 window.onload = function () {
138 for (var i=0; i < expectedValues.length; i++) { 138 for (var i=0; i < expectedValues.length; i++) {
139 var el = document.getElementById(expectedValues[i].id); 139 var el = document.getElementById(expectedValues[i].id);
140 var expectedValue = expectedValues[i].start; 140 var expectedValue = expectedValues[i].start;
141 var realValue = window.getComputedStyle(el).getPropertyCSSValue("lef t").getFloatValue(CSSPrimitiveValue.CSS_NUMBER); 141 var realValue = parseFloat(window.getComputedStyle(el).left);
142 if (Math.abs(expectedValue - realValue) < allowance) { 142 if (Math.abs(expectedValue - realValue) < allowance) {
143 result += "PASS"; 143 result += "PASS";
144 } else { 144 } else {
145 result += "FAIL"; 145 result += "FAIL";
146 } 146 }
147 result += " - start of animation - id: " + expectedValues[i].id + " expected: " + expectedValue + " actual: " + realValue + "<br>"; 147 result += " - start of animation - id: " + expectedValues[i].id + " expected: " + expectedValue + " actual: " + realValue + "<br>";
148 } 148 }
149 document.addEventListener("webkitAnimationEnd", animationEnded, false); 149 document.addEventListener("webkitAnimationEnd", animationEnded, false);
150 }; 150 };
151 151
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 Both - from missing 185 Both - from missing
186 </div> 186 </div>
187 <div id="j" class="box"> 187 <div id="j" class="box">
188 Both iterating - from missing 188 Both iterating - from missing
189 </div> 189 </div>
190 190
191 <div id="result"> 191 <div id="result">
192 </div> 192 </div>
193 </body> 193 </body>
194 </html> 194 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698