OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../js/resources/js-test-pre.js"></script> |
4 <div id="test"> </div> | 4 <div id="test"> </div> |
5 <script> | 5 <script> |
6 description("Tests a flag to make background shorthand property not override bac
kground-size when it's already set."); | 6 description("Tests a flag to make background shorthand property not override bac
kground-size when it's already set."); |
7 | 7 |
8 var e = document.getElementById('test'); | 8 var e = document.getElementById('test'); |
9 | 9 |
10 if (window.internals) { | 10 if (window.internals) { |
11 window.internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(true); | 11 window.internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(true); |
12 | 12 |
13 e.style.backgroundSize = "cover"; | 13 e.style.backgroundSize = "cover"; |
14 e.style.background = "center red url(dummy://test.png) no-repeat border-box"
; | 14 e.style.background = "center red url(dummy://test.png) no-repeat border-box"
; |
15 shouldBe("e.style.background", "'url(dummy://test.png) 50% 50% / cover no-re
peat border-box border-box red'") | 15 shouldBe("e.style.background", "'url(dummy://test.png) 50% 50% / cover no-re
peat border-box border-box red'") |
16 shouldBe("e.style.backgroundSize", "'cover'"); | 16 shouldBe("e.style.backgroundSize", "'cover'"); |
17 debug("") | 17 debug("") |
18 | 18 |
19 window.internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(false)
; | 19 window.internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(false)
; |
20 } | 20 } |
21 | 21 |
22 </script> | 22 </script> |
23 <script src="../js/resources/js-test-post.js"></script> | |
24 </body> | 23 </body> |
25 </html> | 24 </html> |
OLD | NEW |