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

Side by Side Diff: LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set.html

Issue 360233002: [CSS Grid Layout] Add element.style coverage for grid-auto-flow (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-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 <link href="resources/grid.css" rel="stylesheet"> 4 <link href="resources/grid.css" rel="stylesheet">
5 <style> 5 <style>
6 .gridAutoFlowColumnDense { 6 .gridAutoFlowColumnDense {
7 grid-auto-flow: column dense; 7 grid-auto-flow: column dense;
8 } 8 }
9 .gridAutoFlowRowDense { 9 .gridAutoFlowRowDense {
10 grid-auto-flow: row dense; 10 grid-auto-flow: row dense;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 debug(""); 162 debug("");
163 debug("Test the initial value"); 163 debug("Test the initial value");
164 element = document.createElement("div"); 164 element = document.createElement("div");
165 document.body.appendChild(element); 165 document.body.appendChild(element);
166 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'"); 166 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'");
167 167
168 debug(""); 168 debug("");
169 debug("Test getting and setting grid-auto-flow through JS"); 169 debug("Test getting and setting grid-auto-flow through JS");
170 element.style.gridAutoFlow = "column"; 170 element.style.gridAutoFlow = "column";
171 shouldBe("element.style.gridAutoFlow", "'column'");
171 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'column'"); 172 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'column'");
172 element.style.gridAutoFlow = "column dense"; 173 element.style.gridAutoFlow = "column dense";
174 shouldBe("element.style.gridAutoFlow", "'column dense'");
173 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'column dense'"); 175 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'column dense'");
174 element.style.gridAutoFlow = "row dense"; 176 element.style.gridAutoFlow = "row dense";
177 shouldBe("element.style.gridAutoFlow", "'row dense'");
175 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row dense'"); 178 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row dense'");
176 element.style.gridAutoFlow = "dense column"; 179 element.style.gridAutoFlow = "dense column";
180 shouldBe("element.style.gridAutoFlow", "'dense column'");
177 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'column dense'"); 181 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'column dense'");
178 element.style.gridAutoFlow = "dense row"; 182 element.style.gridAutoFlow = "dense row";
183 shouldBe("element.style.gridAutoFlow", "'dense row'");
179 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row dense'"); 184 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row dense'");
180 element.style.gridAutoFlow = "row"; 185 element.style.gridAutoFlow = "row";
186 shouldBe("element.style.gridAutoFlow", "'row'");
181 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'"); 187 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'");
182 element.style.gridAutoFlow = "stack"; 188 element.style.gridAutoFlow = "stack";
189 shouldBe("element.style.gridAutoFlow", "'stack'");
183 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'stack row'"); 190 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'stack row'");
184 element.style.gridAutoFlow = "stack column"; 191 element.style.gridAutoFlow = "stack column";
192 shouldBe("element.style.gridAutoFlow", "'stack column'");
185 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'stack column'"); 193 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'stack column'");
186 element.style.gridAutoFlow = "stack row"; 194 element.style.gridAutoFlow = "stack row";
195 shouldBe("element.style.gridAutoFlow", "'stack row'");
187 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'stack row'"); 196 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'stack row'");
188 element.style.gridAutoFlow = "column stack"; 197 element.style.gridAutoFlow = "column stack";
198 shouldBe("element.style.gridAutoFlow", "'column stack'");
189 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'stack column'"); 199 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'stack column'");
190 element.style.gridAutoFlow = "row stack"; 200 element.style.gridAutoFlow = "row stack";
201 shouldBe("element.style.gridAutoFlow", "'row stack'");
191 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'stack row'"); 202 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'stack row'");
192 203
193 debug(""); 204 debug("");
194 debug("Test getting and setting bad values for grid-auto-flow through JS"); 205 debug("Test getting and setting bad values for grid-auto-flow through JS");
195 element = document.createElement("div"); 206 element = document.createElement("div");
196 document.body.appendChild(element); 207 document.body.appendChild(element);
197 element.style.gridAutoFlow = "noone"; 208 element.style.gridAutoFlow = "noone";
209 shouldBe("element.style.gridAutoFlow", "''");
Julien - ping for review 2014/07/15 01:10:03 Shouldn't we return row here to match getComputedS
198 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'"); 210 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'");
199 element.style.gridAutoFlow = "dense"; 211 element.style.gridAutoFlow = "dense";
212 shouldBe("element.style.gridAutoFlow", "''");
200 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'"); 213 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'");
201 element.style.gridAutoFlow = "column column"; 214 element.style.gridAutoFlow = "column column";
215 shouldBe("element.style.gridAutoFlow", "''");
202 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'"); 216 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'");
203 element.style.gridAutoFlow = "dense column stack"; 217 element.style.gridAutoFlow = "dense column stack";
218 shouldBe("element.style.gridAutoFlow", "''");
204 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'"); 219 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'");
205 element.style.gridAutoFlow = "dense row stack"; 220 element.style.gridAutoFlow = "dense row stack";
221 shouldBe("element.style.gridAutoFlow", "''");
206 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'"); 222 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'");
207 element.style.gridAutoFlow = "stack row row"; 223 element.style.gridAutoFlow = "stack row row";
224 shouldBe("element.style.gridAutoFlow", "''");
208 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'"); 225 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'");
209 226
210 debug(""); 227 debug("");
211 debug("Test setting grid-auto-flow to 'initial' through JS"); 228 debug("Test setting grid-auto-flow to 'initial' through JS");
212 // Reusing the value so that we can check that it is set back to its initial value. 229 // Reusing the value so that we can check that it is set back to its initial value.
213 element.style.gridAutoFlow = "initial"; 230 element.style.gridAutoFlow = "initial";
231 shouldBe("element.style.gridAutoFlow", "'initial'");
214 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'"); 232 shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-f low')", "'row'");
215 </script> 233 </script>
216 </body> 234 </body>
217 </html> 235 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698