blob: 5ad4811f13a0dabb7d199172caa8d3508d37298e [file] [log] [blame]
<!DOCTYPE HTML>
</html>
<head>
<title>columns shorthand getPropertyValue test</title>
<style>
.test {
width: 100px;
height: 100px;
}
</style>
<script src="../../resources/js-test-pre.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<div id="columns1" class="test" style="columns: 10px;"></div>
<div id="columns2" class="test" style="columns: 10;"></div>
<div id="columns3" class="test" style="columns: 10px auto;"></div>
<div id="columns4" class="test" style="columns: auto;"></div>
<div id="columns5" class="test" style="columns: auto 2;"></div>
<div id="columns6" class="test" style="column-width: 10px; column-count: 2;"></div>
<div id="columns7" class="test" style="column-width: auto; column-count: auto;"></div>
<div id="columns8" class="test" style="columns: foo;"></div>
<div id="columns9" class="test" style="column-width: 10px;"></div>
<script>
description("<a href=\"https://bugs.webkit.org/show_bug.cgi?id=111011\">Bug 111011: getPropertyValue for columns returns null, should compute the shorthand value</a>");
function columnsValue(id) {
var element = document.getElementById(id);
return element.style.getPropertyValue("columns");
}
shouldBeEqualToString('columnsValue("columns1")', '10px');
shouldBeEqualToString('columnsValue("columns2")', '10');
shouldBeEqualToString('columnsValue("columns3")', '10px auto');
shouldBeEqualToString('columnsValue("columns4")', 'auto');
shouldBeEqualToString('columnsValue("columns5")', 'auto 2');
shouldBeEqualToString('columnsValue("columns6")', '10px 2');
shouldBeEqualToString('columnsValue("columns7")', 'auto auto');
debug("NOTE: 'foo' is an illegal CSS value for 'columns'.");
shouldBeEqualToString('columnsValue("columns8")', "");
debug("NOTE: If only few longhand properties are specified, getPropertyValue for shorthand property returns the empty string.")
shouldBeEqualToString('columnsValue("columns9")', "");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>