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-evil.css"> 5 </head> 6 <body onload="test()"> 7 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=10155">bug 10155</a>: 8 CSS2: @charset is not supported</p> 9 10 <p>CSS 2.1 says that <code>@charset "</code> must be written literally, 11 but Firefox and IE allow extra spaces and single quotes.</p> 12 13 <p id="result"></p> 14 15 <script> 16 if (window.layoutTestController) 17 layoutTestController.dumpAsText(); 18 19 function test() { 20 try { 21 text = document.styleSheets[0].rules[0].style.getPropertyValue("content"); 22 text = text.replace(/"/g, ""); 23 document.getElementById("result").textContent = text; 24 } catch (ex) { 25 document.getElementById("result").textContent = ex.toString(); 26 } 27 } 28 </script> 29 30 </body> 31 </html> 32