blob: 5a7888d7fa1bb5278c2c0cd1f0247fed47c493bb [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Test to make sure the box-decoration-break property is correctly parsed.")
var testContainer = document.createElement("div");
document.body.appendChild(testContainer);
testContainer.innerHTML = '<p id="test">Hello world</p>';
e = document.getElementById('test');
computedStyle = window.getComputedStyle(e, null);
e.style.webkitBoxDecorationBreak = "slice";
shouldBe("e.style.getPropertyValue('-webkit-box-decoration-break')", "'slice'");
shouldBe("computedStyle.getPropertyValue('-webkit-box-decoration-break')", "'slice'");
e.style.webkitBoxDecorationBreak = "clone";
shouldBe("e.style.getPropertyValue('-webkit-box-decoration-break')", "'clone'");
shouldBe("computedStyle.getPropertyValue('-webkit-box-decoration-break')", "'clone'");
e.style.webkitBoxDecorationBreak = "";
e.style.webkitBoxDecorationBreak = "invalid";
shouldBe("e.style.getPropertyValue('-webkit-box-decoration-break')", "null");
shouldBe("computedStyle.getPropertyValue('-webkit-box-decoration-break')", "'slice'");
document.body.removeChild(testContainer);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>