| <!doctype html> |
| <meta charset="us-ascii"> |
| <title>Test of what variations on the @charset directive are acceptable</title> |
| <style> |
| body { line-height: 1.5em; } |
| span { display: none; padding: 2px;} |
| span.pass { background: lime; color: green; } |
| span.fail { background: red; color: white; } |
| </style> |
| <link rel=stylesheet href="css-charset-evil-a1.css"> |
| <link rel=stylesheet href="css-charset-evil-a2.css"> |
| <link rel=stylesheet href="css-charset-evil-a3.css"> |
| <link rel=stylesheet href="css-charset-evil-a4.css"> |
| <link rel=stylesheet href="css-charset-evil-b1.css"> |
| <link rel=stylesheet href="css-charset-evil-b2.css"> |
| <link rel=stylesheet href="css-charset-evil-b3.css"> |
| <link rel=stylesheet href="css-charset-evil-b4.css"> |
| <link rel=stylesheet href="css-charset-evil-b5.css"> |
| <link rel=stylesheet href="css-charset-evil-b6.css"> |
| <link rel=stylesheet href="css-charset-evil-b7.css"> |
| <link rel=stylesheet href="css-charset-evil-b8.css"> |
| <link rel=stylesheet href="css-charset-evil-c1.css"> |
| <link rel=stylesheet href="css-charset-evil-c2.css"> |
| <link rel=stylesheet href="css-charset-evil-c3.css"> |
| <link rel=stylesheet href="css-charset-evil-d1.css"> |
| <pre> |
| Correct: |
| @charset "utf-8"; <span id="a1ä" class='fail'>FAIL</span><span id="a1ä" class='pass'>PASS</span> |
| |
| Wrong Capitalization: |
| @CHARSET "utf-8"; <span id="a2ä" class='pass'>PASS</span><span id="a2ä" class='fail'>FAIL</span> |
| @ChArSeT "utf-8"; <span id="a3ä" class='pass'>PASS</span><span id="a3ä" class='fail'>FAIL</span> |
| @cHaRsEt "utf-8"; <span id="a4ä" class='pass'>PASS</span><span id="a4ä" class='fail'>FAIL</span> |
| |
| Wrong Whitespace: |
| @charset"utf-8"; <span id="b1ä" class='pass'>PASS</span><span id="b1ä" class='fail'>FAIL</span> |
| @charset "utf-8"; <span id="b2ä" class='pass'>PASS</span><span id="b2ä" class='fail'>FAIL</span> |
| @charset\9"utf-8"; <span id="b3ä" class='pass'>PASS</span><span id="b3ä" class='fail'>FAIL</span> |
| @charset\A"utf-8"; <span id="b4ä" class='pass'>PASS</span><span id="b4ä" class='fail'>FAIL</span> |
| @charset\C"utf-8"; <span id="b5ä" class='pass'>PASS</span><span id="b5ä" class='fail'>FAIL</span> |
| @charset\D"utf-8"; <span id="b6ä" class='pass'>PASS</span><span id="b6ä" class='fail'>FAIL</span> |
| @charset "utf-8" ; <span id="b7ä" class='pass'>PASS</span><span id="b7ä" class='fail'>FAIL</span> |
| @charset "utf-8"; <span id="b8ä" class='pass'>PASS</span><span id="b8ä" class='fail'>FAIL</span> |
| |
| Wrong Quote character: |
| @charset 'utf-8'; <span id="c1ä" class='pass'>PASS</span><span id="c1ä" class='fail'>FAIL</span> |
| @charset "utf-8'; <span id="c2ä" class='pass'>PASS</span><span id="c2ä" class='fail'>FAIL</span> |
| @charset 'utf-8"; <span id="c3ä" class='pass'>PASS</span><span id="c3ä" class='fail'>FAIL</span> |
| |
| Wrong Semicolon: |
| @charset "utf-8" <span id="d1ä" class='pass'>PASS</span><span id="d1ä" class='fail'>FAIL</span> |
| </pre> |
| |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| </script> |