blob: 43230b98afe8d4476a88189c886f5d5dc3d54451 [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) 50% 50% / 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>