3 <script src=
"../../resources/js-test.js"></script>
6 description("Tests a flag to make background shorthand property not override background-size when it's already set.");
8 var e
= document
.getElementById('test');
10 if (window
.internals
) {
11 window
.internals
.settings
.setUseLegacyBackgroundSizeShorthandBehavior(true);
13 e
.style
.backgroundSize
= "cover";
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-repeat border-box border-box red'")
16 shouldBe("e.style.backgroundSize", "'cover'");
19 window
.internals
.settings
.setUseLegacyBackgroundSizeShorthandBehavior(false);