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

Side by Side Diff: third_party/WebKit/LayoutTests/css3/flexbox/flex-property-parsing.html

Issue 1464253002: Fix non-<number> calcs being accepted as numbers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | third_party/WebKit/LayoutTests/css3/flexbox/flex-property-parsing-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> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <div id="flexbox"> 7 <div id="flexbox">
8 <div id="flexitem"></div> 8 <div id="flexitem"></div>
9 </div> 9 </div>
10 <script> 10 <script>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 shouldBeEqualToString('getComputedStyle(flexitem).flex', '1.75 2 3px'); 142 shouldBeEqualToString('getComputedStyle(flexitem).flex', '1.75 2 3px');
143 143
144 flexitem.style.flex = '1 auto 1'; // Invalid, return previous value. 144 flexitem.style.flex = '1 auto 1'; // Invalid, return previous value.
145 shouldBeEqualToString('flexitem.style.flex', '1.75 2 3px'); 145 shouldBeEqualToString('flexitem.style.flex', '1.75 2 3px');
146 shouldBeEqualToString('getComputedStyle(flexitem).flex', '1.75 2 3px'); 146 shouldBeEqualToString('getComputedStyle(flexitem).flex', '1.75 2 3px');
147 147
148 flexitem.style.flex = '3px 1 2'; 148 flexitem.style.flex = '3px 1 2';
149 shouldBeEqualToString('flexitem.style.flex', '1 2 3px'); 149 shouldBeEqualToString('flexitem.style.flex', '1 2 3px');
150 shouldBeEqualToString('getComputedStyle(flexitem).flex', '1 2 3px'); 150 shouldBeEqualToString('getComputedStyle(flexitem).flex', '1 2 3px');
151 151
152 flexitem.style.flex = 'calc(20px + 40%) 4 3';
153 shouldBeEqualToString('flexitem.style.flex', '4 3 calc(20px + 40%)');
154 shouldBeEqualToString('getComputedStyle(flexitem).flex', '4 3 calc(20px + 40%)') ;
155
156 flexitem.style.flex = '1 2 calc(10px + 50%)';
157 shouldBeEqualToString('flexitem.style.flex', '1 2 calc(10px + 50%)');
158 shouldBeEqualToString('getComputedStyle(flexitem).flex', '1 2 calc(10px + 50%)') ;
159
152 flexitem.style.flex = 'auto 0 0'; 160 flexitem.style.flex = 'auto 0 0';
153 shouldBeEqualToString('flexitem.style.flex', '0 0 auto'); 161 shouldBeEqualToString('flexitem.style.flex', '0 0 auto');
154 shouldBeEqualToString('getComputedStyle(flexitem).flex', '0 0 auto'); 162 shouldBeEqualToString('getComputedStyle(flexitem).flex', '0 0 auto');
155 163
156 flexitem.style.flex = 'auto 0'; 164 flexitem.style.flex = 'auto 0';
157 shouldBeEqualToString('flexitem.style.flex', '0 1 auto'); 165 shouldBeEqualToString('flexitem.style.flex', '0 1 auto');
158 shouldBeEqualToString('getComputedStyle(flexitem).flex', '0 1 auto'); 166 shouldBeEqualToString('getComputedStyle(flexitem).flex', '0 1 auto');
159 167
160 flexitem.style.flex = 'auto 3'; 168 flexitem.style.flex = 'auto 3';
161 shouldBeEqualToString('flexitem.style.flex', '3 1 auto'); 169 shouldBeEqualToString('flexitem.style.flex', '3 1 auto');
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 shouldBeEqualToString('flexitem.style.flex', 'initial'); 238 shouldBeEqualToString('flexitem.style.flex', 'initial');
231 shouldBeEqualToString('getComputedStyle(flexitem).flex', '0 1 auto'); 239 shouldBeEqualToString('getComputedStyle(flexitem).flex', '0 1 auto');
232 240
233 flexitem.style.flex = 'none'; 241 flexitem.style.flex = 'none';
234 // FIXME: This test case is failing. https://bugs.webkit.org/show_bug.cgi?id=900 20 242 // FIXME: This test case is failing. https://bugs.webkit.org/show_bug.cgi?id=900 20
235 shouldBeEqualToString('flexitem.style.flex', '0 0 auto'); 243 shouldBeEqualToString('flexitem.style.flex', '0 0 auto');
236 shouldBeEqualToString('getComputedStyle(flexitem).flex', '0 0 auto'); 244 shouldBeEqualToString('getComputedStyle(flexitem).flex', '0 0 auto');
237 </script> 245 </script>
238 </body> 246 </body>
239 </html> 247 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/css3/flexbox/flex-property-parsing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698