OLD | NEW |
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> | 4 <script> |
5 if (window.testRunner) | 5 if (window.testRunner) |
6 testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1); | 6 testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1); |
7 </script> | 7 </script> |
8 <link href="resources/grid.css" rel="stylesheet"> | 8 <link href="resources/grid.css" rel="stylesheet"> |
9 <style> | 9 <style> |
10 .grid { | 10 .grid { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 testGridDefinitionsValues(document.getElementById("trailingNamedGridLineRepe
at"), "250px (end)", "10px (end)"); | 113 testGridDefinitionsValues(document.getElementById("trailingNamedGridLineRepe
at"), "250px (end)", "10px (end)"); |
114 testGridDefinitionsValues(document.getElementById("leadingNamedGridLineRepea
t"), "(start) 250px 250px", "(start) 10px 10px"); | 114 testGridDefinitionsValues(document.getElementById("leadingNamedGridLineRepea
t"), "(start) 250px 250px", "(start) 10px 10px"); |
115 testGridDefinitionsValues(document.getElementById("mixRepeatAfterNonRepeat")
, "(start) 140px 250px 250px", "44px 10px 10px"); | 115 testGridDefinitionsValues(document.getElementById("mixRepeatAfterNonRepeat")
, "(start) 140px 250px 250px", "44px 10px 10px"); |
116 testGridDefinitionsValues(document.getElementById("mixNonRepeatAfterRepeat")
, "250px 250px 120px (last)", "10px 10px (end) 0px"); | 116 testGridDefinitionsValues(document.getElementById("mixNonRepeatAfterRepeat")
, "250px 250px 120px (last)", "10px 10px (end) 0px"); |
117 | 117 |
118 debug(""); | 118 debug(""); |
119 debug("Test invalid repeat syntax."); | 119 debug("Test invalid repeat syntax."); |
120 function testInvalidSyntax(gridColumn) { | 120 function testInvalidSyntax(gridColumn) { |
121 element = document.createElement("div"); | 121 element = document.createElement("div"); |
122 document.body.appendChild(element); | 122 document.body.appendChild(element); |
| 123 element.style.display = "grid"; |
123 element.style.gridTemplateColumns = gridColumn; | 124 element.style.gridTemplateColumns = gridColumn; |
124 shouldBeEqualToString("window.getComputedStyle(element, '').getPropertyV
alue('grid-template-columns')", "none"); | 125 shouldBeEqualToString("window.getComputedStyle(element, '').getPropertyV
alue('grid-template-columns')", "none"); |
125 document.body.removeChild(element); | 126 document.body.removeChild(element); |
126 } | 127 } |
127 testInvalidSyntax("repeat("); | 128 testInvalidSyntax("repeat("); |
128 testInvalidSyntax("repeat()"); | 129 testInvalidSyntax("repeat()"); |
129 testInvalidSyntax("repeat(3 / auto)"); | 130 testInvalidSyntax("repeat(3 / auto)"); |
130 testInvalidSyntax("repeat(3 , ,)"); | 131 testInvalidSyntax("repeat(3 , ,)"); |
131 testInvalidSyntax("repeat(0, 15px)"); | 132 testInvalidSyntax("repeat(0, 15px)"); |
132 testInvalidSyntax("repeat(-1, auto)"); | 133 testInvalidSyntax("repeat(-1, auto)"); |
| 134 testInvalidSyntax("repeat(1, (auto) 10px)"); |
| 135 testInvalidSyntax("repeat(1, (start auto) 10px)"); |
| 136 testInvalidSyntax("repeat(1, 10px (minmax))"); |
| 137 testInvalidSyntax("repeat(1, 10px (minmax end))"); |
| 138 testInvalidSyntax("repeat(1, 2em (subgrid) 10px)"); |
| 139 testInvalidSyntax("repeat(1, 2em (middle subgrid) 10px)"); |
133 // Nesting is no allowed. | 140 // Nesting is no allowed. |
134 testInvalidSyntax("repeat(2, repeat(1, auto))"); | 141 testInvalidSyntax("repeat(2, repeat(1, auto))"); |
135 </script> | 142 </script> |
136 </body> | 143 </body> |
137 </html> | 144 </html> |
OLD | NEW |