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

Side by Side Diff: LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html

Issue 22353013: [CSS Grid Layout] Unknown grid area should compute to 'auto' (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 <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 .grid { 6 .grid {
7 grid-template: "firstArea" "secondArea" 7 grid-template: "firstArea secondArea"
8 "thirdArea" "thirdArea"; 8 "thirdArea thirdArea";
9 } 9 }
10 10
11 .gridItemWithPositiveInteger { 11 .gridItemWithPositiveInteger {
12 grid-column: 10; 12 grid-column: 10;
13 grid-row: 15; 13 grid-row: 15;
14 } 14 }
15 .gridItemWithNegativeInteger { 15 .gridItemWithNegativeInteger {
16 grid-column: -10; 16 grid-column: -10;
17 grid-row: -15; 17 grid-row: -15;
18 } 18 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 testColumnRowJSParsing("10 / 55", "1 / 10"); 137 testColumnRowJSParsing("10 / 55", "1 / 10");
138 testColumnRowJSParsing("span 5 / 5", "4 / span 4"); 138 testColumnRowJSParsing("span 5 / 5", "4 / span 4");
139 testColumnRowJSParsing("-5 / 5", "4 / -4"); 139 testColumnRowJSParsing("-5 / 5", "4 / -4");
140 testColumnRowJSParsing("4 / auto", "5 / auto"); 140 testColumnRowJSParsing("4 / auto", "5 / auto");
141 testColumnRowJSParsing("auto / 5", "auto / 8"); 141 testColumnRowJSParsing("auto / 5", "auto / 8");
142 testColumnRowJSParsing("span / 3", "5 / span", "span 1 / 3", "5 / span 1"); 142 testColumnRowJSParsing("span / 3", "5 / span", "span 1 / 3", "5 / span 1");
143 testColumnRowJSParsing("'first' span / 3", "5 / 'last' span", "span 1 first / 3", "5 / span 1 last"); 143 testColumnRowJSParsing("'first' span / 3", "5 / 'last' span", "span 1 first / 3", "5 / span 1 last");
144 testColumnRowJSParsing("'first' / 'last'", "'nav' / 'last' span", "1 first / 1 last", "1 nav / span 1 last"); 144 testColumnRowJSParsing("'first' / 'last'", "'nav' / 'last' span", "1 first / 1 last", "1 nav / span 1 last");
145 testColumnRowJSParsing("3 'first' / 2 'last'", "5 'nav' / 'last' 7 span", "3 first / 2 last", "5 nav / span 7 last"); 145 testColumnRowJSParsing("3 'first' / 2 'last'", "5 'nav' / 'last' 7 span", "3 first / 2 last", "5 nav / span 7 last");
146 testColumnRowJSParsing("3 'first' span / -3 'last'", "'last' 2 span / -1 'na v'", "span 3 first / -3 last", "span 2 last / -1 nav"); 146 testColumnRowJSParsing("3 'first' span / -3 'last'", "'last' 2 span / -1 'na v'", "span 3 first / -3 last", "span 2 last / -1 nav");
147 testColumnRowJSParsing("5 / none", "8 / foobar"); 147 testColumnRowJSParsing("5 / none", "8 / foobar", "5 / auto", "8 / auto");
148 testColumnRowJSParsing("nonExistent / none", "nonExistent / foobar"); 148 testColumnRowJSParsing("nonExistent / none", "nonExistent / foobar", "auto / auto", "auto / auto");
149 testColumnRowJSParsing("span 'first' 3 / none", "'last' span / foobar", "spa n 3 first / none", "span 1 last / foobar"); 149 testColumnRowJSParsing("span 'first' 3 / none", "'last' span / foobar", "spa n 3 first / auto", "span 1 last / auto");
150 150
151 debug(""); 151 debug("");
152 debug("Test setting grid-column and grid-row back to 'auto' through JS"); 152 debug("Test setting grid-column and grid-row back to 'auto' through JS");
153 element.style.gridColumn = "18 / 19"; 153 element.style.gridColumn = "18 / 19";
154 element.style.gridRow = "66 / 68"; 154 element.style.gridRow = "66 / 68";
155 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column')", "' 18 / 19'"); 155 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column')", "' 18 / 19'");
156 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column-start' )", "'18'"); 156 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column-start' )", "'18'");
157 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column-end')" , "'19'"); 157 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column-end')" , "'19'");
158 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row')", "'66 / 68'"); 158 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row')", "'66 / 68'");
159 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row-start')", "'66'"); 159 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row-start')", "'66'");
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 testColumnRowInvalidJSParsing("'first' -1 span / span 'last'", "span -2 'fir st' / span 'last'"); 221 testColumnRowInvalidJSParsing("'first' -1 span / span 'last'", "span -2 'fir st' / span 'last'");
222 222
223 // We don't allow span to be between the <integer> and the <string>. 223 // We don't allow span to be between the <integer> and the <string>.
224 testColumnRowInvalidJSParsing("'first' span 1 / 'last'", "2 span 'first' / ' last'"); 224 testColumnRowInvalidJSParsing("'first' span 1 / 'last'", "2 span 'first' / ' last'");
225 testColumnRowInvalidJSParsing("3 'first' / 2 span 'last'", "5 'nav' / 'last' span 7"); 225 testColumnRowInvalidJSParsing("3 'first' / 2 span 'last'", "5 'nav' / 'last' span 7");
226 testColumnRowInvalidJSParsing("3 / 1 span 2", "5 / 3 span 3"); 226 testColumnRowInvalidJSParsing("3 / 1 span 2", "5 / 3 span 3");
227 </script> 227 </script>
228 <script src="../js/resources/js-test-post.js"></script> 228 <script src="../js/resources/js-test-post.js"></script>
229 </body> 229 </body>
230 </html> 230 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698