| 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(gridWithNoneElement, '').getPropertyValue('-webkit-grid-template-columns') is "none" |
| PASS window.getComputedStyle(gridWithNoneElement, '').getPropertyValue('-webkit-grid-template-rows') is "none" |
| PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-columns') is "10px" |
| PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-rows') is "15px" |
| PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-columns') is "424px" |
| PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-rows') is "162px" |
| PASS window.getComputedStyle(gridWithPercentWithoutSize, '').getPropertyValue('-webkit-grid-template-columns') is "0px" |
| PASS window.getComputedStyle(gridWithPercentWithoutSize, '').getPropertyValue('-webkit-grid-template-rows') is "0px" |
| PASS window.getComputedStyle(gridWithPercentWithoutSizeWithChildren, '').getPropertyValue('-webkit-grid-template-columns') is "7px" |
| PASS window.getComputedStyle(gridWithPercentWithoutSizeWithChildren, '').getPropertyValue('-webkit-grid-template-rows') is "11px" |
| PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-columns') is "0px" |
| PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-rows') is "0px" |
| PASS window.getComputedStyle(gridWithAutoWithChildrenElement, '').getPropertyValue('-webkit-grid-template-columns') is "7px" |
| PASS window.getComputedStyle(gridWithAutoWithChildrenElement, '').getPropertyValue('-webkit-grid-template-rows') is "11px" |
| PASS window.getComputedStyle(gridWithEMElement, '').getPropertyValue('-webkit-grid-template-columns') is "100px" |
| PASS window.getComputedStyle(gridWithEMElement, '').getPropertyValue('-webkit-grid-template-rows') is "150px" |
| PASS window.getComputedStyle(gridWithViewPortPercentageElement, '').getPropertyValue('-webkit-grid-template-columns') is "64px" |
| PASS window.getComputedStyle(gridWithViewPortPercentageElement, '').getPropertyValue('-webkit-grid-template-rows') is "60px" |
| PASS window.getComputedStyle(gridWithMinMaxElement, '').getPropertyValue('-webkit-grid-template-columns') is "80px" |
| PASS window.getComputedStyle(gridWithMinMaxElement, '').getPropertyValue('-webkit-grid-template-rows') is "300px" |
| PASS window.getComputedStyle(gridWithMinContentElement, '').getPropertyValue('-webkit-grid-template-columns') is "0px" |
| PASS window.getComputedStyle(gridWithMinContentElement, '').getPropertyValue('-webkit-grid-template-rows') is "0px" |
| PASS window.getComputedStyle(gridWithMinContentWithChildrenElement, '').getPropertyValue('-webkit-grid-template-columns') is "17px" |
| PASS window.getComputedStyle(gridWithMinContentWithChildrenElement, '').getPropertyValue('-webkit-grid-template-rows') is "11px" |
| PASS window.getComputedStyle(gridWithMaxContentElement, '').getPropertyValue('-webkit-grid-template-columns') is "0px" |
| PASS window.getComputedStyle(gridWithMaxContentElement, '').getPropertyValue('-webkit-grid-template-rows') is "0px" |
| PASS window.getComputedStyle(gridWithMaxContentWithChildrenElement, '').getPropertyValue('-webkit-grid-template-columns') is "17px" |
| PASS window.getComputedStyle(gridWithMaxContentWithChildrenElement, '').getPropertyValue('-webkit-grid-template-rows') is "11px" |
| PASS window.getComputedStyle(gridWithFractionElement, '').getPropertyValue('-webkit-grid-template-columns') is "800px" |
| PASS window.getComputedStyle(gridWithFractionElement, '').getPropertyValue('-webkit-grid-template-rows') is "600px" |
| PASS window.getComputedStyle(gridWithCalcElement, '').getPropertyValue('-webkit-grid-template-columns') is "150px" |
| PASS window.getComputedStyle(gridWithCalcElement, '').getPropertyValue('-webkit-grid-template-rows') is "75px" |
| PASS window.getComputedStyle(gridWithCalcComplexElement, '').getPropertyValue('-webkit-grid-template-columns') is "550px" |
| PASS window.getComputedStyle(gridWithCalcComplexElement, '').getPropertyValue('-webkit-grid-template-rows') is "465px" |
| PASS window.getComputedStyle(gridWithCalcInsideMinMaxElement, '').getPropertyValue('-webkit-grid-template-columns') is "80px" |
| PASS window.getComputedStyle(gridWithCalcInsideMinMaxElement, '').getPropertyValue('-webkit-grid-template-rows') is "300px" |
| PASS window.getComputedStyle(gridWithCalcComplexInsideMinMaxElement, '').getPropertyValue('-webkit-grid-template-columns') is "415px" |
| PASS window.getComputedStyle(gridWithCalcComplexInsideMinMaxElement, '').getPropertyValue('-webkit-grid-template-rows') is "300px" |
| |
| Test getting wrong values for -webkit-grid-template-columns and -webkit-grid-template-rows through CSS (they should resolve to the default: 'none') |
| PASS window.getComputedStyle(gridWithFitContentElement, '').getPropertyValue('-webkit-grid-template-columns') is "none" |
| PASS window.getComputedStyle(gridWithFitContentElement, '').getPropertyValue('-webkit-grid-template-rows') is "none" |
| PASS window.getComputedStyle(gridWithFitAvailableElement, '').getPropertyValue('-webkit-grid-template-columns') is "none" |
| PASS window.getComputedStyle(gridWithFitAvailableElement, '').getPropertyValue('-webkit-grid-template-rows') 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" |
| |
| Test getting and setting -webkit-grid-template-columns and -webkit-grid-template-rows 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-columns') is "440px" |
| PASS element.style.webkitGridTemplateColumns is "55%" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "240px" |
| PASS element.style.webkitGridTemplateRows is "40%" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "0px" |
| PASS element.style.webkitGridTemplateColumns is "auto" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px" |
| PASS element.style.webkitGridTemplateRows is "auto" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "80px" |
| PASS element.style.webkitGridTemplateColumns is "10vw" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "150px" |
| PASS element.style.webkitGridTemplateRows is "25vh" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "0px" |
| PASS element.style.webkitGridTemplateColumns is "-webkit-min-content" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px" |
| PASS element.style.webkitGridTemplateRows is "-webkit-min-content" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "0px" |
| PASS element.style.webkitGridTemplateColumns is "-webkit-max-content" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px" |
| PASS element.style.webkitGridTemplateRows is "-webkit-max-content" |
| |
| Test getting and setting -webkit-grid-template-columns and -webkit-grid-template-rows to minmax() values through JS |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "440px" |
| PASS element.style.webkitGridTemplateColumns is "minmax(55%, 45px)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "240px" |
| PASS element.style.webkitGridTemplateRows is "minmax(30px, 40%)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "220px" |
| PASS element.style.webkitGridTemplateColumns is "minmax(22em, 8vh)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "80px" |
| PASS element.style.webkitGridTemplateRows is "minmax(10vw, 5em)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "48px" |
| PASS element.style.webkitGridTemplateColumns is "minmax(-webkit-min-content, 8vh)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "80px" |
| PASS element.style.webkitGridTemplateRows is "minmax(10vw, -webkit-min-content)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "220px" |
| PASS element.style.webkitGridTemplateColumns is "minmax(22em, -webkit-max-content)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "50px" |
| PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, 5em)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "0px" |
| PASS element.style.webkitGridTemplateColumns is "minmax(-webkit-min-content, -webkit-max-content)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px" |
| PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, -webkit-min-content)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "800px" |
| PASS element.style.webkitGridTemplateColumns is "3600fr" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "600px" |
| PASS element.style.webkitGridTemplateRows is "154fr" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "800px" |
| PASS element.style.webkitGridTemplateColumns is "3.1459fr" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "600px" |
| PASS element.style.webkitGridTemplateRows is "2.718fr" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "800px" |
| PASS element.style.webkitGridTemplateColumns is "3fr" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "600px" |
| PASS element.style.webkitGridTemplateRows is "4fr" |
| |
| Test getting and setting grid-template-columns and grid-template-rows to calc() values through JS |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "150px" |
| PASS element.style.webkitGridTemplateColumns is "calc(150px)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "75px" |
| PASS element.style.webkitGridTemplateRows is "calc(75px)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "370px" |
| PASS element.style.webkitGridTemplateColumns is "calc(50% - 30px)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "135px" |
| PASS element.style.webkitGridTemplateRows is "calc(75px + 10%)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "200px" |
| PASS element.style.webkitGridTemplateColumns is "minmax(25%, calc(30px))" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "450px" |
| PASS element.style.webkitGridTemplateRows is "minmax(calc(75%), 40px)" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "110px" |
| PASS element.style.webkitGridTemplateColumns is "minmax(10%, calc(30px + 10%))" |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "200px" |
| PASS element.style.webkitGridTemplateRows is "minmax(calc(25% - 50px), 200px)" |
| |
| Test setting grid-template-columns and grid-template-rows 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-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 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" |
| |
| Test setting grid-template-columns and grid-template-rows back to 'none' 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-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" |
| |
| Test setting grid-template-columns and grid-template-rows to 'inherit' through JS |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is '50px (last)' |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is '(first) 20px' |
| |
| Test setting grid-template-columns and grid-template-rows to 'initial' through JS |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is '450px (last)' |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is '(first) 150px' |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is 'none' |
| PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'none' |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |