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

Side by Side Diff: LayoutTests/css3/flexbox/css-properties.html

Issue 1136283006: [CSS Grid Layout] Avoid using StyleAdjuster to resolve 'auto' values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed some layout tests failures. 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/css3/flexbox/css-properties-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 "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 shouldBeEqualToString('flexitem.style.order', '0'); 46 shouldBeEqualToString('flexitem.style.order', '0');
47 47
48 flexitem.style.order = "test"; 48 flexitem.style.order = "test";
49 shouldBeEqualToString('flexitem.style.order', '0'); 49 shouldBeEqualToString('flexitem.style.order', '0');
50 50
51 flexitem.style.order = ''; 51 flexitem.style.order = '';
52 shouldBeEqualToString('flexitem.style.order', ''); 52 shouldBeEqualToString('flexitem.style.order', '');
53 53
54 54
55 shouldBeEqualToString('flexbox.style.justifyContent', ''); 55 shouldBeEqualToString('flexbox.style.justifyContent', '');
56 // The initial value is 'flex-start'. 56 // The initial value is 'auto' which, will be resolve to 'stretch' for flexbox c ontainers (behaving like 'flex-start' for the justify-content property).
57 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' flex-start'); 57 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' stretch');
58 58
59 flexbox.style.justifyContent = 'foo'; 59 flexbox.style.justifyContent = 'foo';
60 shouldBeEqualToString('flexbox.style.justifyContent', ''); 60 shouldBeEqualToString('flexbox.style.justifyContent', '');
61 61
62 flexbox.style.justifyContent = 'flex-start'; 62 flexbox.style.justifyContent = 'flex-start';
63 shouldBeEqualToString('flexbox.style.justifyContent', 'flex-start'); 63 shouldBeEqualToString('flexbox.style.justifyContent', 'flex-start');
64 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' flex-start'); 64 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' flex-start');
65 65
66 flexbox.style.justifyContent = 'flex-end'; 66 flexbox.style.justifyContent = 'flex-end';
67 shouldBeEqualToString('flexbox.style.justifyContent', 'flex-end'); 67 shouldBeEqualToString('flexbox.style.justifyContent', 'flex-end');
68 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' flex-end'); 68 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' flex-end');
69 69
70 flexbox.style.justifyContent = 'center'; 70 flexbox.style.justifyContent = 'center';
71 shouldBeEqualToString('flexbox.style.justifyContent', 'center'); 71 shouldBeEqualToString('flexbox.style.justifyContent', 'center');
72 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' center'); 72 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' center');
73 73
74 flexbox.style.justifyContent = 'space-between'; 74 flexbox.style.justifyContent = 'space-between';
75 shouldBeEqualToString('flexbox.style.justifyContent', 'space-between'); 75 shouldBeEqualToString('flexbox.style.justifyContent', 'space-between');
76 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' space-between'); 76 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' space-between');
77 77
78 flexbox.style.justifyContent = ''; 78 flexbox.style.justifyContent = '';
79 shouldBeEqualToString('flexbox.style.justifyContent', ''); 79 shouldBeEqualToString('flexbox.style.justifyContent', '');
80 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' flex-start'); 80 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', ' stretch');
81 81
82 shouldBeEqualToString('flexbox.style.alignSelf', ''); 82 shouldBeEqualToString('flexbox.style.alignSelf', '');
83 // The initial value is 'auto', which will be resolved depending on parent's sty le (except for the 'document' element). 83 // The initial value is 'auto', which will be resolved depending on parent's sty le (except for the 'document' element).
84 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'start '); 84 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'start ');
85 shouldBeEqualToString('window.getComputedStyle(document.documentElement, null).a lignSelf', 'start'); 85 shouldBeEqualToString('window.getComputedStyle(document.documentElement, null).a lignSelf', 'start');
86 86
87 flexbox.style.alignSelf = 'foo'; 87 flexbox.style.alignSelf = 'foo';
88 shouldBeEqualToString('flexbox.style.alignSelf', ''); 88 shouldBeEqualToString('flexbox.style.alignSelf', '');
89 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'start '); 89 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'start ');
90 90
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'base line'); 160 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'base line');
161 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'base line'); 161 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'base line');
162 162
163 flexbox.style.alignItems = ''; 163 flexbox.style.alignItems = '';
164 shouldBeEqualToString('flexbox.style.alignItems', ''); 164 shouldBeEqualToString('flexbox.style.alignItems', '');
165 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'stre tch'); 165 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'stre tch');
166 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'stre tch'); 166 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'stre tch');
167 167
168 flexbox.style.display = 'none'; 168 flexbox.style.display = 'none';
169 shouldBeEqualToString('flexbox.style.alignItems', ''); 169 shouldBeEqualToString('flexbox.style.alignItems', '');
170 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'star t'); 170 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'auto ');
171 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'star t'); 171 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'auto ');
172 flexbox.style.display = 'flex'; 172 flexbox.style.display = 'flex';
173 173
174 174
175 // FIXME: This should probably return stretch. See https://bugs.webkit.org/show_ bug.cgi?id=14563. 175 // FIXME: This should probably return stretch. See https://bugs.webkit.org/show_ bug.cgi?id=14563.
176 var detachedFlexbox = document.createElement('div'); 176 var detachedFlexbox = document.createElement('div');
177 var detachedFlexItem = document.createElement('div'); 177 var detachedFlexItem = document.createElement('div');
178 detachedFlexbox.appendChild(detachedFlexItem); 178 detachedFlexbox.appendChild(detachedFlexItem);
179 shouldBeEqualToString('window.getComputedStyle(detachedFlexbox, null).alignSelf' , ''); 179 shouldBeEqualToString('window.getComputedStyle(detachedFlexbox, null).alignSelf' , '');
180 shouldBeEqualToString('window.getComputedStyle(detachedFlexItem, null).alignSelf ', ''); 180 shouldBeEqualToString('window.getComputedStyle(detachedFlexItem, null).alignSelf ', '');
181 181
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 flexbox.style.alignContent = ''; 307 flexbox.style.alignContent = '';
308 shouldBeEqualToString('flexbox.style.alignContent', ''); 308 shouldBeEqualToString('flexbox.style.alignContent', '');
309 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignContent', 'st retch'); 309 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignContent', 'st retch');
310 310
311 flexbox.style.alignContent = 'foo'; 311 flexbox.style.alignContent = 'foo';
312 shouldBeEqualToString('flexbox.style.alignContent', ''); 312 shouldBeEqualToString('flexbox.style.alignContent', '');
313 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignContent', 'st retch'); 313 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignContent', 'st retch');
314 </script> 314 </script>
315 </body> 315 </body>
316 </html> 316 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/css3/flexbox/css-properties-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698