blob: e928294d06a5cee83a10d7094a43f75e96b76ce3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<script src="../../resources/js-test.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>
</body>
</html>