<!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áâ" class='fail'>FAIL</span><span id="a1αβ" class='pass'>PASS</span>
Wrong Capitalization:
@CHARSET "iso-8859-7"; <span id="a2áâ" class='pass'>PASS</span><span id="a2αβ" class='fail'>FAIL</span>
@ChArSeT "iso-8859-7"; <span id="a3áâ" class='pass'>PASS</span><span id="a3αβ" class='fail'>FAIL</span>
@cHaRsEt "iso-8859-7"; <span id="a4áâ" class='pass'>PASS</span><span id="a4αβ" class='fail'>FAIL</span>
Wrong Whitespace:
@charset"iso-8859-7"; <span id="b1áâ" class='pass'>PASS</span><span id="b1αβ" class='fail'>FAIL</span>
@charset "iso-8859-7"; <span id="b2áâ" class='pass'>PASS</span><span id="b2αβ" class='fail'>FAIL</span>
@charset\9"iso-8859-7"; <span id="b3áâ" class='pass'>PASS</span><span id="b3αβ" class='fail'>FAIL</span>
@charset\A"iso-8859-7"; <span id="b4áâ" class='pass'>PASS</span><span id="b4αβ" class='fail'>FAIL</span>
@charset\C"iso-8859-7"; <span id="b5áâ" class='pass'>PASS</span><span id="b5αβ" class='fail'>FAIL</span>
@charset\D"iso-8859-7"; <span id="b6áâ" class='pass'>PASS</span><span id="b6αβ" class='fail'>FAIL</span>
@charset "iso-8859-7" ; <span id="b7áâ" class='pass'>PASS</span><span id="b7αβ" class='fail'>FAIL</span>
@charset "iso-8859-7"; <span id="b8áâ" class='pass'>PASS</span><span id="b8αβ" class='fail'>FAIL</span>
Wrong Quote character:
@charset 'iso-8859-7'; <span id="c1áâ" class='pass'>PASS</span><span id="c1αβ" class='fail'>FAIL</span>
@charset "iso-8859-7'; <span id="c2áâ" class='pass'>PASS</span><span id="c2αβ" class='fail'>FAIL</span>
@charset 'iso-8859-7"; <span id="c3áâ" class='pass'>PASS</span><span id="c3αβ" class='fail'>FAIL</span>
Wrong Semicolon:
@charset "iso-8859-7" <span id="d1áâ" class='pass'>PASS</span><span id="d1αβ" class='fail'>FAIL</span>
</pre>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>