tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / css / misplaced-charset.html
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.layoutTestController)
22             layoutTestController.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>