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_T2.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_T2</p>
64 <div id='console'></div>
65 <script>
66 try {
67
68 /**
69  * @name: S7.8.4_A4.2_T2;
70  * @section: 7.8.4;
71  * @assertion: CharacterEscapeSequnce :: NonEscapeSequence;  
72  * @description: NonEscapeSequence :: ENGLISH CAPITAL ALPHABET;
73 */
74
75 //CHECK#A-Z
76 if ("A" !== "\A") {
77   testFailed('#A');
78 }
79
80 if ("B" !== "\B") {
81   testFailed('#B');
82 }
83
84 if ("C" !== "\C") {
85   testFailed('#C');
86 }
87
88 if ("D" !== "\D") {
89   testFailed('#D');
90 }
91
92 if ("E" !== "\E") {
93   testFailed('#E');
94 }
95
96 if ("F" !== "\F") {
97   testFailed('#F');
98 }
99
100 if ("G" !== "\G") {
101   testFailed('#G');
102 }
103
104 if ("H" !== "\H") {
105   testFailed('#H');
106 }
107
108 if ("I" !== "\I") {
109   testFailed('#I');
110 }
111
112 if ("J" !== "\J") {
113   testFailed('#J');
114 }
115
116 if ("K" !== "\K") {
117   testFailed('#K');
118 }
119
120 if ("L" !== "\L") {
121   testFailed('#L');
122 }
123
124 if ("M" !== "\M") {
125   testFailed('#M');
126 }
127
128 if ("N" !== "\N") {
129   testFailed('#N');
130 }
131
132 if ("O" !== "\O") {
133   testFailed('#O');
134 }
135
136 if ("P" !== "\P") {
137   testFailed('#P');
138 }
139
140 if ("Q" !== "\Q") {
141   testFailed('#Q');
142 }
143
144 if ("R" !== "\R") {
145   testFailed('#R');
146 }
147
148 if ("S" !== "\S") {
149   testFailed('#S');
150 }
151
152 if ("T" !== "\T") {
153   testFailed('#T');
154 }
155
156 if ("U" !== "\U") {
157   testFailed('#U');
158 }
159
160 if ("V" !== "\V") {
161   testFailed('#V');
162 }
163
164 if ("W" !== "\W") {
165   testFailed('#W');
166 }
167
168 if ("X" !== "\X") {
169   testFailed('#X');
170 }
171
172 if ("Y" !== "\Y") {
173   testFailed('#Y');
174 }
175
176 if ("Z" !== "\Z") {
177   testFailed('#Z');
178 }
179
180 } catch (ex) {
181     sputnikException = ex;
182 }
183
184 var successfullyParsed = true;
185 </script>
186
187 <script>
188 if (!successfullyParsed)
189     printTestFailed('successfullyParsed is not set');
190 else if (sputnikException)
191     printTestFailed(sputnikException);
192 else
193     printTestPassed("");
194 testPrint('<br /><span class="pass">TEST COMPLETE</span>');
195 </script>
196 </body>
197 </html>