blob: aa73241b1d04930966467a063fc347c4b3b8f1bf [file] [log] [blame]
Test that setting and getting grid-template-columns and grid-template-rows works as expected
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Test getting grid-template-columns and grid-template-rows set through CSS
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('grid-template-columns') is "[first] 10px"
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('grid-template-rows') is "[first] 15px"
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('grid-template-columns') is "53% [last]"
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('grid-template-rows') is "27% [last]"
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('grid-template-columns') is "[first] auto"
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('grid-template-rows') is "auto [last]"
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('grid-template-columns') is "[first] minmax(10%, 15px)"
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('grid-template-rows') is "minmax(20px, 50%) [last]"
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('grid-template-columns') is "[first nav] 10px [last]"
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('grid-template-rows') is "[first nav] 15px [last]"
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('grid-template-columns') is "[first nav] 10% [nav] 15% [last]"
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('grid-template-rows') is "[first nav2] 25% [nav2] 75% [last]"
Test getting and setting grid-template-columns and grid-template-rows through JS
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 18px"
PASS element.style.gridTemplateColumns is "[first] 18px"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "66px [last]"
PASS element.style.gridTemplateRows is "66px [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 55%"
PASS element.style.gridTemplateColumns is "[first] 55%"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "40% [last]"
PASS element.style.gridTemplateRows is "40% [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] auto"
PASS element.style.gridTemplateColumns is "[first] auto"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "auto [last]"
PASS element.style.gridTemplateRows is "auto [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] min-content"
PASS element.style.gridTemplateColumns is "[first] min-content"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "min-content [last]"
PASS element.style.gridTemplateRows is "min-content [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] max-content"
PASS element.style.gridTemplateColumns is "[first] max-content"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "max-content [last]"
PASS element.style.gridTemplateRows is "max-content [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] minmax(55%, 45px)"
PASS element.style.gridTemplateColumns is "[first] minmax(55%, 45px)"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "minmax(30px, 40%) [last]"
PASS element.style.gridTemplateRows is "minmax(30px, 40%) [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] minmax(220px, max-content)"
PASS element.style.gridTemplateColumns is "[first] minmax(22em, max-content)"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "minmax(max-content, 50px) [last]"
PASS element.style.gridTemplateRows is "minmax(max-content, 5em) [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] minmax(220px, min-content)"
PASS element.style.gridTemplateColumns is "[first] minmax(22em, min-content)"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "minmax(min-content, 50px) [last]"
PASS element.style.gridTemplateRows is "minmax(min-content, 5em) [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] minmax(min-content, max-content)"
PASS element.style.gridTemplateColumns is "[first] minmax(min-content, max-content)"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "minmax(max-content, min-content) [last]"
PASS element.style.gridTemplateRows is "minmax(max-content, min-content) [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first nav] minmax(min-content, max-content) [last]"
PASS element.style.gridTemplateColumns is "[first nav] minmax(min-content, max-content) [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[first nav] minmax(max-content, min-content) [last]"
PASS element.style.gridTemplateRows is "[first nav] minmax(max-content, min-content) [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first nav] minmax(min-content, max-content) [nav] auto [last]"
PASS element.style.gridTemplateColumns is "[first nav] minmax(min-content, max-content) [nav] auto [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[first nav2] minmax(max-content, min-content) [nav2] minmax(10px, 15px) [last]"
PASS element.style.gridTemplateRows is "[first nav2] minmax(max-content, min-content) [nav2] minmax(10px, 15px) [last]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[foo bar] auto [foo] auto [bar]"
PASS element.style.gridTemplateColumns is "[foo bar] auto [foo] auto [bar]"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[foo bar] auto [foo] auto [bar]"
PASS element.style.gridTemplateRows is "[foo bar] auto [foo] auto [bar]"
Test getting and setting invalid grid-template-columns and grid-template-rows through JS
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
PASS successfullyParsed is true
TEST COMPLETE