summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/parsing-css-nonascii.html
blob: f7ffff4d5df51ecec8c19a4e37035da1b2eb0353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<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.
*/

#a127_\7F { color:red; }
#b127_ { color:green; }

#a128_\80 { color:red; }
#b128_€ { color:green; }

#a159_\9F { color:red; }
#b159_Ÿ { color:green; }

#a160_\A0 { color:red; }
#b160_  { color:green; }

#a384_\180 { color:red; }
#b384_ƀ { color:green; }
</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">#a127_\ { color: red; }
#a128_€ { color: red; }
#b128_€ { color: green; }
#a159_Ÿ { color: red; }
#b159_Ÿ { color: green; }
#a160_  { color: red; }
#b160_  { color: green; }
#a384_ƀ { color: red; }
#b384_ƀ { color: green; }
</pre>

<script>

</script>
</body>