StringObjectUse should not be a structure check for the original string object structure
[WebKit-https.git] / LayoutTests / sputnik / Conformance / 07_Lexical_Conventions / 7.8_Literals / 7.8.4_String_Literals / S7.8.4_A4.2_T4.html
1 <html>
2 <head>
3 <meta charset='utf-8'>
4 <style>
5 .pass {
6     font-weight: bold;
7     color: green;
8 }
9 .fail {
10     font-weight: bold;
11     color: red;
12 }
13 </style>
14
15 <script>
16 if (window.testRunner)
17     testRunner.dumpAsText();
18
19 function SputnikError(message)
20 {
21     this.message = message;
22 }
23
24 SputnikError.prototype.toString = function ()
25 {
26     return 'SputnikError: ' + this.message;
27 };
28
29 var sputnikException;
30
31 function testPrint(msg)
32 {
33     var span = document.createElement("span");
34     document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace 
35     span.innerHTML = msg + '<br />';
36 }
37
38 function escapeHTML(text)
39 {
40     return text.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;");
41 }
42
43 function printTestPassed(msg)
44 {
45     testPrint('<span><span class="pass">PASS</span> ' + escapeHTML(msg) + '</span>');
46 }
47
48 function printTestFailed(msg)
49 {
50     testPrint('<span><span class="fail">FAIL</span> ' + escapeHTML(msg) + '</span>');
51 }
52
53 function testFailed(msg)
54 {
55     throw new SputnikError(msg);
56 }
57
58 var successfullyParsed = false;
59 </script>
60
61 </head>
62 <body>
63 <p>S7.8.4_A4.2_T4</p>
64 <div id='console'></div>
65 <script>
66 try {
67
68 /**
69  * @name: S7.8.4_A4.2_T4;
70  * @section: 7.8.4;
71  * @assertion: CharacterEscapeSequnce :: NonEscapeSequence;  
72  * @description: NonEscapeSequence :: ENGLISH SMALL ALPHABET;
73 */
74
75 //CHECK#a-z without b, f, n, r, t, v, x, u
76
77 if ("a" !== "\a") {
78   testFailed('#a');
79 }
80
81 if ("c" !== "\c") {
82   testFailed('#c');
83 }
84
85 if ("d" !== "\d") {
86   testFailed('#d');
87 }
88
89 if ("e" !== "\e") {
90   testFailed('#e');
91 }
92
93 if ("g" !== "\g") {
94   testFailed('#g');
95 }
96
97 if ("h" !== "\h") {
98   testFailed('#h');
99 }
100
101 if ("i" !== "\i") {
102   testFailed('#i');
103 }
104
105 if ("j" !== "\j") {
106   testFailed('#j');
107 }
108
109 if ("k" !== "\k") {
110   testFailed('#k');
111 }
112
113 if ("l" !== "\l") {
114   testFailed('#l');
115 }
116
117 if ("m" !== "\m") {
118   testFailed('#m');
119 }
120
121
122 if ("o" !== "\o") {
123   testFailed('#o');
124 }
125
126 if ("p" !== "\p") {
127   testFailed('#p');
128 }
129
130 if ("q" !== "\q") {
131   testFailed('#q');
132 }
133
134 if ("s" !== "\s") {
135   testFailed('#s');
136 }
137
138 if ("w" !== "\w") {
139   testFailed('#w');
140 }
141
142 if ("y" !== "\y") {
143   testFailed('#y');
144 }
145
146 if ("z" !== "\z") {
147   testFailed('#z');
148 }
149
150
151 } catch (ex) {
152     sputnikException = ex;
153 }
154
155 var successfullyParsed = true;
156 </script>
157
158 <script>
159 if (!successfullyParsed)
160     printTestFailed('successfullyParsed is not set');
161 else if (sputnikException)
162     printTestFailed(sputnikException);
163 else
164     printTestPassed("");
165 testPrint('<br /><span class="pass">TEST COMPLETE</span>');
166 </script>
167 </body>
168 </html>