1 <pre id="console"></pre>
3 if (window.layoutTestController)
4 layoutTestController.dumpAsText();
8 document.getElementById("console").appendChild(document.createTextNode(message + "\n"));
11 function test(declaration, expectedHyphenateLimit, after)
13 var element = document.createElement("div");
14 element.style.cssText = declaration;
15 var hyphenateLimit = after ? element.style.webkitHyphenateLimitAfter : element.style.webkitHyphenateLimitBefore;
16 if (hyphenateLimit === expectedHyphenateLimit)
17 log("PASS: '" + declaration + "' parsed as '" + hyphenateLimit + "'");
19 log("FAIL: '" + declaration + "' parsed as '" + hyphenateLimit + "'");
22 test('-webkit-hyphenate-limit-before: initial;', 'initial');
23 test('-webkit-hyphenate-limit-before: inherit;', 'inherit');
24 test('-webkit-hyphenate-limit-before: auto;', 'auto');
25 test('-webkit-hyphenate-limit-before: 0;', '0');
26 test('-webkit-hyphenate-limit-before: 4;', '4');
27 test('-webkit-hyphenate-limit-before: 2 2;', '');
28 test('-webkit-hyphenate-limit-before: 2px;', '');
29 test('-webkit-hyphenate-limit-before: -1;', '');
30 test('-webkit-hyphenate-limit-before: "1";', '');
34 test('-webkit-hyphenate-limit-after: initial;', 'initial', true);
35 test('-webkit-hyphenate-limit-after: inherit;', 'inherit', true);
36 test('-webkit-hyphenate-limit-after: auto;', 'auto', true);
37 test('-webkit-hyphenate-limit-after: 0;', '0', true);
38 test('-webkit-hyphenate-limit-after: 4;', '4', true);
39 test('-webkit-hyphenate-limit-after: 2 2;', '', true);
40 test('-webkit-hyphenate-limit-after: 2px;', '', true);
41 test('-webkit-hyphenate-limit-after: -1;', '', true);
42 test('-webkit-hyphenate-limit-after: "1";', '', true);