chromium/third_party/blink/web_tests/fast/box-decoration-break/box-decoration-break-parsing.html

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test.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";
shouldBeEqualToString("e.style.getPropertyValue('-webkit-box-decoration-break')", "");
shouldBe("computedStyle.getPropertyValue('-webkit-box-decoration-break')", "'slice'");

document.body.removeChild(testContainer);

</script>
</body>
</html>