| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 #placeItemsNormal { | 5 #placeItemsNormal { |
| 6 place-items: normal; | 6 place-items: normal; |
| 7 } | 7 } |
| 8 #placeItemsCenterAuto { | 8 #placeItemsCenterAuto { |
| 9 place-items: center auto; | 9 place-items: center auto; |
| 10 } | 10 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } | 51 } |
| 52 #placeItemsNone { | 52 #placeItemsNone { |
| 53 place-items: none; | 53 place-items: none; |
| 54 } | 54 } |
| 55 #placeItemsSafe { | 55 #placeItemsSafe { |
| 56 place-items: safe; | 56 place-items: safe; |
| 57 } | 57 } |
| 58 #placeItemsStartSafe { | 58 #placeItemsStartSafe { |
| 59 place-items: start safe; | 59 place-items: start safe; |
| 60 } | 60 } |
| 61 #placeItemsBaselineSafe { | |
| 62 place-items: baseline safe; | |
| 63 } | |
| 64 #placeItemsStartEndLeft { | 61 #placeItemsStartEndLeft { |
| 65 place-items: start end left; | 62 place-items: start end left; |
| 66 } | 63 } |
| 67 </style> | 64 </style> |
| 68 <script src="../../resources/testharness.js"></script> | 65 <script src="../../resources/testharness.js"></script> |
| 69 <script src="../../resources/testharnessreport.js"></script> | 66 <script src="../../resources/testharnessreport.js"></script> |
| 70 <script src="resources/alignment-parsing-utils-th.js"></script> | 67 <script src="resources/alignment-parsing-utils-th.js"></script> |
| 71 </head> | 68 </head> |
| 72 <body> | 69 <body> |
| 73 <p>Test to verify that the new place-items alignment shorthand is parsed as ex
pected and correctly sets the longhand values.</p> | 70 <p>Test to verify that the new place-items alignment shorthand is parsed as ex
pected and correctly sets the longhand values.</p> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 checkValues(placeItemsSafe, "placeItems", "place-items", "", "normal normal"); | 200 checkValues(placeItemsSafe, "placeItems", "place-items", "", "normal normal"); |
| 204 checkPlaceItemsValues(placeItemsSafe, "", "normal", "normal"); | 201 checkPlaceItemsValues(placeItemsSafe, "", "normal", "normal"); |
| 205 }, "Test setting 'safe' as incorrect value through CSS."); | 202 }, "Test setting 'safe' as incorrect value through CSS."); |
| 206 | 203 |
| 207 test(function() { | 204 test(function() { |
| 208 checkValues(placeItemsStartSafe, "placeItems", "place-items", "", "normal norm
al"); | 205 checkValues(placeItemsStartSafe, "placeItems", "place-items", "", "normal norm
al"); |
| 209 checkPlaceItemsValues(placeItemsStartSafe, "", "normal", "normal"); | 206 checkPlaceItemsValues(placeItemsStartSafe, "", "normal", "normal"); |
| 210 }, "Test setting 'start safe' as incorrect value through CSS."); | 207 }, "Test setting 'start safe' as incorrect value through CSS."); |
| 211 | 208 |
| 212 test(function() { | 209 test(function() { |
| 213 checkValues(placeItemsBaselineSafe, "placeItems", "place-items", "", "normal n
ormal"); | 210 checkValues(placeItemsStartSafe, "placeItems", "place-items", "", "normal norm
al"); |
| 214 checkPlaceItemsValues(placeItemsBaselineSafe, "", "normal", "normal"); | 211 checkPlaceItemsValues(placeItemsStartSafe, "", "normal", "normal"); |
| 215 }, "Test setting 'baseline safe' as incorrect value through CSS."); | 212 }, "Test setting 'baseline safe' as incorrect value through CSS."); |
| 216 | 213 |
| 217 test(function() { | 214 test(function() { |
| 218 checkValues(placeItemsStartEndLeft, "placeItems", "place-items", "", "normal n
ormal"); | 215 checkValues(placeItemsStartEndLeft, "placeItems", "place-items", "", "normal n
ormal"); |
| 219 checkPlaceItemsValues(placeItemsStartEndLeft, "", "normal", "normal"); | 216 checkPlaceItemsValues(placeItemsStartEndLeft, "", "normal", "normal"); |
| 220 }, "Test setting 'start end left' as incorrect value through CSS."); | 217 }, "Test setting 'start end left' as incorrect value through CSS."); |
| 221 | 218 |
| 222 test(function() { | 219 test(function() { |
| 223 checkPlaceItemsValuesJS("center", "center", "center"); | 220 checkPlaceItemsValuesJS("center", "center", "center"); |
| 224 checkPlaceItemsValuesJS("center start", "center", "start"); | 221 checkPlaceItemsValuesJS("center start", "center", "start"); |
| 225 checkPlaceItemsValuesJS("self-start end", "self-start", "end"); | 222 checkPlaceItemsValuesJS("self-start end", "self-start", "end"); |
| 226 checkPlaceItemsValuesJS("normal end", "normal", "end"); | 223 checkPlaceItemsValuesJS("normal end", "normal", "end"); |
| 227 }, "Test setting values through JS."); | 224 }, "Test setting values through JS."); |
| 228 | 225 |
| 229 test(function() { | 226 test(function() { |
| 230 checkPlaceItemsValuesBadJS("auto normal"); | 227 checkPlaceItemsValuesBadJS("auto normal", "normal", "normal"); |
| 231 checkPlaceItemsValuesBadJS("space-between"); | 228 checkPlaceItemsValuesBadJS("space-between", "normal", "normal"); |
| 232 checkPlaceItemsValuesBadJS("center safe"); | 229 checkPlaceItemsValuesBadJS("center safe", "normal", "normal"); |
| 233 checkPlaceItemsValuesBadJS("center self-start center"); | 230 checkPlaceItemsValuesBadJS("center self-start center", "normal", "normal"); |
| 234 checkPlaceItemsValuesBadJS("asrt", "normal"); | 231 checkPlaceItemsValuesBadJS("asrt", "normal", "normal"); |
| 235 checkPlaceItemsValuesBadJS("auto", "normal"); | 232 checkPlaceItemsValuesBadJS("auto", "normal", "normal"); |
| 236 checkPlaceItemsValuesBadJS("10px", "normal"); | 233 checkPlaceItemsValuesBadJS("10px", "normal", "normal"); |
| 237 checkPlaceItemsValuesBadJS("stretch safe"); | 234 checkPlaceItemsValuesBadJS("stretch safe", "normal", "normal"); |
| 238 checkPlaceItemsValuesBadJS("self-start start end"); | 235 checkPlaceItemsValuesBadJS("self-start start end", "normal", "normal"); |
| 239 checkPlaceItemsValuesBadJS(""); | 236 checkPlaceItemsValuesBadJS("", "normal", "normal"); |
| 240 }, "Test setting incorrect values through JS."); | 237 }, "Test setting incorrect values through JS."); |
| 241 | 238 |
| 242 test(function() { | 239 test(function() { |
| 243 element = document.createElement("div"); | 240 element = document.createElement("div"); |
| 244 document.body.appendChild(element); | 241 document.body.appendChild(element); |
| 245 checkValues(element, "placeItems", "place-items", "", "normal normal"); | 242 checkValues(element, "placeItems", "place-items", "", "normal normal"); |
| 246 element.style.placeItems = "center"; | 243 element.style.placeItems = "center"; |
| 247 checkPlaceItemsValues(element, "center", "center", "center"); | 244 checkPlaceItemsValues(element, "center", "center", "center"); |
| 248 element.style.placeItems = "initial"; | 245 element.style.placeItems = "initial"; |
| 249 checkValues(element, "placeItems", "place-items", "initial", "normal normal"); | 246 checkValues(element, "placeItems", "place-items", "initial", "normal normal"); |
| 250 checkPlaceItemsValues(element, "initial", "normal", "normal"); | 247 checkPlaceItemsValues(element, "initial", "normal", "normal"); |
| 251 }, "Test the 'initial' value of the place-items shorthand and its longhand prope
rties' Computed value"); | 248 }, "Test the 'initial' value of the place-items shorthand and its longhand prope
rties' Computed value"); |
| 252 | 249 |
| 253 test(function() { | 250 test(function() { |
| 254 document.body.style.placeItems = "start"; | 251 document.body.style.placeItems = "start"; |
| 255 var anotherElement = document.createElement("div"); | 252 var anotherElement = document.createElement("div"); |
| 256 document.body.appendChild(anotherElement); | 253 document.body.appendChild(anotherElement); |
| 257 checkPlaceItemsValues(anotherElement, "", "normal", "normal"); | 254 checkPlaceItemsValues(anotherElement, "", "normal", "normal"); |
| 258 anotherElement.style.placeItems = "inherit"; | 255 anotherElement.style.placeItems = "inherit"; |
| 259 checkPlaceItemsValues(anotherElement, "inherit", "start", "start"); | 256 checkPlaceItemsValues(anotherElement, "inherit", "start", "start"); |
| 260 }, "Test the 'inherit' value of the place-items shorthand and its longhand prope
rties' Computed value"); | 257 }, "Test the 'inherit' value of the place-items shorthand and its longhand prope
rties' Computed value"); |
| 261 </script> | 258 </script> |
| 262 </body> | 259 </body> |
| 263 </html> | 260 </html> |
| OLD | NEW |