OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
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 <style> | 8 <style> |
9 .gridItemWithPositiveInteger { | 9 .gridItemWithPositiveInteger { |
10 -webkit-grid-column: 10; | 10 -webkit-grid-column: 10; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 element.style.webkitGridColumn = "auto"; | 121 element.style.webkitGridColumn = "auto"; |
122 element.style.webkitGridRow = "auto"; | 122 element.style.webkitGridRow = "auto"; |
123 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-colum
n')", "'auto / auto'"); | 123 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-colum
n')", "'auto / auto'"); |
124 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-start
')", "'auto'"); | 124 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-start
')", "'auto'"); |
125 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-end')
", "'auto'"); | 125 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-end')
", "'auto'"); |
126 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-row')
", "'auto / auto'"); | 126 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-row')
", "'auto / auto'"); |
127 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-befor
e')", "'auto'"); | 127 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-befor
e')", "'auto'"); |
128 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-after
')", "'auto'"); | 128 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-after
')", "'auto'"); |
129 | 129 |
130 debug(""); | 130 debug(""); |
| 131 debug("Test getting and setting 'initial' grid-column and grid-row through J
S"); |
| 132 testColumnRowInitialJSParsing(); |
| 133 |
| 134 debug(""); |
| 135 debug("Test getting and setting 'inherit' grid-column and grid-row through J
S"); |
| 136 testColumnRowInheritJSParsing("1 / auto", "inherit"); |
| 137 testColumnRowInheritJSParsing("inherit", "1 / auto"); |
| 138 testColumnRowInheritJSParsing("inherit", "inherit"); |
| 139 |
| 140 debug(""); |
131 debug("Test getting and setting invalid grid-column and grid-row through JS"
); | 141 debug("Test getting and setting invalid grid-column and grid-row through JS"
); |
132 testColumnRowInvalidJSParsing("4 5", "5 8"); | 142 testColumnRowInvalidJSParsing("4 5", "5 8"); |
133 testColumnRowInvalidJSParsing("4 /", "5 /"); | 143 testColumnRowInvalidJSParsing("4 /", "5 /"); |
134 testColumnRowInvalidJSParsing("5 / none", "8 / foobar"); | 144 testColumnRowInvalidJSParsing("5 / none", "8 / foobar"); |
135 testColumnRowInvalidJSParsing("5 5", "8 auto"); | 145 testColumnRowInvalidJSParsing("5 5", "8 auto"); |
136 testColumnRowInvalidJSParsing("5 / /", "8 / /"); | 146 testColumnRowInvalidJSParsing("5 / /", "8 / /"); |
137 | 147 |
138 // 0 is invalid. | 148 // 0 is invalid. |
139 testColumnRowInvalidJSParsing("0 / 5", "0 / 6"); | 149 testColumnRowInvalidJSParsing("0 / 5", "0 / 6"); |
140 testColumnRowInvalidJSParsing("6 / 0", "8 / 0"); | 150 testColumnRowInvalidJSParsing("6 / 0", "8 / 0"); |
141 testColumnRowInvalidJSParsing("0", "0"); | 151 testColumnRowInvalidJSParsing("0", "0"); |
142 | 152 |
143 testColumnRowInvalidJSParsing("span span / span span", "span span / span spa
n"); | 153 testColumnRowInvalidJSParsing("span span / span span", "span span / span spa
n"); |
144 | 154 |
145 // Negative integer or 0 are invalid. | 155 // Negative integer or 0 are invalid. |
146 testColumnRowInvalidJSParsing("span -1 / -2 span", "-3 span / span -4"); | 156 testColumnRowInvalidJSParsing("span -1 / -2 span", "-3 span / span -4"); |
147 testColumnRowInvalidJSParsing("0 span / span 0", "span 0 / 0 span"); | 157 testColumnRowInvalidJSParsing("0 span / span 0", "span 0 / 0 span"); |
148 | 158 |
149 // Spans for both initial / final values is not allowed. | 159 // Spans for both initial / final values is not allowed. |
150 testColumnRowInvalidJSParsing("5 span / span 2", "span 4 / 3 span"); | 160 testColumnRowInvalidJSParsing("5 span / span 2", "span 4 / 3 span"); |
151 </script> | 161 </script> |
152 <script src="../js/resources/js-test-post.js"></script> | 162 <script src="../js/resources/js-test-post.js"></script> |
153 </body> | 163 </body> |
154 </html> | 164 </html> |
OLD | NEW |