chromium/third_party/blink/web_tests/fast/encoding/css-charset-evil/css-charset-evil.html

<!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">
<!--
     Note that encoding utf-8 is not suitable for this test since the encoding
     is always detected regardless of an error (or lack thereof) in the directive
     @charset. See crbug.com/583549.
-->
<pre>
Correct:
@charset "iso-8859-7";    <span id="a1&#225;&#226;" class='fail'>FAIL</span><span id="a1&#945&#946;" class='pass'>PASS</span>

Wrong Capitalization:
@CHARSET "iso-8859-7";    <span id="a2&#225;&#226;" class='pass'>PASS</span><span id="a2&#945;&#946;" class='fail'>FAIL</span>
@ChArSeT "iso-8859-7";    <span id="a3&#225;&#226;" class='pass'>PASS</span><span id="a3&#945;&#946;" class='fail'>FAIL</span>
@cHaRsEt "iso-8859-7";    <span id="a4&#225;&#226;" class='pass'>PASS</span><span id="a4&#945;&#946;" class='fail'>FAIL</span>

Wrong Whitespace:
@charset"iso-8859-7";     <span id="b1&#225;&#226;" class='pass'>PASS</span><span id="b1&#945;&#946;" class='fail'>FAIL</span>
@charset  "iso-8859-7";   <span id="b2&#225;&#226;" class='pass'>PASS</span><span id="b2&#945;&#946;" class='fail'>FAIL</span>
@charset\9"iso-8859-7";   <span id="b3&#225;&#226;" class='pass'>PASS</span><span id="b3&#945;&#946;" class='fail'>FAIL</span>
@charset\A"iso-8859-7";   <span id="b4&#225;&#226;" class='pass'>PASS</span><span id="b4&#945;&#946;" class='fail'>FAIL</span>
@charset\C"iso-8859-7";   <span id="b5&#225;&#226;" class='pass'>PASS</span><span id="b5&#945;&#946;" class='fail'>FAIL</span>
@charset\D"iso-8859-7";   <span id="b6&#225;&#226;" class='pass'>PASS</span><span id="b6&#945;&#946;" class='fail'>FAIL</span>
@charset "iso-8859-7" ;   <span id="b7&#225;&#226;" class='pass'>PASS</span><span id="b7&#945;&#946;" class='fail'>FAIL</span>
 @charset "iso-8859-7";   <span id="b8&#225;&#226;" class='pass'>PASS</span><span id="b8&#945;&#946;" class='fail'>FAIL</span>

Wrong Quote character:
@charset 'iso-8859-7';    <span id="c1&#225;&#226;" class='pass'>PASS</span><span id="c1&#945;&#946;" class='fail'>FAIL</span>
@charset "iso-8859-7';    <span id="c2&#225;&#226;" class='pass'>PASS</span><span id="c2&#945;&#946;" class='fail'>FAIL</span>
@charset 'iso-8859-7";    <span id="c3&#225;&#226;" class='pass'>PASS</span><span id="c3&#945;&#946;" class='fail'>FAIL</span>

Wrong Semicolon:
@charset "iso-8859-7"     <span id="d1&#225;&#226;" class='pass'>PASS</span><span id="d1&#945;&#946;" class='fail'>FAIL</span>
</pre>

<script>
if (window.testRunner)
    testRunner.dumpAsText();
</script>