blob: 9346b69f3ef0aa4543bd18e170d8ba1b65f2c5fb [file] [log] [blame]
<!DOCTYPE html>
<html>
<script src="../../resources/js-test-pre.js"></script>
<div id="test"> </div>
<script>
description("Tests a flag to make background shorthand property not override background-size when it's already set.");
var e = document.getElementById('test');
if (window.internals) {
window.internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(true);
e.style.backgroundSize = "cover";
e.style.background = "center red url(dummy://test.png) no-repeat border-box";
shouldBe("e.style.background", "'url(\"dummy://test.png\") center center / cover no-repeat border-box border-box red'")
shouldBe("e.style.backgroundSize", "'cover'");
debug("")
window.internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(false);
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>