This test checks that the 'grid-template' shorthand is properly parsed and the longhand properties correctly assigned.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


Test getting grid-template-areas set through CSS.
PASS window.getComputedStyle(gridTemplateWithNone, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateWithNone, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateWithNone, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleForm, '').getPropertyValue('-webkit-grid-template-columns') is "10px"
PASS window.getComputedStyle(gridTemplateSimpleForm, '').getPropertyValue('-webkit-grid-template-rows') is "15px"
PASS window.getComputedStyle(gridTemplateSimpleForm, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithNoneColumns, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithNoneColumns, '').getPropertyValue('-webkit-grid-template-rows') is "15px"
PASS window.getComputedStyle(gridTemplateSimpleFormWithNoneColumns, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithNoneRows, '').getPropertyValue('-webkit-grid-template-columns') is "10px"
PASS window.getComputedStyle(gridTemplateSimpleFormWithNoneRows, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithNoneRows, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithNone, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithNone, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithNone, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateComplexForm, '').getPropertyValue('-webkit-grid-template-columns') is "10px"
PASS window.getComputedStyle(gridTemplateComplexForm, '').getPropertyValue('-webkit-grid-template-rows') is "15px"
PASS window.getComputedStyle(gridTemplateComplexForm, '').getPropertyValue('-webkit-grid-template-areas') is "\"a\""
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNames, '').getPropertyValue('-webkit-grid-template-columns') is "10px"
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNames, '').getPropertyValue('-webkit-grid-template-rows') is "[head] 15px [tail]"
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNames, '').getPropertyValue('-webkit-grid-template-areas') is "\"a\""
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleColumns, '').getPropertyValue('-webkit-grid-template-columns') is "10px"
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleColumns, '').getPropertyValue('-webkit-grid-template-rows') is "[head] 15px [tail]"
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleColumns, '').getPropertyValue('-webkit-grid-template-areas') is "\"a b\""
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRows, '').getPropertyValue('-webkit-grid-template-columns') is "10px"
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRows, '').getPropertyValue('-webkit-grid-template-rows') is "[head1] 15px [tail1 head2] 20px [tail2]"
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRows, '').getPropertyValue('-webkit-grid-template-areas') is "\"a\" \"b\""
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 10px [nav nav2] 15px [nav nav2] 15px"
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns, '').getPropertyValue('-webkit-grid-template-rows') is "100px [nav nav2] 25px [nav nav2] 25px [last]"
PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns, '').getPropertyValue('-webkit-grid-template-areas') is "\"a b c\" \"d e f\" \"g h i\""
PASS window.getComputedStyle(gridTemplateComplexFormWithAuto, '').getPropertyValue('-webkit-grid-template-columns') is "10px"
PASS window.getComputedStyle(gridTemplateComplexFormWithAuto, '').getPropertyValue('-webkit-grid-template-rows') is "0px"
PASS window.getComputedStyle(gridTemplateComplexFormWithAuto, '').getPropertyValue('-webkit-grid-template-areas') is "\"a\""
PASS window.getComputedStyle(gridTemplateComplexFormOnlyAreas, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormOnlyAreas, '').getPropertyValue('-webkit-grid-template-rows') is "0px"
PASS window.getComputedStyle(gridTemplateComplexFormOnlyAreas, '').getPropertyValue('-webkit-grid-template-areas') is "\"a\""
PASS window.getComputedStyle(gridTemplateNoColumnsRowWithEmptyTrailingLineNames, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateNoColumnsRowWithEmptyTrailingLineNames, '').getPropertyValue('-webkit-grid-template-rows') is "[first] 0px"
PASS window.getComputedStyle(gridTemplateNoColumnsRowWithEmptyTrailingLineNames, '').getPropertyValue('-webkit-grid-template-areas') is "\"a\""

Test getting wrong values for grid-template shorthand through CSS (they should resolve to the default: 'none')
PASS window.getComputedStyle(gridTemplateMultipleSlash, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateMultipleSlash, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateMultipleSlash, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormJustColumns, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormJustColumns, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormJustColumns, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormNoRows, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormNoRows, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormNoRows, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormNoColumns, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormNoColumns, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormNoColumns, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormNoColumnSize, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormNoColumnSize, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormNoColumnSize, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithFitContent, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithFitContent, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithFitContent, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithWrongRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithWrongRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithWrongRepeat, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone1, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone1, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone1, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone2, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone2, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone2, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone3, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone3, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone3, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone4, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone4, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateSimpleFormWithMisplacedNone4, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormWithRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormWithRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormWithRepeat, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormWithWrongRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormWithWrongRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormWithWrongRepeat, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(griTemplateComplexFormdWithFitAvailable, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(griTemplateComplexFormdWithFitAvailable, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(griTemplateComplexFormdWithFitAvailable, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormNoColumnSize, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormNoColumnSize, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormNoColumnSize, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormMisplacedRowsSize1, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormMisplacedRowsSize1, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormMisplacedRowsSize1, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormMisplacedRowsSize2, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormMisplacedRowsSize2, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormMisplacedRowsSize2, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormColumnsNotParsing1, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormColumnsNotParsing1, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormColumnsNotParsing1, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormColumnsNotParsing2, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormColumnsNotParsing2, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormColumnsNotParsing2, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormWithNoneColumns, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormWithNoneColumns, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateComplexFormWithNoneColumns, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateNoColumnsRowWithTwoEmptyTrailingLineNames, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateNoColumnsRowWithTwoEmptyTrailingLineNames, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateNoColumnsRowWithTwoEmptyTrailingLineNames, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(gridTemplateNoColumnsRowWithEmptyTrailingLineNamesAndNonEmptyLeadingLineNames, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridTemplateNoColumnsRowWithEmptyTrailingLineNamesAndNonEmptyLeadingLineNames, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridTemplateNoColumnsRowWithEmptyTrailingLineNamesAndNonEmptyLeadingLineNames, '').getPropertyValue('-webkit-grid-template-areas') is "none"

Test the initial value
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is 'none'
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'none'
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is 'none'

Test setting grid-template-columns and grid-template-rows back to 'none' through JS
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "10px"
PASS element.style.webkitGridTemplateColumns is "10px"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "[line] 20px"
PASS element.style.webkitGridTemplateRows is "[line] 20px"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "\"a\""
PASS element.style.webkitGridTemplateAreas is "\"a\""
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS element.style.webkitGridTemplateColumns is "none"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS element.style.webkitGridTemplateRows is "none"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS element.style.webkitGridTemplateAreas is "none"

Test getting and setting grid-template shorthand through JS
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "18px"
PASS element.style.webkitGridTemplateColumns is "18px"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "66px"
PASS element.style.webkitGridTemplateRows is "66px"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS element.style.webkitGridTemplateAreas is "none"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "10px"
PASS element.style.webkitGridTemplateColumns is "10px"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "[head] 15px [tail]"
PASS element.style.webkitGridTemplateRows is "[head] 15px [tail]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "\"a\""
PASS element.style.webkitGridTemplateAreas is "\"a\""
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS element.style.webkitGridTemplateColumns is "none"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px"
PASS element.style.webkitGridTemplateRows is "auto"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "\"a\""
PASS element.style.webkitGridTemplateAreas is "\"a\""

Test setting grid-template shorthand to bad values through JS
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-areas') is "none"
PASS successfullyParsed is true

TEST COMPLETE

