Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / misplaced-charset.html
blob05e5c4beebd7552be44a746edc0543eae8e09581
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style type="text/css">
5 div.a {background-color: red;}
6 @charset "XXX";
7 div.a {background-color: green !important;}
8 @charset "XXX";
9 div.b {background-color: green !important;}
10 </style>
11 </head>
12 <body>
13 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=36515">bug 36515</a>:
14 CSS style definitions are ignored if they just follow a "@charset" which appears in lines other than the first line in stylesheet.</p>
15 <p>There should be two green squares below:</p>
16 <div class="a" style="height:100px; width:100px;"></div><br>
17 <div class="b" style="height:100px; width:100px; background-color:red;"></div>
18 <div style="height:5px; width:5px; background-color:green; visibility: hidden"></div>
19 <div id="result">Testing...</div>
20 <script>
21 if (window.testRunner)
22 testRunner.dumpAsText();
23 var expected = document.defaultView.getComputedStyle(document.getElementsByTagName("div")[2], null).backgroundColor;
24 var result = document.defaultView.getComputedStyle(document.getElementsByTagName("div")[0], null).backgroundColor == expected
25 && document.defaultView.getComputedStyle(document.getElementsByTagName("div")[1], null).backgroundColor == expected;
26 document.getElementById("result").innerHTML = result ? "PASS" : "FAIL";
27 </script>
28 </body>
29 </html>