﻿<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
/*
  === Warning ===

  This file intentionally contains scpecial characters which
  cannot be displayed by some text editors. Please
  carefully edit the file.
*/

#a:after { content:"65:A 9:	"; }
#b:after { content:"128: 159:"; }
#c:after { content:"1:"; }
#d:after { content:"8:"; }
#e:after { content:"9:	"; }
#f:after { content:"10:
"; } /* Newline. Invalid string */
#g:after { content:"11:"; }
#h:after { content:"12:"; } /* Newline. Invalid string */
#i:after { content:"13:
"; } /* Newline. Invalid string */
#j:after { content:"14:"; }
#k:after { content:"20:"; }
#l:after { content:"30:"; }
#m:after { content:"31:"; }
#n:after { content:"127:" }
#o:after { content:"384:ƀ" }
</style>

<script>

function runTest()
{
    if (window.testRunner)
        testRunner.dumpAsText();

    var rules = document.styleSheets[0].cssRules;
    var text = "";
    for (var i = 0; i < rules.length; i++) {
        text += rules.item(i).cssText;
        text += "\n";
    }

    document.getElementById("result").appendChild(document.createTextNode(text));

    if (document.getElementById("result").firstChild.data === document.getElementById("expected").firstChild.data)
        document.getElementById("message").firstChild.data = "SUCCESS";
    else
        document.getElementById("message").firstChild.data = "FAILURE";
}

</script>

</head>

<body onload="runTest()">

<p>Test parsing of CSS escapes.</p>

<p id="message">TEST DID NOT COMPLETE</p>

<p>Rules from the stylesheet:</p>

<pre id="result"></pre>

<p>Expected result:</p>

<pre id="expected">#a::after { content: '65:A 9:\9'; }
#b::after { content: '128: 159:'; }
#c::after { content: '1:\1'; }
#d::after { content: '8:\8'; }
#e::after { content: '9:\9'; }
#f::after { }
#g::after { content: '11:\b'; }
#h::after { }
#i::after { }
#j::after { content: '14:\e'; }
#k::after { content: '20:\14'; }
#l::after { content: '30:\1e'; }
#m::after { content: '31:\1f'; }
#n::after { content: '127:\7f'; }
#o::after { content: '384:ƀ'; }
</pre>

<script>

</script>
</body>

