Home | History | Annotate | Download | only in encoding
      1 <html>
      2 <head>
      3     <meta content="text/html; charset=windows-1251" http-equiv="Content-Type"/>
      4     <link rel="stylesheet" type="text/css" href="css-charset.css" charset="windows-1251">
      5     <!-- The document charset and link charset have lower priority than 
      6          @charset, so they shouldn't affect anything. -->
      7 </head>
      8 <body onload="test()">
      9 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=10155">bug 10155</a>:
     10 CSS2: @charset is not supported</p>
     11 <p>Test that <code>@charset</code> works and that indexed rule access via 
     12 an IE-specific <code>rules</code> property does not take it into account.</p>
     13 
     14 <p id="result"></p>
     15 
     16 <script>
     17 if (window.layoutTestController)
     18     layoutTestController.dumpAsText();
     19 
     20 function test() {
     21   try {
     22     text = document.styleSheets[0].rules[0].style.cssText;
     23     if (text.match('.*SUSS.*'))
     24       result.innerHTML = "SUCCESS";
     25     else
     26       result.innerHTML = "FAILURE: " + text;
     27   } catch (ex) {
     28     result.innerHTML = "FAILURE: " + ex;
     29   }
     30 }
     31 </script>
     32 
     33 </body>
     34 </html>
     35