OLD | NEW |
(Empty) | |
| 1 This test checks that the 'grid' shorthand is properly parsed and the longhand p
roperties correctly assigned. |
| 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 |
| 5 |
| 6 Test getting the longhand values when shorthand is set through CSS. |
| 7 PASS window.getComputedStyle(gridWithNone, '').getPropertyValue('grid-template-c
olumns') is "none" |
| 8 PASS window.getComputedStyle(gridWithNone, '').getPropertyValue('grid-template-r
ows') is "none" |
| 9 PASS window.getComputedStyle(gridWithNone, '').getPropertyValue('grid-template-a
reas') is "none" |
| 10 PASS window.getComputedStyle(gridWithNone, '').getPropertyValue('grid-auto-flow'
) is "none" |
| 11 PASS window.getComputedStyle(gridWithNone, '').getPropertyValue('grid-auto-colum
ns') is "auto" |
| 12 PASS window.getComputedStyle(gridWithNone, '').getPropertyValue('grid-auto-rows'
) is "auto" |
| 13 PASS window.getComputedStyle(gridWithTemplate, '').getPropertyValue('grid-templa
te-columns') is "15px" |
| 14 PASS window.getComputedStyle(gridWithTemplate, '').getPropertyValue('grid-templa
te-rows') is "10px" |
| 15 PASS window.getComputedStyle(gridWithTemplate, '').getPropertyValue('grid-templa
te-areas') is "none" |
| 16 PASS window.getComputedStyle(gridWithTemplate, '').getPropertyValue('grid-auto-f
low') is "none" |
| 17 PASS window.getComputedStyle(gridWithTemplate, '').getPropertyValue('grid-auto-c
olumns') is "auto" |
| 18 PASS window.getComputedStyle(gridWithTemplate, '').getPropertyValue('grid-auto-r
ows') is "auto" |
| 19 PASS window.getComputedStyle(gridWithAutoFlowAndColumns, '').getPropertyValue('g
rid-template-columns') is "none" |
| 20 PASS window.getComputedStyle(gridWithAutoFlowAndColumns, '').getPropertyValue('g
rid-template-rows') is "none" |
| 21 PASS window.getComputedStyle(gridWithAutoFlowAndColumns, '').getPropertyValue('g
rid-template-areas') is "none" |
| 22 PASS window.getComputedStyle(gridWithAutoFlowAndColumns, '').getPropertyValue('g
rid-auto-flow') is "row" |
| 23 PASS window.getComputedStyle(gridWithAutoFlowAndColumns, '').getPropertyValue('g
rid-auto-columns') is "10px" |
| 24 PASS window.getComputedStyle(gridWithAutoFlowAndColumns, '').getPropertyValue('g
rid-auto-rows') is "10px" |
| 25 PASS window.getComputedStyle(gridWithAutoFlowNone, '').getPropertyValue('grid-te
mplate-columns') is "none" |
| 26 PASS window.getComputedStyle(gridWithAutoFlowNone, '').getPropertyValue('grid-te
mplate-rows') is "none" |
| 27 PASS window.getComputedStyle(gridWithAutoFlowNone, '').getPropertyValue('grid-te
mplate-areas') is "none" |
| 28 PASS window.getComputedStyle(gridWithAutoFlowNone, '').getPropertyValue('grid-au
to-flow') is "none" |
| 29 PASS window.getComputedStyle(gridWithAutoFlowNone, '').getPropertyValue('grid-au
to-columns') is "10px" |
| 30 PASS window.getComputedStyle(gridWithAutoFlowNone, '').getPropertyValue('grid-au
to-rows') is "10px" |
| 31 PASS window.getComputedStyle(gridWithAutoFlowAndColumnsAndRows, '').getPropertyV
alue('grid-template-columns') is "none" |
| 32 PASS window.getComputedStyle(gridWithAutoFlowAndColumnsAndRows, '').getPropertyV
alue('grid-template-rows') is "none" |
| 33 PASS window.getComputedStyle(gridWithAutoFlowAndColumnsAndRows, '').getPropertyV
alue('grid-template-areas') is "none" |
| 34 PASS window.getComputedStyle(gridWithAutoFlowAndColumnsAndRows, '').getPropertyV
alue('grid-auto-flow') is "column" |
| 35 PASS window.getComputedStyle(gridWithAutoFlowAndColumnsAndRows, '').getPropertyV
alue('grid-auto-columns') is "10px" |
| 36 PASS window.getComputedStyle(gridWithAutoFlowAndColumnsAndRows, '').getPropertyV
alue('grid-auto-rows') is "20px" |
| 37 |
| 38 Test getting wrong values for 'grid' shorthand through CSS (they should resolve
to the default: 'none') |
| 39 PASS window.getComputedStyle(gridWithExplicitAndImplicit, '').getPropertyValue('
grid-template-columns') is "none" |
| 40 PASS window.getComputedStyle(gridWithExplicitAndImplicit, '').getPropertyValue('
grid-template-rows') is "none" |
| 41 PASS window.getComputedStyle(gridWithExplicitAndImplicit, '').getPropertyValue('
grid-template-areas') is "none" |
| 42 PASS window.getComputedStyle(gridWithExplicitAndImplicit, '').getPropertyValue('
grid-auto-flow') is "none" |
| 43 PASS window.getComputedStyle(gridWithExplicitAndImplicit, '').getPropertyValue('
grid-auto-columns') is "auto" |
| 44 PASS window.getComputedStyle(gridWithExplicitAndImplicit, '').getPropertyValue('
grid-auto-rows') is "auto" |
| 45 PASS window.getComputedStyle(gridWithMisplacedNone1, '').getPropertyValue('grid-
template-columns') is "none" |
| 46 PASS window.getComputedStyle(gridWithMisplacedNone1, '').getPropertyValue('grid-
template-rows') is "none" |
| 47 PASS window.getComputedStyle(gridWithMisplacedNone1, '').getPropertyValue('grid-
template-areas') is "none" |
| 48 PASS window.getComputedStyle(gridWithMisplacedNone1, '').getPropertyValue('grid-
auto-flow') is "none" |
| 49 PASS window.getComputedStyle(gridWithMisplacedNone1, '').getPropertyValue('grid-
auto-columns') is "auto" |
| 50 PASS window.getComputedStyle(gridWithMisplacedNone1, '').getPropertyValue('grid-
auto-rows') is "auto" |
| 51 PASS window.getComputedStyle(gridWithMisplacedNone2, '').getPropertyValue('grid-
template-columns') is "none" |
| 52 PASS window.getComputedStyle(gridWithMisplacedNone2, '').getPropertyValue('grid-
template-rows') is "none" |
| 53 PASS window.getComputedStyle(gridWithMisplacedNone2, '').getPropertyValue('grid-
template-areas') is "none" |
| 54 PASS window.getComputedStyle(gridWithMisplacedNone2, '').getPropertyValue('grid-
auto-flow') is "none" |
| 55 PASS window.getComputedStyle(gridWithMisplacedNone2, '').getPropertyValue('grid-
auto-columns') is "auto" |
| 56 PASS window.getComputedStyle(gridWithMisplacedNone2, '').getPropertyValue('grid-
auto-rows') is "auto" |
| 57 |
| 58 Test getting and setting 'grid' shorthand through JS |
| 59 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is
"10px" |
| 60 PASS element.style.gridTemplateColumns is "10px" |
| 61 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "20
px" |
| 62 PASS element.style.gridTemplateRows is "20px" |
| 63 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "n
one" |
| 64 PASS element.style.gridTemplateAreas is "none" |
| 65 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "none" |
| 66 PASS element.style.gridAutoFlow is "initial" |
| 67 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "aut
o" |
| 68 PASS element.style.gridAutoColumns is "initial" |
| 69 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" |
| 70 PASS element.style.gridAutoRows is "initial" |
| 71 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is
"10px" |
| 72 PASS element.style.gridTemplateColumns is "10px" |
| 73 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "(l
ine) 20px" |
| 74 PASS element.style.gridTemplateRows is "(line) 20px" |
| 75 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "\
"a\"" |
| 76 PASS element.style.gridTemplateAreas is "\"a\"" |
| 77 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "none" |
| 78 PASS element.style.gridAutoFlow is "initial" |
| 79 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "aut
o" |
| 80 PASS element.style.gridAutoColumns is "initial" |
| 81 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" |
| 82 PASS element.style.gridAutoRows is "initial" |
| 83 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is
"none" |
| 84 PASS element.style.gridTemplateColumns is "initial" |
| 85 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "no
ne" |
| 86 PASS element.style.gridTemplateRows is "initial" |
| 87 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "n
one" |
| 88 PASS element.style.gridTemplateAreas is "initial" |
| 89 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "row" |
| 90 PASS element.style.gridAutoFlow is "row" |
| 91 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "20p
x" |
| 92 PASS element.style.gridAutoColumns is "20px" |
| 93 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "20px" |
| 94 PASS element.style.gridAutoRows is "20px" |
| 95 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is
"none" |
| 96 PASS element.style.gridTemplateColumns is "initial" |
| 97 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "no
ne" |
| 98 PASS element.style.gridTemplateRows is "initial" |
| 99 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "n
one" |
| 100 PASS element.style.gridTemplateAreas is "initial" |
| 101 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "column
" |
| 102 PASS element.style.gridAutoFlow is "column" |
| 103 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "20p
x" |
| 104 PASS element.style.gridAutoColumns is "20px" |
| 105 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "10px" |
| 106 PASS element.style.gridAutoRows is "10px" |
| 107 |
| 108 Test the initial value |
| 109 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-column
s') is "none" |
| 110 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows')
is "none" |
| 111 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-areas'
) is "none" |
| 112 PASS window.getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is
"none" |
| 113 PASS window.getComputedStyle(element, '').getPropertyValue('grid-auto-columns')
is "auto" |
| 114 PASS window.getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is
"auto" |
| 115 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is
'none' |
| 116 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is 'no
ne' |
| 117 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is 'n
one' |
| 118 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is 'none' |
| 119 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is 'aut
o' |
| 120 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is 'auto' |
| 121 |
| 122 Test setting grid-template-columns and grid-template-rows back to 'none' through
JS |
| 123 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is
"none" |
| 124 PASS element.style.gridTemplateColumns is "initial" |
| 125 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "no
ne" |
| 126 PASS element.style.gridTemplateRows is "initial" |
| 127 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "n
one" |
| 128 PASS element.style.gridTemplateAreas is "initial" |
| 129 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "column
" |
| 130 PASS element.style.gridAutoFlow is "column" |
| 131 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "10p
x" |
| 132 PASS element.style.gridAutoColumns is "10px" |
| 133 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "20px" |
| 134 PASS element.style.gridAutoRows is "20px" |
| 135 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is
"none" |
| 136 PASS element.style.gridTemplateColumns is "none" |
| 137 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "no
ne" |
| 138 PASS element.style.gridTemplateRows is "none" |
| 139 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "n
one" |
| 140 PASS element.style.gridTemplateAreas is "none" |
| 141 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "none" |
| 142 PASS element.style.gridAutoFlow is "initial" |
| 143 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "aut
o" |
| 144 PASS element.style.gridAutoColumns is "initial" |
| 145 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" |
| 146 PASS element.style.gridAutoRows is "initial" |
| 147 PASS successfullyParsed is true |
| 148 |
| 149 TEST COMPLETE |
| 150 |
OLD | NEW |