1 Test that setting and getting grid-template-columns and grid-template-rows works as expected
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 Test getting grid-template-columns and grid-template-rows set through CSS
7 PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('grid-template-columns') is "[first] 10px"
8 PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('grid-template-rows') is "[first] 15px"
9 PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('grid-template-columns') is "424px [last]"
10 PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('grid-template-rows') is "162px [last]"
11 PASS window.getComputedStyle(gridWithPercentWithoutSize, '').getPropertyValue('grid-template-columns') is "0px [last]"
12 PASS window.getComputedStyle(gridWithPercentWithoutSize, '').getPropertyValue('grid-template-rows') is "0px [last]"
13 PASS window.getComputedStyle(gridWithPercentWithoutSizeWithChildren, '').getPropertyValue('grid-template-columns') is "77px [last]"
14 PASS window.getComputedStyle(gridWithPercentWithoutSizeWithChildren, '').getPropertyValue('grid-template-rows') is "22px [last]"
15 PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('grid-template-columns') is "[first] 0px"
16 PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('grid-template-rows') is "0px [last]"
17 PASS window.getComputedStyle(gridWithAutoWithChildrenElement, '').getPropertyValue('grid-template-columns') is "[first] 77px"
18 PASS window.getComputedStyle(gridWithAutoWithChildrenElement, '').getPropertyValue('grid-template-rows') is "22px [last]"
19 PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('grid-template-columns') is "[first] 80px"
20 PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('grid-template-rows') is "300px [last]"
21 PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('grid-template-columns') is "[first nav] 10px [last]"
22 PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('grid-template-rows') is "[first nav] 15px [last]"
23 PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('grid-template-columns') is "[first nav] 80px [nav] 120px [last]"
24 PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('grid-template-rows') is "[first nav2] 150px [nav2] 450px [last]"
25 PASS window.getComputedStyle(gridWithRepeatElement, '').getPropertyValue('grid-template-columns') is "[first] 10px [nav nav2] 400px [nav nav2] 400px"
26 PASS window.getComputedStyle(gridWithRepeatElement, '').getPropertyValue('grid-template-rows') is "100px [nav nav2] 150px [nav nav2] 150px [last]"
27 PASS window.getComputedStyle(gridWithEmptyBrackets, '').getPropertyValue('grid-template-columns') is "10px"
28 PASS window.getComputedStyle(gridWithEmptyBrackets, '').getPropertyValue('grid-template-rows') is "20px 50px"
30 Test getting and setting grid-template-columns and grid-template-rows through JS
31 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 18px"
32 PASS element.style.gridTemplateColumns is "[first] 18px"
33 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "66px [last]"
34 PASS element.style.gridTemplateRows is "66px [last]"
35 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 440px"
36 PASS element.style.gridTemplateColumns is "[first] 55%"
37 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "240px [last]"
38 PASS element.style.gridTemplateRows is "40% [last]"
39 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 0px"
40 PASS element.style.gridTemplateColumns is "[first] auto"
41 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "0px [last]"
42 PASS element.style.gridTemplateRows is "auto [last]"
43 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 0px"
44 PASS element.style.gridTemplateColumns is "[first] min-content"
45 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "0px [last]"
46 PASS element.style.gridTemplateRows is "min-content [last]"
47 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 0px"
48 PASS element.style.gridTemplateColumns is "[first] max-content"
49 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "0px [last]"
50 PASS element.style.gridTemplateRows is "max-content [last]"
51 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 440px"
52 PASS element.style.gridTemplateColumns is "[first] minmax(55%, 45px)"
53 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "240px [last]"
54 PASS element.style.gridTemplateRows is "minmax(30px, 40%) [last]"
55 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 220px"
56 PASS element.style.gridTemplateColumns is "[first] minmax(22em, max-content)"
57 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "50px [last]"
58 PASS element.style.gridTemplateRows is "minmax(max-content, 5em) [last]"
59 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 220px"
60 PASS element.style.gridTemplateColumns is "[first] minmax(22em, min-content)"
61 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "50px [last]"
62 PASS element.style.gridTemplateRows is "minmax(min-content, 5em) [last]"
63 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 0px"
64 PASS element.style.gridTemplateColumns is "[first] minmax(min-content, max-content)"
65 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "0px [last]"
66 PASS element.style.gridTemplateRows is "minmax(max-content, min-content) [last]"
67 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first nav] 0px [last]"
68 PASS element.style.gridTemplateColumns is "[first nav] minmax(min-content, max-content) [last]"
69 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[first nav] 0px [last]"
70 PASS element.style.gridTemplateRows is "[first nav] minmax(max-content, min-content) [last]"
71 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first nav] 0px [nav] 0px [last]"
72 PASS element.style.gridTemplateColumns is "[first nav] minmax(min-content, max-content) [nav] auto [last]"
73 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[first nav2] 0px [nav2] 15px [last]"
74 PASS element.style.gridTemplateRows is "[first nav2] minmax(max-content, min-content) [nav2] minmax(10px, 15px) [last]"
75 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[foo bar] 0px [foo] 0px [bar]"
76 PASS element.style.gridTemplateColumns is "[foo bar] auto [foo] auto [bar]"
77 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[foo bar] 0px [foo] 0px [bar]"
78 PASS element.style.gridTemplateRows is "[foo bar] auto [foo] auto [bar]"
79 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 0px [foo bar] 20px [foo bar] 20px"
80 PASS element.style.gridTemplateColumns is "[first] auto [foo bar] 20px [foo bar] 20px"
81 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "220px [foo] 300px [baz]"
82 PASS element.style.gridTemplateRows is "220px [foo] 50% [baz]"
84 Test getting invalid grid-template-columns and grid-template-rows set through CSS
85 PASS window.getComputedStyle(gridWithoutBrackets, '').getPropertyValue('grid-template-columns') is "none"
86 PASS window.getComputedStyle(gridWithoutBrackets, '').getPropertyValue('grid-template-rows') is "none"
87 PASS window.getComputedStyle(gridWithInvalidNestedBrackets, '').getPropertyValue('grid-template-columns') is "none"
88 PASS window.getComputedStyle(gridWithInvalidNestedBrackets, '').getPropertyValue('grid-template-rows') is "none"
89 PASS window.getComputedStyle(gridWithUnbalancedBrackets, '').getPropertyValue('grid-template-columns') is "none"
90 PASS window.getComputedStyle(gridWithUnbalancedBrackets, '').getPropertyValue('grid-template-rows') is "none"
91 PASS window.getComputedStyle(gridWithMisplacedBrackets, '').getPropertyValue('grid-template-columns') is "none"
92 PASS window.getComputedStyle(gridWithMisplacedBrackets, '').getPropertyValue('grid-template-rows') is "none"
93 PASS window.getComputedStyle(gridWithContiguousBrackets, '').getPropertyValue('grid-template-columns') is "none"
94 PASS window.getComputedStyle(gridWithContiguousBrackets, '').getPropertyValue('grid-template-rows') is "none"
95 PASS window.getComputedStyle(gridWithInvalidCustomIdents, '').getPropertyValue('grid-template-columns') is "none"
96 PASS window.getComputedStyle(gridWithInvalidCustomIdents, '').getPropertyValue('grid-template-rows') is "none"
98 Test getting and setting invalid grid-template-columns and grid-template-rows through JS
99 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
100 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
101 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
102 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
103 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
104 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
105 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
106 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
107 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
108 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
109 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
110 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
111 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
112 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
113 PASS successfullyParsed is true