blob: c0241161c8517841d30d8852e63f8a1363bd3c3a [file] [log] [blame]
<pre id="console"></pre>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function log(message)
{
document.getElementById("console").appendChild(document.createTextNode(message + "\n"));
}
function test(declaration, expectedHyphenateLimit)
{
var element = document.createElement("div");
element.style.cssText = declaration;
var hyphenateLimit = element.style.webkitHyphenateLimitLines;
if (hyphenateLimit === expectedHyphenateLimit)
log("PASS: '" + declaration + "' parsed as '" + hyphenateLimit + "'");
else
log("FAIL: '" + declaration + "' parsed as '" + hyphenateLimit + "'");
}
test('-webkit-hyphenate-limit-lines: initial;', 'initial');
test('-webkit-hyphenate-limit-lines: inherit;', 'inherit');
test('-webkit-hyphenate-limit-lines: no-limit;', 'no-limit');
test('-webkit-hyphenate-limit-lines: 0;', '0');
test('-webkit-hyphenate-limit-lines: 4;', '4');
test('-webkit-hyphenate-limit-lines: 2 2;', '');
test('-webkit-hyphenate-limit-lines: 2px;', '');
test('-webkit-hyphenate-limit-lines: -1;', '');
test('-webkit-hyphenate-limit-lines: "1";', '');
</script>