39 lines
1.2 KiB
HTML
39 lines
1.2 KiB
HTML
<!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";
|
|
shouldBeEqualToString("e.style.getPropertyValue('-webkit-box-decoration-break')", "");
|
|
shouldBe("computedStyle.getPropertyValue('-webkit-box-decoration-break')", "'slice'");
|
|
|
|
document.body.removeChild(testContainer);
|
|
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|