blob: ae6b20a0ff2493bba78b985fe217336d24786b3e [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 -webkit-grid-template-columns and -webkit-grid-template-rows set through CSS
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 10px"
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-rows') is "[first] 15px"
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-columns') is "424px [last]"
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-rows') is "162px [last]"
PASS window.getComputedStyle(gridWithPercentWithoutSize, '').getPropertyValue('-webkit-grid-template-columns') is "0px [last]"
PASS window.getComputedStyle(gridWithPercentWithoutSize, '').getPropertyValue('-webkit-grid-template-rows') is "0px [last]"
PASS window.getComputedStyle(gridWithPercentWithoutSizeWithChildren, '').getPropertyValue('-webkit-grid-template-columns') is "77px [last]"
PASS window.getComputedStyle(gridWithPercentWithoutSizeWithChildren, '').getPropertyValue('-webkit-grid-template-rows') is "22px [last]"
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 0px"
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-rows') is "0px [last]"
PASS window.getComputedStyle(gridWithAutoWithChildrenElement, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 77px"
PASS window.getComputedStyle(gridWithAutoWithChildrenElement, '').getPropertyValue('-webkit-grid-template-rows') is "22px [last]"
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 80px"
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-template-rows') is "300px [last]"
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('-webkit-grid-template-columns') is "[first nav] 10px [last]"
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('-webkit-grid-template-rows') is "[first nav] 15px [last]"
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-columns') is "[first nav] 80px [nav] 120px [last]"
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-rows') is "[first nav2] 150px [nav2] 450px [last]"
PASS window.getComputedStyle(gridWithRepeatElement, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 10px [nav nav2] 400px [nav nav2] 400px"
PASS window.getComputedStyle(gridWithRepeatElement, '').getPropertyValue('-webkit-grid-template-rows') is "100px [nav nav2] 150px [nav nav2] 150px [last]"
PASS window.getComputedStyle(gridWithEmptyBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "10px"
PASS window.getComputedStyle(gridWithEmptyBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "20px 50px"
Test getting and setting -webkit-grid-template-columns and -webkit-grid-template-rows through JS
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 18px"
PASS element.style.webkitGridTemplateColumns is "[first] 18px"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "66px [last]"
PASS element.style.webkitGridTemplateRows is "66px [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 440px"
PASS element.style.webkitGridTemplateColumns is "[first] 55%"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "240px [last]"
PASS element.style.webkitGridTemplateRows is "40% [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 0px"
PASS element.style.webkitGridTemplateColumns is "[first] auto"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px [last]"
PASS element.style.webkitGridTemplateRows is "auto [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 0px"
PASS element.style.webkitGridTemplateColumns is "[first] -webkit-min-content"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px [last]"
PASS element.style.webkitGridTemplateRows is "-webkit-min-content [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 0px"
PASS element.style.webkitGridTemplateColumns is "[first] -webkit-max-content"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px [last]"
PASS element.style.webkitGridTemplateRows is "-webkit-max-content [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 440px"
PASS element.style.webkitGridTemplateColumns is "[first] minmax(55%, 45px)"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "240px [last]"
PASS element.style.webkitGridTemplateRows is "minmax(30px, 40%) [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 220px"
PASS element.style.webkitGridTemplateColumns is "[first] minmax(22em, -webkit-max-content)"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "50px [last]"
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, 5em) [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 220px"
PASS element.style.webkitGridTemplateColumns is "[first] minmax(22em, -webkit-min-content)"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "50px [last]"
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-min-content, 5em) [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 0px"
PASS element.style.webkitGridTemplateColumns is "[first] minmax(-webkit-min-content, -webkit-max-content)"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px [last]"
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, -webkit-min-content) [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first nav] 0px [last]"
PASS element.style.webkitGridTemplateColumns is "[first nav] minmax(-webkit-min-content, -webkit-max-content) [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "[first nav] 0px [last]"
PASS element.style.webkitGridTemplateRows is "[first nav] minmax(-webkit-max-content, -webkit-min-content) [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first nav] 0px [nav] 0px [last]"
PASS element.style.webkitGridTemplateColumns is "[first nav] minmax(-webkit-min-content, -webkit-max-content) [nav] auto [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "[first nav2] 0px [nav2] 15px [last]"
PASS element.style.webkitGridTemplateRows is "[first nav2] minmax(-webkit-max-content, -webkit-min-content) [nav2] minmax(10px, 15px) [last]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[foo bar] 0px [foo] 0px [bar]"
PASS element.style.webkitGridTemplateColumns is "[foo bar] auto [foo] auto [bar]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "[foo bar] 0px [foo] 0px [bar]"
PASS element.style.webkitGridTemplateRows is "[foo bar] auto [foo] auto [bar]"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 0px [foo bar] 20px [foo bar] 20px"
PASS element.style.webkitGridTemplateColumns is "[first] auto [foo bar] 20px [foo bar] 20px"
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "220px [foo] 300px [baz]"
PASS element.style.webkitGridTemplateRows is "220px [foo] 50% [baz]"
Test getting invalid grid-template-columns and grid-template-rows set through CSS
PASS window.getComputedStyle(gridWithoutBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridWithoutBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridWithInvalidNestedBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridWithInvalidNestedBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridWithUnbalancedBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridWithUnbalancedBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridWithMisplacedBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridWithMisplacedBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS window.getComputedStyle(gridWithContiguousBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "none"
PASS window.getComputedStyle(gridWithContiguousBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "none"
Test getting and setting invalid -webkit-grid-template-columns and -webkit-grid-template-rows 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-columns') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') 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-columns') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') 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-columns') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') 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-columns') is "none"
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
PASS successfullyParsed is true
TEST COMPLETE