Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / tokenizer / entities-01.html
blobc8e53be629b28966978e18ef4d46195892d45d18
1 <!doctype html>
2 <title>Entities in content</title>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 window.onload = function() {
9 var entities = [
10 "AElig;",
11 "AElig",
12 "AMP;",
13 "AMP",
14 "Aacute;",
15 "Aacute",
16 "Acirc;",
17 "Acirc",
18 "Agrave;",
19 "Agrave",
20 "Alpha;",
21 "Aring;",
22 "Aring",
23 "Atilde;",
24 "Atilde",
25 "Auml;",
26 "Auml",
27 "Beta;",
28 "COPY;",
29 "COPY",
30 "Ccedil;",
31 "Ccedil",
32 "Chi;",
33 "Dagger;",
34 "Delta;",
35 "ETH;",
36 "ETH",
37 "Eacute;",
38 "Eacute",
39 "Ecirc;",
40 "Ecirc",
41 "Egrave;",
42 "Egrave",
43 "Epsilon;",
44 "Eta;",
45 "Euml;",
46 "Euml",
47 "GT;",
48 "GT",
49 "Gamma;",
50 "Iacute;",
51 "Iacute",
52 "Icirc;",
53 "Icirc",
54 "Igrave;",
55 "Igrave",
56 "Iota;",
57 "Iuml;",
58 "Iuml",
59 "Kappa;",
60 "LT;",
61 "LT",
62 "Lambda;",
63 "Mu;",
64 "Ntilde;",
65 "Ntilde",
66 "Nu;",
67 "OElig;",
68 "Oacute;",
69 "Oacute",
70 "Ocirc;",
71 "Ocirc",
72 "Ograve;",
73 "Ograve",
74 "Omega;",
75 "Omicron;",
76 "Oslash;",
77 "Oslash",
78 "Otilde;",
79 "Otilde",
80 "Ouml;",
81 "Ouml",
82 "Phi;",
83 "Pi;",
84 "Prime;",
85 "Psi;",
86 "QUOT;",
87 "QUOT",
88 "REG;",
89 "REG",
90 "Rho;",
91 "Scaron;",
92 "Sigma;",
93 "THORN;",
94 "THORN",
95 "TRADE;",
96 "Tau;",
97 "Theta;",
98 "Uacute;",
99 "Uacute",
100 "Ucirc;",
101 "Ucirc",
102 "Ugrave;",
103 "Ugrave",
104 "Upsilon;",
105 "Uuml;",
106 "Uuml",
107 "Xi;",
108 "Yacute;",
109 "Yacute",
110 "Yuml;",
111 "Zeta;",
112 "aacute;",
113 "aacute",
114 "acirc;",
115 "acirc",
116 "acute;",
117 "acute",
118 "aelig;",
119 "aelig",
120 "agrave;",
121 "agrave",
122 "alefsym;",
123 "alpha;",
124 "amp;",
125 "amp",
126 "and;",
127 "ang;",
128 "apos;",
129 "aring;",
130 "aring",
131 "asymp;",
132 "atilde;",
133 "atilde",
134 "auml;",
135 "auml",
136 "bdquo;",
137 "beta;",
138 "brvbar;",
139 "brvbar",
140 "bull;",
141 "cap;",
142 "ccedil;",
143 "ccedil",
144 "cedil;",
145 "cedil",
146 "cent;",
147 "cent",
148 "chi;",
149 "circ;",
150 "clubs;",
151 "cong;",
152 "copy;",
153 "copy",
154 "crarr;",
155 "cup;",
156 "curren;",
157 "curren",
158 "dArr;",
159 "dagger;",
160 "darr;",
161 "deg;",
162 "deg",
163 "delta;",
164 "diams;",
165 "divide;",
166 "divide",
167 "eacute;",
168 "eacute",
169 "ecirc;",
170 "ecirc",
171 "egrave;",
172 "egrave",
173 "empty;",
174 "emsp;",
175 "ensp;",
176 "epsilon;",
177 "equiv;",
178 "eta;",
179 "eth;",
180 "eth",
181 "euml;",
182 "euml",
183 "euro;",
184 "exist;",
185 "fnof;",
186 "forall;",
187 "frac12;",
188 "frac12",
189 "frac14;",
190 "frac14",
191 "frac34;",
192 "frac34",
193 "frasl;",
194 "gamma;",
195 "ge;",
196 "gt;",
197 "gt",
198 "hArr;",
199 "harr;",
200 "hearts;",
201 "hellip;",
202 "iacute;",
203 "iacute",
204 "icirc;",
205 "icirc",
206 "iexcl;",
207 "iexcl",
208 "igrave;",
209 "igrave",
210 "image;",
211 "infin;",
212 "int;",
213 "iota;",
214 "iquest;",
215 "iquest",
216 "isin;",
217 "iuml;",
218 "iuml",
219 "kappa;",
220 "lArr;",
221 "lambda;",
222 "lang;",
223 "laquo;",
224 "laquo",
225 "larr;",
226 "lceil;",
227 "ldquo;",
228 "le;",
229 "lfloor;",
230 "lowast;",
231 "loz;",
232 "lrm;",
233 "lsaquo;",
234 "lsquo;",
235 "lt;",
236 "lt",
237 "macr;",
238 "macr",
239 "mdash;",
240 "micro;",
241 "micro",
242 "middot;",
243 "middot",
244 "minus;",
245 "mu;",
246 "nabla;",
247 "nbsp;",
248 "nbsp",
249 "ndash;",
250 "ne;",
251 "ni;",
252 "not;",
253 "not",
254 "notin;",
255 "nsub;",
256 "ntilde;",
257 "ntilde",
258 "nu;",
259 "oacute;",
260 "oacute",
261 "ocirc;",
262 "ocirc",
263 "oelig;",
264 "ograve;",
265 "ograve",
266 "oline;",
267 "omega;",
268 "omicron;",
269 "oplus;",
270 "or;",
271 "ordf;",
272 "ordf",
273 "ordm;",
274 "ordm",
275 "oslash;",
276 "oslash",
277 "otilde;",
278 "otilde",
279 "otimes;",
280 "ouml;",
281 "ouml",
282 "para;",
283 "para",
284 "part;",
285 "permil;",
286 "perp;",
287 "phi;",
288 "pi;",
289 "piv;",
290 "plusmn;",
291 "plusmn",
292 "pound;",
293 "pound",
294 "prime;",
295 "prod;",
296 "prop;",
297 "psi;",
298 "quot;",
299 "quot",
300 "rArr;",
301 "radic;",
302 "rang;",
303 "raquo;",
304 "raquo",
305 "rarr;",
306 "rceil;",
307 "rdquo;",
308 "real;",
309 "reg;",
310 "reg",
311 "rfloor;",
312 "rho;",
313 "rlm;",
314 "rsaquo;",
315 "rsquo;",
316 "sbquo;",
317 "scaron;",
318 "sdot;",
319 "sect;",
320 "sect",
321 "shy;",
322 "shy",
323 "sigma;",
324 "sigmaf;",
325 "sim;",
326 "spades;",
327 "sub;",
328 "sube;",
329 "sum;",
330 "sup1;",
331 "sup1",
332 "sup2;",
333 "sup2",
334 "sup3;",
335 "sup3",
336 "sup;",
337 "supe;",
338 "szlig;",
339 "szlig",
340 "tau;",
341 "there4;",
342 "theta;",
343 "thetasym;",
344 "thinsp;",
345 "thorn;",
346 "thorn",
347 "tilde;",
348 "times;",
349 "times",
350 "trade;",
351 "uArr;",
352 "uacute;",
353 "uacute",
354 "uarr;",
355 "ucirc;",
356 "ucirc",
357 "ugrave;",
358 "ugrave",
359 "uml;",
360 "uml",
361 "upsih;",
362 "upsilon;",
363 "uuml;",
364 "uuml",
365 "weierp;",
366 "xi;",
367 "yacute;",
368 "yacute",
369 "yen;",
370 "yen",
371 "yuml;",
372 "yuml",
373 "zeta;",
374 "zwj;",
375 "zwnj;",
376 "#0;",
377 "#65;",
378 "#55296;",
379 "#57343;",
380 "#2147483647;",
381 "#2147483648;",
382 "#4294967361;",
385 var characters = [
386 "\u00C6",
387 "\u00C6",
388 "\u0026",
389 "\u0026",
390 "\u00C1",
391 "\u00C1",
392 "\u00C2",
393 "\u00C2",
394 "\u00C0",
395 "\u00C0",
396 "\u0391",
397 "\u00C5",
398 "\u00C5",
399 "\u00C3",
400 "\u00C3",
401 "\u00C4",
402 "\u00C4",
403 "\u0392",
404 "\u00A9",
405 "\u00A9",
406 "\u00C7",
407 "\u00C7",
408 "\u03A7",
409 "\u2021",
410 "\u0394",
411 "\u00D0",
412 "\u00D0",
413 "\u00C9",
414 "\u00C9",
415 "\u00CA",
416 "\u00CA",
417 "\u00C8",
418 "\u00C8",
419 "\u0395",
420 "\u0397",
421 "\u00CB",
422 "\u00CB",
423 "\u003E",
424 "\u003E",
425 "\u0393",
426 "\u00CD",
427 "\u00CD",
428 "\u00CE",
429 "\u00CE",
430 "\u00CC",
431 "\u00CC",
432 "\u0399",
433 "\u00CF",
434 "\u00CF",
435 "\u039A",
436 "\u003C",
437 "\u003C",
438 "\u039B",
439 "\u039C",
440 "\u00D1",
441 "\u00D1",
442 "\u039D",
443 "\u0152",
444 "\u00D3",
445 "\u00D3",
446 "\u00D4",
447 "\u00D4",
448 "\u00D2",
449 "\u00D2",
450 "\u03A9",
451 "\u039F",
452 "\u00D8",
453 "\u00D8",
454 "\u00D5",
455 "\u00D5",
456 "\u00D6",
457 "\u00D6",
458 "\u03A6",
459 "\u03A0",
460 "\u2033",
461 "\u03A8",
462 "\u0022",
463 "\u0022",
464 "\u00AE",
465 "\u00AE",
466 "\u03A1",
467 "\u0160",
468 "\u03A3",
469 "\u00DE",
470 "\u00DE",
471 "\u2122",
472 "\u03A4",
473 "\u0398",
474 "\u00DA",
475 "\u00DA",
476 "\u00DB",
477 "\u00DB",
478 "\u00D9",
479 "\u00D9",
480 "\u03A5",
481 "\u00DC",
482 "\u00DC",
483 "\u039E",
484 "\u00DD",
485 "\u00DD",
486 "\u0178",
487 "\u0396",
488 "\u00E1",
489 "\u00E1",
490 "\u00E2",
491 "\u00E2",
492 "\u00B4",
493 "\u00B4",
494 "\u00E6",
495 "\u00E6",
496 "\u00E0",
497 "\u00E0",
498 "\u2135",
499 "\u03B1",
500 "\u0026",
501 "\u0026",
502 "\u2227",
503 "\u2220",
504 "\u0027",
505 "\u00E5",
506 "\u00E5",
507 "\u2248",
508 "\u00E3",
509 "\u00E3",
510 "\u00E4",
511 "\u00E4",
512 "\u201E",
513 "\u03B2",
514 "\u00A6",
515 "\u00A6",
516 "\u2022",
517 "\u2229",
518 "\u00E7",
519 "\u00E7",
520 "\u00B8",
521 "\u00B8",
522 "\u00A2",
523 "\u00A2",
524 "\u03C7",
525 "\u02C6",
526 "\u2663",
527 "\u2245",
528 "\u00A9",
529 "\u00A9",
530 "\u21B5",
531 "\u222A",
532 "\u00A4",
533 "\u00A4",
534 "\u21D3",
535 "\u2020",
536 "\u2193",
537 "\u00B0",
538 "\u00B0",
539 "\u03B4",
540 "\u2666",
541 "\u00F7",
542 "\u00F7",
543 "\u00E9",
544 "\u00E9",
545 "\u00EA",
546 "\u00EA",
547 "\u00E8",
548 "\u00E8",
549 "\u2205",
550 "\u2003",
551 "\u2002",
552 "\u03B5",
553 "\u2261",
554 "\u03B7",
555 "\u00F0",
556 "\u00F0",
557 "\u00EB",
558 "\u00EB",
559 "\u20AC",
560 "\u2203",
561 "\u0192",
562 "\u2200",
563 "\u00BD",
564 "\u00BD",
565 "\u00BC",
566 "\u00BC",
567 "\u00BE",
568 "\u00BE",
569 "\u2044",
570 "\u03B3",
571 "\u2265",
572 "\u003E",
573 "\u003E",
574 "\u21D4",
575 "\u2194",
576 "\u2665",
577 "\u2026",
578 "\u00ED",
579 "\u00ED",
580 "\u00EE",
581 "\u00EE",
582 "\u00A1",
583 "\u00A1",
584 "\u00EC",
585 "\u00EC",
586 "\u2111",
587 "\u221E",
588 "\u222B",
589 "\u03B9",
590 "\u00BF",
591 "\u00BF",
592 "\u2208",
593 "\u00EF",
594 "\u00EF",
595 "\u03BA",
596 "\u21D0",
597 "\u03BB",
598 "\u27e8",
599 "\u00AB",
600 "\u00AB",
601 "\u2190",
602 "\u2308",
603 "\u201C",
604 "\u2264",
605 "\u230A",
606 "\u2217",
607 "\u25CA",
608 "\u200E",
609 "\u2039",
610 "\u2018",
611 "\u003C",
612 "\u003C",
613 "\u00AF",
614 "\u00AF",
615 "\u2014",
616 "\u00B5",
617 "\u00B5",
618 "\u00B7",
619 "\u00B7",
620 "\u2212",
621 "\u03BC",
622 "\u2207",
623 "\u00A0",
624 "\u00A0",
625 "\u2013",
626 "\u2260",
627 "\u220B",
628 "\u00AC",
629 "\u00AC",
630 "\u2209",
631 "\u2284",
632 "\u00F1",
633 "\u00F1",
634 "\u03BD",
635 "\u00F3",
636 "\u00F3",
637 "\u00F4",
638 "\u00F4",
639 "\u0153",
640 "\u00F2",
641 "\u00F2",
642 "\u203E",
643 "\u03C9",
644 "\u03BF",
645 "\u2295",
646 "\u2228",
647 "\u00AA",
648 "\u00AA",
649 "\u00BA",
650 "\u00BA",
651 "\u00F8",
652 "\u00F8",
653 "\u00F5",
654 "\u00F5",
655 "\u2297",
656 "\u00F6",
657 "\u00F6",
658 "\u00B6",
659 "\u00B6",
660 "\u2202",
661 "\u2030",
662 "\u22A5",
663 "\u03C6",
664 "\u03C0",
665 "\u03D6",
666 "\u00B1",
667 "\u00B1",
668 "\u00A3",
669 "\u00A3",
670 "\u2032",
671 "\u220F",
672 "\u221D",
673 "\u03C8",
674 "\u0022",
675 "\u0022",
676 "\u21D2",
677 "\u221A",
678 "\u27e9",
679 "\u00BB",
680 "\u00BB",
681 "\u2192",
682 "\u2309",
683 "\u201D",
684 "\u211C",
685 "\u00AE",
686 "\u00AE",
687 "\u230B",
688 "\u03C1",
689 "\u200F",
690 "\u203A",
691 "\u2019",
692 "\u201A",
693 "\u0161",
694 "\u22C5",
695 "\u00A7",
696 "\u00A7",
697 "\u00AD",
698 "\u00AD",
699 "\u03C3",
700 "\u03C2",
701 "\u223C",
702 "\u2660",
703 "\u2282",
704 "\u2286",
705 "\u2211",
706 "\u00B9",
707 "\u00B9",
708 "\u00B2",
709 "\u00B2",
710 "\u00B3",
711 "\u00B3",
712 "\u2283",
713 "\u2287",
714 "\u00DF",
715 "\u00DF",
716 "\u03C4",
717 "\u2234",
718 "\u03B8",
719 "\u03D1",
720 "\u2009",
721 "\u00FE",
722 "\u00FE",
723 "\u02DC",
724 "\u00D7",
725 "\u00D7",
726 "\u2122",
727 "\u21D1",
728 "\u00FA",
729 "\u00FA",
730 "\u2191",
731 "\u00FB",
732 "\u00FB",
733 "\u00F9",
734 "\u00F9",
735 "\u00A8",
736 "\u00A8",
737 "\u03D2",
738 "\u03C5",
739 "\u00FC",
740 "\u00FC",
741 "\u2118",
742 "\u03BE",
743 "\u00FD",
744 "\u00FD",
745 "\u00A5",
746 "\u00A5",
747 "\u00FF",
748 "\u00FF",
749 "\u03B6",
750 "\u200D",
751 "\u200C",
752 "\uFFFD",
753 "\u0041",
754 "\uFFFD",
755 "\uFFFD",
756 "\uFFFD",
757 "\uFFFD",
758 "\uFFFD"
761 var log = "";
762 var elm = document.getElementsByTagName("p")[0];
763 var entity, character, characterCode, result, resultCode;
764 for (var i = 0, len = entities.length; i < len; ++i) {
765 entity = entities[i];
766 character = characters[i];
767 resultCode = characterCode = "";
768 elm.innerHTML = "&" + entity + "X ";
769 result = elm.firstChild.data.split("X")[0];
770 if (result.length == 1)
771 resultCode = " (\\u" + result.charCodeAt(0).toString(16) + ")";
772 if (character.length == 1)
773 characterCode = " (\\u" + character.charCodeAt(0).toString(16) + ")";
774 if (result != character)
775 log += entity + " (was: " + result + resultCode + ", expected: " + character + characterCode + ")\n";
777 if (log == "")
778 elm.innerHTML = "PASS";
779 else
780 document.body.innerHTML = "<plaintext>FAIL:\n\n" + log;
782 </script>
783 <p>FAIL (script didn't run)</p>