OLD | NEW |
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 #gridWithSingleStringTemplate { | 6 #gridWithSingleStringTemplate { |
7 grid-template-areas: "area"; | 7 grid-template-areas: "area"; |
8 } | 8 } |
9 | 9 |
10 #gridWithTwoColumnsTemplate { | 10 #gridWithTwoColumnsTemplate { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", '"foobar"') | 148 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", '"foobar"') |
149 element.style.gridTemplateAreas = "none"; | 149 element.style.gridTemplateAreas = "none"; |
150 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", 'none'); | 150 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", 'none'); |
151 document.body.removeChild(element); | 151 document.body.removeChild(element); |
152 | 152 |
153 debug("Test grid-template-areas: inherit"); | 153 debug("Test grid-template-areas: inherit"); |
154 var parentElement = document.createElement("div"); | 154 var parentElement = document.createElement("div"); |
155 document.body.appendChild(parentElement); | 155 document.body.appendChild(parentElement); |
156 parentElement.style.gridTemplateAreas = "'foo bar'"; | 156 parentElement.style.gridTemplateAreas = "'foo bar'"; |
157 shouldBeEqualToString("window.getComputedStyle(parentElement).getPropertyVal
ue('grid-template-areas')", '"foo bar"') | 157 shouldBeEqualToString("window.getComputedStyle(parentElement).getPropertyVal
ue('grid-template-areas')", '"foo bar"') |
| 158 parentElement.style.gridTemplateAreas = "'foo" + "\t" + "bar'"; |
| 159 shouldBeEqualToString("window.getComputedStyle(parentElement).getPropertyVal
ue('grid-template-areas')", '"foo bar"') |
| 160 parentElement.style.gridTemplateAreas = "'foo" + "\n" + "bar'"; |
| 161 shouldBeEqualToString("window.getComputedStyle(parentElement).getPropertyVal
ue('grid-template-areas')", '"foo bar"') |
158 | 162 |
159 var element = document.createElement("div"); | 163 var element = document.createElement("div"); |
160 parentElement.appendChild(element); | 164 parentElement.appendChild(element); |
161 element.style.gridTemplateAreas = "inherit"; | 165 element.style.gridTemplateAreas = "inherit"; |
162 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", '"foo bar"') | 166 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", '"foo bar"') |
163 document.body.removeChild(parentElement); | 167 document.body.removeChild(parentElement); |
164 | 168 |
165 debug("Test invalid grid-template-areas values."); | 169 debug("Test invalid grid-template-areas values."); |
166 var element = document.createElement("div"); | 170 var element = document.createElement("div"); |
167 document.body.appendChild(element); | 171 document.body.appendChild(element); |
(...skipping 11 matching lines...) Expand all Loading... |
179 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") | 183 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") |
180 | 184 |
181 // The rows don't have the same number of columns. | 185 // The rows don't have the same number of columns. |
182 element.style.gridTemplateAreas = "'nav head' 'foot'"; | 186 element.style.gridTemplateAreas = "'nav head' 'foot'"; |
183 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") | 187 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") |
184 | 188 |
185 // Empty rows. | 189 // Empty rows. |
186 element.style.gridTemplateAreas = "'' ''"; | 190 element.style.gridTemplateAreas = "'' ''"; |
187 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") | 191 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") |
188 | 192 |
| 193 element.style.gridTemplateAreas = "'^nav'"; |
| 194 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") |
| 195 element.style.gridTemplateAreas = "'n^av'"; |
| 196 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") |
| 197 |
| 198 element.style.gridTemplateAreas = "'\x04nav'"; |
| 199 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") |
| 200 element.style.gridTemplateAreas = "'n\x04av'"; |
| 201 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") |
| 202 |
189 debug(""); | 203 debug(""); |
190 debug("FIXME: We currently don't validate that the named grid areas are <
indent>."); | 204 debug("FIXME: We currently don't validate that the named grid areas are <
indent>."); |
191 // <ident> only allows a leading '-'. | 205 // <ident> only allows a leading '-'. |
192 element.style.gridTemplateAreas = '"nav-up"'; | 206 element.style.gridTemplateAreas = '"nav-up"'; |
193 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") | 207 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('gr
id-template-areas')", "none") |
194 </script> | 208 </script> |
195 </body> | 209 </body> |
196 </html> | 210 </html> |
OLD | NEW |