tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / fast / css / parsing-css-escapes.html
1 <head>
2 <style>
3 /*
4   === Warning ===
5
6   This file intentionally contains special newline characters: \n \f \r \r\n
7   Keep them when you move the file between different OSes / file-systems
8 */
9
10 /* Base form of the rule: */
11 #a { background-color: green; }
12 #b { b\61 C\06bG\0052o\00075n\000064-col\6Fr: green; }
13 #c { b\61       c\6b
14 g\72\fo\75\rn\64\r
15 -color:green }
16 #d { background-colo\0000072: green; /* Invalid: too many hex characters. */}
17 #e { b\61\vckground-color: green; /* Invalid: \0b is not a newline character. */}
18 </style>
19
20 <script>
21
22 function runTest()
23 {
24     if (window.layoutTestController)
25         layoutTestController.dumpAsText();
26
27     var rules = document.styleSheets[0].cssRules;
28     var text = "";
29     for (var i = 0; i < rules.length; i++) {
30         text += rules.item(i).cssText;
31         text += "\n";
32     }
33
34     document.getElementById("result").appendChild(document.createTextNode(text));
35
36     if (document.getElementById("result").firstChild.data === document.getElementById("expected").firstChild.data)
37         document.getElementById("message").firstChild.data = "SUCCESS";
38     else
39         document.getElementById("message").firstChild.data = "FAILURE";
40 }
41
42 </script>
43
44 </head>
45
46 <body onload="runTest()">
47
48 <p>Test parsing of CSS escapes.</p>
49
50 <p id="message">TEST DID NOT COMPLETE</p>
51
52 <p>Rules from the stylesheet:</p>
53
54 <pre id="result"></pre>
55
56 <p>Expected result:</p>
57
58 <pre id="expected">#a { background-color: green; }
59 #b { background-color: green; }
60 #c { background-color: green; }
61 #d { }
62 #e { }
63 </pre>
64
65 <script>
66
67 </script>
68 </body>