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

Side by Side Diff: LayoutTests/css3/filters/composited-during-animation.html

Issue 14805007: Clean up expectations for animation helper tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline LayoutTests/css3/masking/clip-path-animation Created 7 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 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <style> 5 <style>
6 img { 6 img {
7 margin: 10px; 7 margin: 10px;
8 } 8 }
9 9
10 .animating img { 10 .animating img {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 ["saturate-anim", 1, "saturate-box", "webkitFilter", 'saturate(0.5)', 0 .15], 126 ["saturate-anim", 1, "saturate-box", "webkitFilter", 'saturate(0.5)', 0 .15],
127 ["huerotate-anim", 1, "huerotate-box", "webkitFilter", 'hue-rotate(90de g)', 20], 127 ["huerotate-anim", 1, "huerotate-box", "webkitFilter", 'hue-rotate(90de g)', 20],
128 ["invert-anim", 1, "invert-box", "webkitFilter", 'invert(0.5)', 0.15], 128 ["invert-anim", 1, "invert-box", "webkitFilter", 'invert(0.5)', 0.15],
129 ["opacity-anim", 1, "opacity-box", "webkitFilter", 'opacity(0.5)', 0.15 ], 129 ["opacity-anim", 1, "opacity-box", "webkitFilter", 'opacity(0.5)', 0.15 ],
130 ["brightness-anim", 1, "brightness-box", "webkitFilter", 'brightness(0. 5)', 0.15], 130 ["brightness-anim", 1, "brightness-box", "webkitFilter", 'brightness(0. 5)', 0.15],
131 ["contrast-anim", 1, "contrast-box", "webkitFilter", 'contrast(0.5)', 0 .15], 131 ["contrast-anim", 1, "contrast-box", "webkitFilter", 'contrast(0.5)', 0 .15],
132 ["blur-anim", 1, "blur-box", "webkitFilter", 'blur(10px)', 4], 132 ["blur-anim", 1, "blur-box", "webkitFilter", 'blur(10px)', 4],
133 ]; 133 ];
134 134
135 function runPreTest() { 135 function runPreTest() {
136 var preResult = "";
137
138 for (var i=0; i < preExpectedValues.length; i++) { 136 for (var i=0; i < preExpectedValues.length; i++) {
139 var id = preExpectedValues[i][0]; 137 var id = preExpectedValues[i][0];
140 var prop = preExpectedValues[i][1]; 138 var prop = preExpectedValues[i][1];
141 var expected = preExpectedValues[i][2]; 139 var expected = preExpectedValues[i][2];
142 var element = document.getElementById(id); 140 var element = document.getElementById(id);
143 var computedStyle = window.getComputedStyle(element)[prop]; 141 var computedStyle = window.getComputedStyle(element)[prop];
144 if (computedStyle == expected) 142 if (computedStyle == expected)
145 preResult += "PASS: Element " + id + " had filter value " + expect ed + " before animation.<br>"; 143 result += "PASS: Element " + id + " had filter value " + expected + " before animation.<br>";
146 else 144 else
147 preResult += "FAIL: Element " + id + " had filter value " + comput edStyle + " rather than " + expected + " before animation.<br>"; 145 result += "FAIL: Element " + id + " had filter value " + computedS tyle + " rather than " + expected + " before animation.<br>";
148 } 146 }
149 document.getElementById("preresult").innerHTML = preResult;
150 147
151 // Completed the pre-animation tests. Now start the animation. 148 // Completed the pre-animation tests. Now start the animation.
152 setTimeout(function () { 149 setTimeout(function () {
153 document.body.className = "animating"; 150 document.body.className = "animating";
154 runAnimationTest(expectedValues); 151 runAnimationTest(expectedValues);
155 }, 0); 152 }, 0);
156 } 153 }
157 154
158 if (window.testRunner) { 155 if (window.testRunner) {
159 testRunner.dumpAsText(); 156 testRunner.dumpAsText();
(...skipping 17 matching lines...) Expand all
177 174
178 <!-- this result element is filled in the script above, before the animations st art --> 175 <!-- this result element is filled in the script above, before the animations st art -->
179 <div id="preresult"> 176 <div id="preresult">
180 </div> 177 </div>
181 178
182 <!-- this result element is filled by the animation test system --> 179 <!-- this result element is filled by the animation test system -->
183 <div id="result"> 180 <div id="result">
184 </div> 181 </div>
185 </body> 182 </body>
186 </html> 183 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698