| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <div id="flexbox"> | 7 <div id="flexbox"> |
| 8 <div id="flexitem"></div> | 8 <div id="flexitem"></div> |
| 9 </div> | 9 </div> |
| 10 <script> | 10 <script> |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 flexbox.style.justifyContent = 'space-evenly'; | 78 flexbox.style.justifyContent = 'space-evenly'; |
| 79 shouldBeEqualToString('flexbox.style.justifyContent', 'space-evenly'); | 79 shouldBeEqualToString('flexbox.style.justifyContent', 'space-evenly'); |
| 80 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', '
space-evenly'); | 80 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', '
space-evenly'); |
| 81 | 81 |
| 82 flexbox.style.justifyContent = ''; | 82 flexbox.style.justifyContent = ''; |
| 83 shouldBeEqualToString('flexbox.style.justifyContent', ''); | 83 shouldBeEqualToString('flexbox.style.justifyContent', ''); |
| 84 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', '
normal'); | 84 shouldBeEqualToString('window.getComputedStyle(flexbox, null).justifyContent', '
normal'); |
| 85 | 85 |
| 86 shouldBeEqualToString('flexbox.style.alignSelf', ''); | 86 shouldBeEqualToString('flexbox.style.alignSelf', ''); |
| 87 // The initial value is 'auto', which will be resolved depending on parent's sty
le (except for the 'document' element). | 87 // The initial value is 'auto'. |
| 88 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'norma
l'); | 88 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'auto'
); |
| 89 shouldBeEqualToString('window.getComputedStyle(document.documentElement, null).a
lignSelf', 'normal'); | 89 shouldBeEqualToString('window.getComputedStyle(document.documentElement, null).a
lignSelf', 'auto'); |
| 90 | 90 |
| 91 flexbox.style.alignSelf = 'foo'; | 91 flexbox.style.alignSelf = 'foo'; |
| 92 shouldBeEqualToString('flexbox.style.alignSelf', ''); | 92 shouldBeEqualToString('flexbox.style.alignSelf', ''); |
| 93 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'norma
l'); | 93 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'auto'
); |
| 94 | 94 |
| 95 flexbox.style.alignSelf = 'auto'; | 95 flexbox.style.alignSelf = 'auto'; |
| 96 shouldBeEqualToString('flexbox.style.alignSelf', 'auto'); | 96 shouldBeEqualToString('flexbox.style.alignSelf', 'auto'); |
| 97 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'norma
l'); | 97 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'auto'
); |
| 98 | 98 |
| 99 flexbox.style.alignSelf = 'flex-start'; | 99 flexbox.style.alignSelf = 'flex-start'; |
| 100 shouldBeEqualToString('flexbox.style.alignSelf', 'flex-start'); | 100 shouldBeEqualToString('flexbox.style.alignSelf', 'flex-start'); |
| 101 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'flex-
start'); | 101 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'flex-
start'); |
| 102 | 102 |
| 103 flexbox.style.alignSelf = 'flex-end'; | 103 flexbox.style.alignSelf = 'flex-end'; |
| 104 shouldBeEqualToString('flexbox.style.alignSelf', 'flex-end'); | 104 shouldBeEqualToString('flexbox.style.alignSelf', 'flex-end'); |
| 105 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'flex-
end'); | 105 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'flex-
end'); |
| 106 | 106 |
| 107 flexbox.style.alignSelf = 'center'; | 107 flexbox.style.alignSelf = 'center'; |
| 108 shouldBeEqualToString('flexbox.style.alignSelf', 'center'); | 108 shouldBeEqualToString('flexbox.style.alignSelf', 'center'); |
| 109 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'cente
r'); | 109 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'cente
r'); |
| 110 | 110 |
| 111 flexbox.style.alignSelf = 'stretch'; | 111 flexbox.style.alignSelf = 'stretch'; |
| 112 shouldBeEqualToString('flexbox.style.alignSelf', 'stretch'); | 112 shouldBeEqualToString('flexbox.style.alignSelf', 'stretch'); |
| 113 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'stret
ch'); | 113 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'stret
ch'); |
| 114 | 114 |
| 115 flexbox.style.alignSelf = 'baseline'; | 115 flexbox.style.alignSelf = 'baseline'; |
| 116 shouldBeEqualToString('flexbox.style.alignSelf', 'baseline'); | 116 shouldBeEqualToString('flexbox.style.alignSelf', 'baseline'); |
| 117 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'basel
ine'); | 117 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'basel
ine'); |
| 118 | 118 |
| 119 flexbox.style.alignSelf = ''; | 119 flexbox.style.alignSelf = ''; |
| 120 shouldBeEqualToString('flexbox.style.alignSelf', ''); | 120 shouldBeEqualToString('flexbox.style.alignSelf', ''); |
| 121 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'norma
l'); | 121 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignSelf', 'auto'
); |
| 122 | 122 |
| 123 shouldBeEqualToString('flexbox.style.alignItems', ''); | 123 shouldBeEqualToString('flexbox.style.alignItems', ''); |
| 124 shouldBeEqualToString('flexitem.style.alignSelf', ''); | 124 shouldBeEqualToString('flexitem.style.alignSelf', ''); |
| 125 // The initial value is 'auto', which will be resolved to 'normal' in case of fl
exbox containers. | 125 // The initial value is 'auto'. |
| 126 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'norm
al'); | 126 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'norm
al'); |
| 127 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'norm
al'); | 127 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'auto
'); |
| 128 | 128 |
| 129 flexbox.style.alignItems = 'foo'; | 129 flexbox.style.alignItems = 'foo'; |
| 130 shouldBeEqualToString('flexbox.style.alignItems', ''); | 130 shouldBeEqualToString('flexbox.style.alignItems', ''); |
| 131 shouldBeEqualToString('flexitem.style.alignSelf', ''); | 131 shouldBeEqualToString('flexitem.style.alignSelf', ''); |
| 132 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'norm
al'); | 132 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'norm
al'); |
| 133 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'norm
al'); | 133 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'auto
'); |
| 134 | 134 |
| 135 // The 'auto' value is not valid for the align-items property. | 135 // The 'auto' value is not valid for the align-items property. |
| 136 flexbox.style.alignItems = 'auto'; | 136 flexbox.style.alignItems = 'auto'; |
| 137 shouldBeEqualToString('flexbox.style.alignItems', ''); | 137 shouldBeEqualToString('flexbox.style.alignItems', ''); |
| 138 shouldBeEqualToString('flexitem.style.alignSelf', ''); | 138 shouldBeEqualToString('flexitem.style.alignSelf', ''); |
| 139 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'norm
al'); | 139 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'norm
al'); |
| 140 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'norm
al'); | 140 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'auto
'); |
| 141 | 141 |
| 142 flexbox.style.alignItems = 'flex-start'; | 142 flexbox.style.alignItems = 'flex-start'; |
| 143 shouldBeEqualToString('flexbox.style.alignItems', 'flex-start'); | 143 shouldBeEqualToString('flexbox.style.alignItems', 'flex-start'); |
| 144 shouldBeEqualToString('flexitem.style.alignSelf', ''); | 144 shouldBeEqualToString('flexitem.style.alignSelf', ''); |
| 145 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'flex
-start'); | 145 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'flex
-start'); |
| 146 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'flex
-start'); | 146 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'flex
-start'); |
| 147 | 147 |
| 148 flexbox.style.alignItems = 'flex-end'; | 148 flexbox.style.alignItems = 'flex-end'; |
| 149 shouldBeEqualToString('flexbox.style.alignItems', 'flex-end'); | 149 shouldBeEqualToString('flexbox.style.alignItems', 'flex-end'); |
| 150 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'flex
-end'); | 150 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'flex
-end'); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 161 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'stre
tch'); | 161 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'stre
tch'); |
| 162 | 162 |
| 163 flexbox.style.alignItems = 'baseline'; | 163 flexbox.style.alignItems = 'baseline'; |
| 164 shouldBeEqualToString('flexbox.style.alignItems', 'baseline'); | 164 shouldBeEqualToString('flexbox.style.alignItems', 'baseline'); |
| 165 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'base
line'); | 165 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'base
line'); |
| 166 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'base
line'); | 166 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'base
line'); |
| 167 | 167 |
| 168 flexbox.style.alignItems = ''; | 168 flexbox.style.alignItems = ''; |
| 169 shouldBeEqualToString('flexbox.style.alignItems', ''); | 169 shouldBeEqualToString('flexbox.style.alignItems', ''); |
| 170 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'norm
al'); | 170 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'norm
al'); |
| 171 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'norm
al'); | 171 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'auto
'); |
| 172 | 172 |
| 173 flexbox.style.display = 'none'; | 173 flexbox.style.display = 'none'; |
| 174 shouldBeEqualToString('flexbox.style.alignItems', ''); | 174 shouldBeEqualToString('flexbox.style.alignItems', ''); |
| 175 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'norm
al'); | 175 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignItems', 'norm
al'); |
| 176 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'norm
al'); | 176 shouldBeEqualToString('window.getComputedStyle(flexitem, null).alignSelf', 'auto
'); |
| 177 flexbox.style.display = 'flex'; | 177 flexbox.style.display = 'flex'; |
| 178 | 178 |
| 179 | 179 |
| 180 // FIXME: This should probably return stretch. See https://bugs.webkit.org/show_
bug.cgi?id=14563. | 180 // FIXME: This should probably return stretch. See https://bugs.webkit.org/show_
bug.cgi?id=14563. |
| 181 var detachedFlexbox = document.createElement('div'); | 181 var detachedFlexbox = document.createElement('div'); |
| 182 var detachedFlexItem = document.createElement('div'); | 182 var detachedFlexItem = document.createElement('div'); |
| 183 detachedFlexbox.appendChild(detachedFlexItem); | 183 detachedFlexbox.appendChild(detachedFlexItem); |
| 184 shouldBeEqualToString('window.getComputedStyle(detachedFlexbox, null).alignSelf'
, ''); | 184 shouldBeEqualToString('window.getComputedStyle(detachedFlexbox, null).alignSelf'
, ''); |
| 185 shouldBeEqualToString('window.getComputedStyle(detachedFlexItem, null).alignSelf
', ''); | 185 shouldBeEqualToString('window.getComputedStyle(detachedFlexItem, null).alignSelf
', ''); |
| 186 | 186 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 flexbox.style.alignContent = ''; | 316 flexbox.style.alignContent = ''; |
| 317 shouldBeEqualToString('flexbox.style.alignContent', ''); | 317 shouldBeEqualToString('flexbox.style.alignContent', ''); |
| 318 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignContent', 'no
rmal'); | 318 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignContent', 'no
rmal'); |
| 319 | 319 |
| 320 flexbox.style.alignContent = 'foo'; | 320 flexbox.style.alignContent = 'foo'; |
| 321 shouldBeEqualToString('flexbox.style.alignContent', ''); | 321 shouldBeEqualToString('flexbox.style.alignContent', ''); |
| 322 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignContent', 'no
rmal'); | 322 shouldBeEqualToString('window.getComputedStyle(flexbox, null).alignContent', 'no
rmal'); |
| 323 </script> | 323 </script> |
| 324 </body> | 324 </body> |
| 325 </html> | 325 </html> |
| OLD | NEW |