blob: bed298435e5c0f01d9fc94dba5b7fa9d7efab1d6 [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../../resources/js-test-pre.js"></script>
<div id="testDiv"></div>
<script>
description("Tests assigning a calculated value to -webkit-line-clamp CSS property.");
var testDiv = document.getElementById("testDiv");
shouldBeEmptyString("testDiv.style['-webkit-line-clamp']");
evalAndLog("testDiv.style['-webkit-line-clamp'] = 'calc(10% * 2)'");
shouldBeEqualToString("testDiv.style['-webkit-line-clamp']", "calc(20%)");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('-webkit-line-clamp')", "20%");
evalAndLog("testDiv.style['-webkit-line-clamp'] = 'calc(2 * 3)'");
shouldBeEqualToString("testDiv.style['-webkit-line-clamp']", "6");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('-webkit-line-clamp')", "6");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>