Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / font-shorthand-mix-inherit.html
blobfcc184e125e28c8c7dd7ce079ead86450eb2bedd
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Test for WebKit bug 20181 : font shorthand with inherit keyword incorrectly parsed and rendered</title>
5 <script src="../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <p id="description">Test for WebKit bug <a href="https://bugs.webkit.org/show_bug.cgi?id=20181">20181</a> : font shorthand with inherit keyword incorrectly parsed and rendered</p>
9 <div id="console"></div>
11 <div id="tests_container">
13 <div id="test"></div>
15 </div>
17 <script>
18 var test = document.getElementById("test");
20 // Sanity check.
21 test.style.font = "12pt/14pt sans-serif";
22 shouldBe("test.style.getPropertyValue('font')", "'12pt/14pt sans-serif'");
23 test.style.font = "";
24 test.style.font = "inherit";
25 shouldBe("test.style.getPropertyValue('font')", "'inherit'");
26 test.style.font = "";
27 shouldBe("test.style.getPropertyValue('font')", "''");
28 test.style.font = "12pt/14pt inherit";
29 shouldBe("test.style.getPropertyValue('font')", "''");
30 test.style.font = "12pt/14pt bold inherit";
31 shouldBe("test.style.getPropertyValue('font')", "''");
32 test.style.font = "italic 12pt/14pt bold inherit";
33 shouldBe("test.style.getPropertyValue('font')", "''");
34 test.style.font = "italic 12pt/14pt bold arial inherit";
35 shouldBe("test.style.getPropertyValue('font')", "''");
36 test.style.font = "x-large/110% 'new century schoolbook', serif, inherit";
37 shouldBe("test.style.getPropertyValue('font')", "''");
38 test.style.font = " 'inherit'";
39 shouldBe("test.style.getPropertyValue('font')", "''");
40 test.style.font = "italic inherit 12pt/14pt bold arial inherit";
41 shouldBe("test.style.getPropertyValue('font')", "''");
42 test.style.font = "arial inherit";
43 shouldBe("test.style.getPropertyValue('font')", "''");
44 test.style.font = "Arial, Helvetica, inherit, sans-serif;";
45 shouldBe("test.style.getPropertyValue('font')", "''");
46 test.style.font = "inherit, sans-serif;";
47 shouldBe("test.style.getPropertyValue('font')", "''");
48 test.style.font = "italic inherit 12pt/14pt bold arial initial";
49 shouldBe("test.style.getPropertyValue('font')", "''");
50 // clean up after ourselves
51 var tests_container = document.getElementById("tests_container");
52 tests_container.parentNode.removeChild(tests_container);
53 </script>
54 </body>
55 </html>