1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.htmlunit.general.huge;
16
17 import java.util.ArrayList;
18 import java.util.Arrays;
19 import java.util.Collection;
20 import java.util.List;
21
22 import org.htmlunit.WebClient;
23 import org.htmlunit.WebDriverTestCase;
24 import org.htmlunit.html.DefaultElementFactory;
25 import org.htmlunit.junit.BrowserParameterizedRunner;
26 import org.htmlunit.junit.BrowserParameterizedRunner.Default;
27 import org.htmlunit.junit.annotation.Alerts;
28 import org.htmlunit.junit.annotation.HtmlUnitNYI;
29 import org.junit.After;
30 import org.junit.Test;
31 import org.junit.runner.RunWith;
32 import org.junit.runners.Parameterized.Parameter;
33 import org.junit.runners.Parameterized.Parameters;
34 import org.openqa.selenium.JavascriptExecutor;
35 import org.openqa.selenium.WebDriver;
36 import org.openqa.selenium.htmlunit.HtmlUnitDriver;
37
38
39
40
41
42
43
44
45 @RunWith(BrowserParameterizedRunner.class)
46 public class ElementClosesElementTest extends WebDriverTestCase {
47
48 private static int ServerRestartCount_;
49
50 private static final List<String> PARENT_ZERO = Arrays.asList("area", "base", "basefont", "bgsound", "br",
51 "command", "col", "colgroup",
52 "embed", "frame", "frameset", "head", "hr", "iframe", "image", "img", "input", "keygen",
53 "link", "meta", "noembed", "noframes", "noscript", "param", "plaintext",
54 "script", "select", "source", "style",
55 "table", "tbody", "template", "textarea", "tfoot", "thead", "title",
56 "tr", "track", "wbr", "xmp");
57
58 private static final List<String> CHILD_ZERO = Arrays.asList("body", "caption", "col", "colgroup",
59 "frame", "frameset", "head", "html", "tbody", "td", "tfoot", "th", "thead", "tr");
60
61 private static final List<String> SVG_CHILD_ZERO = Arrays.asList("b", "big", "blockquote", "body", "br",
62 "center", "code", "dd", "div", "dl", "dt", "em", "embed", "h1", "h2", "h3", "h4", "h5", "h6", "head",
63 "hr", "i", "img", "li", "listing", "menu", "meta", "nobr", "ol", "p", "pre", "ruby", "s", "small",
64 "span", "strike", "strong", "sub", "sup", "table", "tt", "u", "ul", "var");
65
66 private static final String RESULT_SCRIPT = " var e = document.getElementById('outer');\n"
67 + " var res = '-';\n"
68 + " try {\n"
69 + " res = e == null ? e : e.children.length;\n"
70 + " } catch(e) { res = 'exception'; }\n"
71 + " return '' + res;";
72
73
74
75
76
77
78 @Parameters
79 public static Collection<Object[]> data() throws Exception {
80 final List<Object[]> list = new ArrayList<>();
81 final List<String> strings = new ArrayList<>(DefaultElementFactory.SUPPORTED_TAGS_);
82 strings.add("unknown");
83
84 for (final String parent : strings) {
85 for (final String child : strings) {
86 list.add(new Object[] {parent, child});
87 }
88 }
89 return list;
90 }
91
92 private void test(final String parent, final String child) throws Exception {
93 String bodyStart = "<body>\n";
94 String bodyEnd = "</body>\n";
95
96 final String html;
97 if ("caption".equals(parent)) {
98 html = "<table><caption id='outer'><" + child + "></table>\n";
99 }
100 else if ("col".equals(parent)) {
101 html = "<table><colgroup><col id='outer'><" + child + "></table>\n";
102 }
103 else if ("colgroup".equals(parent)) {
104 html = "<table><colgroup id='outer'><" + child + "></table>\n";
105 }
106 else if ("frame".equals(parent)) {
107 bodyStart = "<frameset>\n";
108 html = "<frame id='outer'><" + child + "></frame>\n";
109 bodyEnd = "</frameset></html>";
110 }
111 else if ("frameset".equals(parent)) {
112 bodyStart = "";
113 html = "<frameset id='outer'><" + child + "></frameset>\n";
114 bodyEnd = "";
115 }
116 else if ("script".equals(parent)) {
117 html = "<script id='outer'>//<" + child + ">\n</script>\n";
118 }
119 else if ("tbody".equals(parent)) {
120 html = "<table><tbody id='outer'><" + child + "></table>\n";
121 }
122 else if ("td".equals(parent)) {
123 html = "<table><tr><td id='outer'><" + child + "></table>\n";
124 }
125 else if ("tfoot".equals(parent)) {
126 html = "<table><tfoot id='outer'><" + child + "></table>\n";
127 }
128 else if ("th".equals(parent)) {
129 html = "<table><tr><th id='outer'><" + child + "></table>\n";
130 }
131 else if ("thead".equals(parent)) {
132 html = "<table><thead id='outer'><" + child + "></table>\n";
133 }
134 else if ("tr".equals(parent)) {
135 html = "<table><tr id='outer'><" + child + "></table>\n";
136 }
137 else {
138 html = "<" + parent + " id='outer'><" + child + ">\n";
139 }
140
141 String pageHtml = DOCTYPE_HTML
142 + "<html><head>\n"
143 + "<title>-</title>\n"
144 + "</head>\n"
145 + bodyStart
146 + html
147 + bodyEnd
148 + "</html>";
149
150 if ("basefont".equals(parent)
151 || "base".equals(parent)
152 || "isindex".equals(parent)) {
153 pageHtml = DOCTYPE_HTML
154 + "<html><head>\n"
155 + "<" + parent + " id='outer'><" + child + ">\n"
156 + "</head><body>\n"
157 + "</body></html>";
158 }
159 else if ("head".equals(parent)) {
160 pageHtml = DOCTYPE_HTML
161 + "<html><head id='outer'><" + child + ">\n"
162 + "</head><body>\n"
163 + "</body></html>";
164 }
165 else if ("title".equals(parent)) {
166 pageHtml = DOCTYPE_HTML
167 + "<html><head>\n"
168 + "<title id='outer'><" + child + ">\n"
169 + "</head><body>\n"
170 + "</body></html>";
171 }
172
173 String expected = "1";
174 if (getExpectedAlerts().length == 1) {
175 expected = getExpectedAlerts()[0];
176 }
177 else {
178 if (CHILD_ZERO.contains(child)) {
179 expected = "0";
180 }
181 else if (PARENT_ZERO.contains(parent)) {
182 expected = "0";
183 }
184 else if ("html".equals(parent)) {
185 expected = "2";
186 }
187
188 if ("svg".equals(parent)) {
189 expected = "1";
190 if (SVG_CHILD_ZERO.contains(child)) {
191 expected = "0";
192 }
193 }
194
195 if ("command".equals(parent) && getBrowserVersion().isFirefox()) {
196 expected = "1";
197 }
198 }
199
200 ServerRestartCount_++;
201 if (ServerRestartCount_ == 200) {
202 stopWebServers();
203 ServerRestartCount_ = 0;
204 }
205
206 final WebDriver driver = getWebDriver();
207 if (driver instanceof HtmlUnitDriver) {
208 final WebClient webClient = ((HtmlUnitDriver) driver).getWebClient();
209 webClient.getOptions().setThrowExceptionOnScriptError(false);
210 }
211
212 loadPage2(pageHtml);
213
214 final String result = (String) ((JavascriptExecutor) driver).executeScript(RESULT_SCRIPT);
215 assertEquals(expected, result);
216 }
217
218
219
220
221 @Parameter
222 public String parent_;
223
224
225
226
227 @Parameter(1)
228 public String child_;
229
230
231
232
233 @After
234 public void after() {
235 parent_ = null;
236 child_ = null;
237 }
238
239
240
241
242 @Override
243 protected boolean isWebClientCached() {
244 return true;
245 }
246
247
248
249
250
251 @Test
252 @Default
253 public void closes() throws Exception {
254 test(parent_, child_);
255 }
256
257
258
259
260 @Test
261 @Alerts("0")
262 public void _a_a() throws Exception {
263 test("a", "a");
264 }
265
266
267
268
269 @Test
270 @Alerts("0")
271 public void _button_button() throws Exception {
272 test("button", "button");
273 }
274
275
276
277
278 @Test
279 @Alerts("1")
280 public void _colgroup_col() throws Exception {
281 test("colgroup", "col");
282 }
283
284
285
286
287 @Test
288 @Alerts("1")
289 public void _colgroup_template() throws Exception {
290 test("colgroup", "template");
291 }
292
293
294
295
296 @Test
297 @Alerts("0")
298 public void _command_body() throws Exception {
299 test("command", "body");
300 }
301
302
303
304
305 @Test
306 @Alerts("0")
307 public void _command_caption() throws Exception {
308 test("command", "caption");
309 }
310
311
312
313
314 @Test
315 @Alerts("0")
316 public void _command_col() throws Exception {
317 test("command", "col");
318 }
319
320
321
322
323 @Test
324 @Alerts("0")
325 public void _command_colgroup() throws Exception {
326 test("command", "colgroup");
327 }
328
329
330
331
332 @Test
333 @Alerts("0")
334 public void _command_frame() throws Exception {
335 test("command", "frame");
336 }
337
338
339
340
341 @Test
342 @Alerts("0")
343 public void _command_frameset() throws Exception {
344 test("command", "frameset");
345 }
346
347
348
349
350 @Test
351 @Alerts("0")
352 public void _command_head() throws Exception {
353 test("command", "head");
354 }
355
356
357
358
359 @Test
360 @Alerts("0")
361 public void _command_html() throws Exception {
362 test("command", "html");
363 }
364
365
366
367
368 @Test
369 @Alerts("0")
370 public void _command_tbody() throws Exception {
371 test("command", "tbody");
372 }
373
374
375
376
377 @Test
378 @Alerts("0")
379 public void _command_td() throws Exception {
380 test("command", "td");
381 }
382
383
384
385
386 @Test
387 @Alerts("0")
388 public void _command_tfoot() throws Exception {
389 test("command", "tfoot");
390 }
391
392
393
394
395 @Test
396 @Alerts("0")
397 public void _command_th() throws Exception {
398 test("command", "th");
399 }
400
401
402
403
404 @Test
405 @Alerts("0")
406 public void _command_thead() throws Exception {
407 test("command", "thead");
408 }
409
410
411
412
413 @Test
414 @Alerts("0")
415 public void _command_tr() throws Exception {
416 test("command", "tr");
417 }
418
419
420
421
422 @Test
423 @Alerts("0")
424 public void _dd_dd() throws Exception {
425 test("dd", "dd");
426 }
427
428
429
430
431 @Test
432 @Alerts("0")
433 public void _dd_dt() throws Exception {
434 test("dd", "dt");
435 }
436
437
438
439
440 @Test
441 @Alerts("0")
442 public void _dt_dd() throws Exception {
443 test("dt", "dd");
444 }
445
446
447
448
449 @Test
450 @Alerts("0")
451 public void _dt_dt() throws Exception {
452 test("dt", "dt");
453 }
454
455
456
457
458 @Test
459 @Alerts("0")
460 public void _form_form() throws Exception {
461 test("form", "form");
462 }
463
464
465
466
467 @Test
468 @Alerts("1")
469 public void _form_isindex() throws Exception {
470 test("form", "isindex");
471 }
472
473
474
475
476 @Test
477 @Alerts("1")
478 public void _frameset_frame() throws Exception {
479 test("frameset", "frame");
480 }
481
482
483
484
485 @Test
486 @Alerts("1")
487 public void _frameset_frameset() throws Exception {
488 test("frameset", "frameset");
489 }
490
491
492
493
494 @Test
495 @Alerts("1")
496 public void _frameset_noframes() throws Exception {
497 test("frameset", "noframes");
498 }
499
500
501
502
503 @Test
504 @Alerts("0")
505 public void _h1_h1() throws Exception {
506 test("h1", "h1");
507 }
508
509
510
511
512 @Test
513 @Alerts("0")
514 public void _h1_h2() throws Exception {
515 test("h1", "h2");
516 }
517
518
519
520
521 @Test
522 @Alerts("0")
523 public void _h1_h3() throws Exception {
524 test("h1", "h3");
525 }
526
527
528
529
530 @Test
531 @Alerts("0")
532 public void _h1_h4() throws Exception {
533 test("h1", "h4");
534 }
535
536
537
538
539 @Test
540 @Alerts("0")
541 public void _h1_h5() throws Exception {
542 test("h1", "h5");
543 }
544
545
546
547
548 @Test
549 @Alerts("0")
550 public void _h1_h6() throws Exception {
551 test("h1", "h6");
552 }
553
554
555
556
557 @Test
558 @Alerts("0")
559 public void _h2_h1() throws Exception {
560 test("h2", "h1");
561 }
562
563
564
565
566 @Test
567 @Alerts("0")
568 public void _h2_h2() throws Exception {
569 test("h2", "h2");
570 }
571
572
573
574
575 @Test
576 @Alerts("0")
577 public void _h2_h3() throws Exception {
578 test("h2", "h3");
579 }
580
581
582
583
584 @Test
585 @Alerts("0")
586 public void _h2_h4() throws Exception {
587 test("h2", "h4");
588 }
589
590
591
592
593 @Test
594 @Alerts("0")
595 public void _h2_h5() throws Exception {
596 test("h2", "h5");
597 }
598
599
600
601
602 @Test
603 @Alerts("0")
604 public void _h2_h6() throws Exception {
605 test("h2", "h6");
606 }
607
608
609
610
611 @Test
612 @Alerts("0")
613 public void _h3_h1() throws Exception {
614 test("h3", "h1");
615 }
616
617
618
619
620 @Test
621 @Alerts("0")
622 public void _h3_h2() throws Exception {
623 test("h3", "h2");
624 }
625
626
627
628
629 @Test
630 @Alerts("0")
631 public void _h3_h3() throws Exception {
632 test("h3", "h3");
633 }
634
635
636
637
638 @Test
639 @Alerts("0")
640 public void _h3_h4() throws Exception {
641 test("h3", "h4");
642 }
643
644
645
646
647 @Test
648 @Alerts("0")
649 public void _h3_h5() throws Exception {
650 test("h3", "h5");
651 }
652
653
654
655
656 @Test
657 @Alerts("0")
658 public void _h3_h6() throws Exception {
659 test("h3", "h6");
660 }
661
662
663
664
665 @Test
666 @Alerts("0")
667 public void _h4_h1() throws Exception {
668 test("h4", "h1");
669 }
670
671
672
673
674 @Test
675 @Alerts("0")
676 public void _h4_h2() throws Exception {
677 test("h4", "h2");
678 }
679
680
681
682
683 @Test
684 @Alerts("0")
685 public void _h4_h3() throws Exception {
686 test("h4", "h3");
687 }
688
689
690
691
692 @Test
693 @Alerts("0")
694 public void _h4_h4() throws Exception {
695 test("h4", "h4");
696 }
697
698
699
700
701 @Test
702 @Alerts("0")
703 public void _h4_h5() throws Exception {
704 test("h4", "h5");
705 }
706
707
708
709
710 @Test
711 @Alerts("0")
712 public void _h4_h6() throws Exception {
713 test("h4", "h6");
714 }
715
716
717
718
719 @Test
720 @Alerts("0")
721 public void _h5_h1() throws Exception {
722 test("h5", "h1");
723 }
724
725
726
727
728 @Test
729 @Alerts("0")
730 public void _h5_h2() throws Exception {
731 test("h5", "h2");
732 }
733
734
735
736
737 @Test
738 @Alerts("0")
739 public void _h5_h3() throws Exception {
740 test("h5", "h3");
741 }
742
743
744
745
746 @Test
747 @Alerts("0")
748 public void _h5_h4() throws Exception {
749 test("h5", "h4");
750 }
751
752
753
754
755 @Test
756 @Alerts("0")
757 public void _h5_h5() throws Exception {
758 test("h5", "h5");
759 }
760
761
762
763
764 @Test
765 @Alerts("0")
766 public void _h5_h6() throws Exception {
767 test("h5", "h6");
768 }
769
770
771
772
773 @Test
774 @Alerts("0")
775 public void _h6_h1() throws Exception {
776 test("h6", "h1");
777 }
778
779
780
781
782 @Test
783 @Alerts("0")
784 public void _h6_h2() throws Exception {
785 test("h6", "h2");
786 }
787
788
789
790
791 @Test
792 @Alerts("0")
793 public void _h6_h3() throws Exception {
794 test("h6", "h3");
795 }
796
797
798
799
800 @Test
801 @Alerts("0")
802 public void _h6_h4() throws Exception {
803 test("h6", "h4");
804 }
805
806
807
808
809 @Test
810 @Alerts("0")
811 public void _h6_h5() throws Exception {
812 test("h6", "h5");
813 }
814
815
816
817
818 @Test
819 @Alerts("0")
820 public void _h6_h6() throws Exception {
821 test("h6", "h6");
822 }
823
824
825
826
827 @Test
828 @Alerts("1")
829 public void _head_base() throws Exception {
830 test("head", "base");
831 }
832
833
834
835
836 @Test
837 @Alerts("1")
838 public void _head_basefont() throws Exception {
839 test("head", "basefont");
840 }
841
842
843
844
845 @Test
846 @Alerts("1")
847 public void _head_bgsound() throws Exception {
848 test("head", "bgsound");
849 }
850
851
852
853
854 @Test
855 @Alerts(DEFAULT = "1",
856 FF = "0",
857 FF_ESR = "0")
858 public void _head_command() throws Exception {
859 test("head", "command");
860 }
861
862
863
864
865 @Test
866 @Alerts("1")
867 public void _head_link() throws Exception {
868 test("head", "link");
869 }
870
871
872
873
874 @Test
875 @Alerts("1")
876 public void _head_meta() throws Exception {
877 test("head", "meta");
878 }
879
880
881
882
883 @Test
884 @Alerts("1")
885 public void _head_noframes() throws Exception {
886 test("head", "noframes");
887 }
888
889
890
891
892 @Test
893 @Alerts("1")
894 public void _head_noscript() throws Exception {
895 test("head", "noscript");
896 }
897
898
899
900
901 @Test
902 @Alerts("1")
903 public void _head_script() throws Exception {
904 test("head", "script");
905 }
906
907
908
909
910 @Test
911 @Alerts("1")
912 public void _head_style() throws Exception {
913 test("head", "style");
914 }
915
916
917
918
919 @Test
920 @Alerts("1")
921 public void _head_template() throws Exception {
922 test("head", "template");
923 }
924
925
926
927
928 @Test
929 @Alerts("1")
930 public void _head_title() throws Exception {
931 test("head", "title");
932 }
933
934
935
936
937 @Test
938 @Alerts("2")
939 public void _html_body() throws Exception {
940 test("html", "body");
941 }
942
943
944
945
946 @Test
947 @Alerts("2")
948 public void _html_caption() throws Exception {
949 test("html", "caption");
950 }
951
952
953
954
955 @Test
956 @Alerts("2")
957 public void _html_col() throws Exception {
958 test("html", "col");
959 }
960
961
962
963
964 @Test
965 @Alerts("2")
966 public void _html_colgroup() throws Exception {
967 test("html", "colgroup");
968 }
969
970
971
972
973 @Test
974 @Alerts("2")
975 public void _html_frame() throws Exception {
976 test("html", "frame");
977 }
978
979
980
981
982 @Test
983 @Alerts("2")
984 public void _html_frameset() throws Exception {
985 test("html", "frameset");
986 }
987
988
989
990
991 @Test
992 @Alerts("2")
993 public void _html_head() throws Exception {
994 test("html", "head");
995 }
996
997
998
999
1000 @Test
1001 @Alerts("2")
1002 public void _html_html() throws Exception {
1003 test("html", "html");
1004 }
1005
1006
1007
1008
1009 @Test
1010 @Alerts("2")
1011 public void _html_tbody() throws Exception {
1012 test("html", "tbody");
1013 }
1014
1015
1016
1017
1018 @Test
1019 @Alerts("2")
1020 public void _html_td() throws Exception {
1021 test("html", "td");
1022 }
1023
1024
1025
1026
1027 @Test
1028 @Alerts("2")
1029 public void _html_tfoot() throws Exception {
1030 test("html", "tfoot");
1031 }
1032
1033
1034
1035
1036 @Test
1037 @Alerts("2")
1038 public void _html_th() throws Exception {
1039 test("html", "th");
1040 }
1041
1042
1043
1044
1045 @Test
1046 @Alerts("2")
1047 public void _html_thead() throws Exception {
1048 test("html", "thead");
1049 }
1050
1051
1052
1053
1054 @Test
1055 @Alerts("2")
1056 public void _html_tr() throws Exception {
1057 test("html", "tr");
1058 }
1059
1060
1061
1062
1063 @Test
1064 @Alerts("null")
1065 @HtmlUnitNYI(
1066 CHROME = "0",
1067 EDGE = "0",
1068 FF = "0",
1069 FF_ESR = "0")
1070 public void _isindex_frameset() throws Exception {
1071 test("isindex", "frameset");
1072 }
1073
1074
1075
1076
1077 @Test
1078 @Alerts("1")
1079 public void _isindex_isindex() throws Exception {
1080 test("isindex", "isindex");
1081 }
1082
1083
1084
1085
1086 @Test
1087 @Alerts("0")
1088 public void _li_caption() throws Exception {
1089 test("li", "caption");
1090 }
1091
1092
1093
1094
1095 @Test
1096 @Alerts("0")
1097 public void _li_li() throws Exception {
1098 test("li", "li");
1099 }
1100
1101
1102
1103
1104 @Test
1105 @Alerts("0")
1106 public void _nobr_nobr() throws Exception {
1107 test("nobr", "nobr");
1108 }
1109
1110
1111
1112
1113 @Test
1114 @Alerts("0")
1115 public void _option_optgroup() throws Exception {
1116 test("option", "optgroup");
1117 }
1118
1119
1120
1121
1122 @Test
1123 @Alerts("0")
1124 public void _option_option() throws Exception {
1125 test("option", "option");
1126 }
1127
1128
1129
1130
1131 @Test
1132 @Alerts("0")
1133 public void _p_address() throws Exception {
1134 test("p", "address");
1135 }
1136
1137
1138
1139
1140 @Test
1141 @Alerts("0")
1142 public void _p_article() throws Exception {
1143 test("p", "article");
1144 }
1145
1146
1147
1148
1149 @Test
1150 @Alerts("0")
1151 public void _p_aside() throws Exception {
1152 test("p", "aside");
1153 }
1154
1155
1156
1157
1158 @Test
1159 @Alerts("0")
1160 public void _p_blockquote() throws Exception {
1161 test("p", "blockquote");
1162 }
1163
1164
1165
1166
1167 @Test
1168 @Alerts("0")
1169 public void _p_center() throws Exception {
1170 test("p", "center");
1171 }
1172
1173
1174
1175
1176 @Test
1177 @Alerts("0")
1178 public void _p_dd() throws Exception {
1179 test("p", "dd");
1180 }
1181
1182
1183
1184
1185 @Test
1186 @Alerts("0")
1187 public void _p_details() throws Exception {
1188 test("p", "details");
1189 }
1190
1191
1192
1193
1194 @Test
1195 @Alerts("0")
1196 public void _p_dialog() throws Exception {
1197 test("p", "dialog");
1198 }
1199
1200
1201
1202
1203 @Test
1204 @Alerts("0")
1205 public void _p_dir() throws Exception {
1206 test("p", "dir");
1207 }
1208
1209
1210
1211
1212 @Test
1213 @Alerts("0")
1214 public void _p_div() throws Exception {
1215 test("p", "div");
1216 }
1217
1218
1219
1220
1221 @Test
1222 @Alerts("0")
1223 public void _p_dl() throws Exception {
1224 test("p", "dl");
1225 }
1226
1227
1228
1229
1230 @Test
1231 @Alerts("0")
1232 public void _p_dt() throws Exception {
1233 test("p", "dt");
1234 }
1235
1236
1237
1238
1239 @Test
1240 @Alerts("0")
1241 public void _p_fieldset() throws Exception {
1242 test("p", "fieldset");
1243 }
1244
1245
1246
1247
1248 @Test
1249 @Alerts("0")
1250 public void _p_figcaption() throws Exception {
1251 test("p", "figcaption");
1252 }
1253
1254
1255
1256
1257 @Test
1258 @Alerts("0")
1259 public void _p_figure() throws Exception {
1260 test("p", "figure");
1261 }
1262
1263
1264
1265
1266 @Test
1267 @Alerts("0")
1268 public void _p_footer() throws Exception {
1269 test("p", "footer");
1270 }
1271
1272
1273
1274
1275 @Test
1276 @Alerts("0")
1277 public void _p_form() throws Exception {
1278 test("p", "form");
1279 }
1280
1281
1282
1283
1284 @Test
1285 @Alerts("0")
1286 public void _p_h1() throws Exception {
1287 test("p", "h1");
1288 }
1289
1290
1291
1292
1293 @Test
1294 @Alerts("0")
1295 public void _p_h2() throws Exception {
1296 test("p", "h2");
1297 }
1298
1299
1300
1301
1302 @Test
1303 @Alerts("0")
1304 public void _p_h3() throws Exception {
1305 test("p", "h3");
1306 }
1307
1308
1309
1310
1311 @Test
1312 @Alerts("0")
1313 public void _p_h4() throws Exception {
1314 test("p", "h4");
1315 }
1316
1317
1318
1319
1320 @Test
1321 @Alerts("0")
1322 public void _p_h5() throws Exception {
1323 test("p", "h5");
1324 }
1325
1326
1327
1328
1329 @Test
1330 @Alerts("0")
1331 public void _p_h6() throws Exception {
1332 test("p", "h6");
1333 }
1334
1335
1336
1337
1338 @Test
1339 @Alerts("0")
1340 public void _p_header() throws Exception {
1341 test("p", "header");
1342 }
1343
1344
1345
1346
1347 @Test
1348 @Alerts("0")
1349 public void _p_hr() throws Exception {
1350 test("p", "hr");
1351 }
1352
1353
1354
1355
1356 @Test
1357 @Alerts("1")
1358 public void _p_isindex() throws Exception {
1359 test("p", "isindex");
1360 }
1361
1362
1363
1364
1365 @Test
1366 @Alerts("0")
1367 public void _p_li() throws Exception {
1368 test("p", "li");
1369 }
1370
1371
1372
1373
1374 @Test
1375 @Alerts("0")
1376 public void _p_listing() throws Exception {
1377 test("p", "listing");
1378 }
1379
1380
1381
1382
1383 @Test
1384 @Alerts("0")
1385 public void _p_main() throws Exception {
1386 test("p", "main");
1387 }
1388
1389
1390
1391
1392 @Test
1393 @Alerts("0")
1394 public void _p_menu() throws Exception {
1395 test("p", "menu");
1396 }
1397
1398
1399
1400
1401 @Test
1402 @Alerts("0")
1403 public void _p_nav() throws Exception {
1404 test("p", "nav");
1405 }
1406
1407
1408
1409
1410 @Test
1411 @Alerts("0")
1412 public void _p_ol() throws Exception {
1413 test("p", "ol");
1414 }
1415
1416
1417
1418
1419 @Test
1420 @Alerts("0")
1421 public void _p_p() throws Exception {
1422 test("p", "p");
1423 }
1424
1425
1426
1427
1428 @Test
1429 @Alerts("0")
1430 public void _p_plaintext() throws Exception {
1431 test("p", "plaintext");
1432 }
1433
1434
1435
1436
1437 @Test
1438 @Alerts("0")
1439 public void _p_pre() throws Exception {
1440 test("p", "pre");
1441 }
1442
1443
1444
1445
1446 @Test
1447 @Alerts("0")
1448 public void _p_section() throws Exception {
1449 test("p", "section");
1450 }
1451
1452
1453
1454
1455 @Test
1456 @Alerts("0")
1457 public void _p_summary() throws Exception {
1458 test("p", "summary");
1459 }
1460
1461
1462
1463
1464 @Test
1465 @Alerts("0")
1466 public void _p_ul() throws Exception {
1467 test("p", "ul");
1468 }
1469
1470
1471
1472
1473 @Test
1474 @Alerts("0")
1475 public void _p_xmp() throws Exception {
1476 test("p", "xmp");
1477 }
1478
1479
1480
1481
1482 @Test
1483 @Alerts("1")
1484 public void _ruby_blink() throws Exception {
1485 test("ruby", "blink");
1486 }
1487
1488
1489
1490
1491 @Test
1492 @Alerts(DEFAULT = "1",
1493 FF = "0",
1494 FF_ESR = "0")
1495 @HtmlUnitNYI(FF = "1",
1496 FF_ESR = "1")
1497 public void _select_hr() throws Exception {
1498 test("select", "hr");
1499 }
1500
1501
1502
1503
1504 @Test
1505 @Alerts("1")
1506 public void _select_optgroup() throws Exception {
1507 test("select", "optgroup");
1508 }
1509
1510
1511
1512
1513 @Test
1514 @Alerts("1")
1515 public void _select_option() throws Exception {
1516 test("select", "option");
1517 }
1518
1519
1520
1521
1522 @Test
1523 @Alerts("1")
1524 public void _select_script() throws Exception {
1525 test("select", "script");
1526 }
1527
1528
1529
1530
1531 @Test
1532 @Alerts("1")
1533 public void _select_template() throws Exception {
1534 test("select", "template");
1535 }
1536
1537
1538
1539
1540 @Test
1541 @Alerts("1")
1542 public void _table_caption() throws Exception {
1543 test("table", "caption");
1544 }
1545
1546
1547
1548
1549 @Test
1550 @Alerts("1")
1551 public void _table_col() throws Exception {
1552 test("table", "col");
1553 }
1554
1555
1556
1557
1558 @Test
1559 @Alerts("1")
1560 public void _table_colgroup() throws Exception {
1561 test("table", "colgroup");
1562 }
1563
1564
1565
1566
1567 @Test
1568 @Alerts("1")
1569 public void _table_form() throws Exception {
1570 test("table", "form");
1571 }
1572
1573
1574
1575
1576 @Test
1577 @Alerts("1")
1578 public void _table_script() throws Exception {
1579 test("table", "script");
1580 }
1581
1582
1583
1584
1585 @Test
1586 @Alerts("1")
1587 public void _table_style() throws Exception {
1588 test("table", "style");
1589 }
1590
1591
1592
1593
1594 @Test
1595 @Alerts("1")
1596 public void _table_tbody() throws Exception {
1597 test("table", "tbody");
1598 }
1599
1600
1601
1602
1603 @Test
1604 @Alerts("1")
1605 public void _table_td() throws Exception {
1606 test("table", "td");
1607 }
1608
1609
1610
1611
1612 @Test
1613 @Alerts("1")
1614 public void _table_template() throws Exception {
1615 test("table", "template");
1616 }
1617
1618
1619
1620
1621 @Test
1622 @Alerts("1")
1623 public void _table_tfoot() throws Exception {
1624 test("table", "tfoot");
1625 }
1626
1627
1628
1629
1630 @Test
1631 @Alerts("1")
1632 public void _table_th() throws Exception {
1633 test("table", "th");
1634 }
1635
1636
1637
1638
1639 @Test
1640 @Alerts("1")
1641 public void _table_thead() throws Exception {
1642 test("table", "thead");
1643 }
1644
1645
1646
1647
1648 @Test
1649 @Alerts("1")
1650 public void _table_tr() throws Exception {
1651 test("table", "tr");
1652 }
1653
1654
1655
1656
1657 @Test
1658 @Alerts("1")
1659 public void _tbody_form() throws Exception {
1660 test("tbody", "form");
1661 }
1662
1663
1664
1665
1666 @Test
1667 @Alerts("1")
1668 public void _tbody_script() throws Exception {
1669 test("tbody", "script");
1670 }
1671
1672
1673
1674
1675 @Test
1676 @Alerts("1")
1677 public void _tbody_style() throws Exception {
1678 test("tbody", "style");
1679 }
1680
1681
1682
1683
1684 @Test
1685 @Alerts("1")
1686 public void _tbody_td() throws Exception {
1687 test("tbody", "td");
1688 }
1689
1690
1691
1692
1693 @Test
1694 @Alerts("1")
1695 public void _tbody_template() throws Exception {
1696 test("tbody", "template");
1697 }
1698
1699
1700
1701
1702 @Test
1703 @Alerts("1")
1704 public void _tbody_th() throws Exception {
1705 test("tbody", "th");
1706 }
1707
1708
1709
1710
1711 @Test
1712 @Alerts("1")
1713 public void _tbody_tr() throws Exception {
1714 test("tbody", "tr");
1715 }
1716
1717
1718
1719
1720 @Test
1721 @Alerts("1")
1722 public void _tfoot_form() throws Exception {
1723 test("tfoot", "form");
1724 }
1725
1726
1727
1728
1729 @Test
1730 @Alerts("1")
1731 public void _tfoot_script() throws Exception {
1732 test("tfoot", "script");
1733 }
1734
1735
1736
1737
1738 @Test
1739 @Alerts("1")
1740 public void _tfoot_style() throws Exception {
1741 test("tfoot", "style");
1742 }
1743
1744
1745
1746
1747 @Test
1748 @Alerts("1")
1749 public void _tfoot_td() throws Exception {
1750 test("tfoot", "td");
1751 }
1752
1753
1754
1755
1756 @Test
1757 @Alerts("1")
1758 public void _tfoot_template() throws Exception {
1759 test("tfoot", "template");
1760 }
1761
1762
1763
1764
1765 @Test
1766 @Alerts("1")
1767 public void _tfoot_th() throws Exception {
1768 test("tfoot", "th");
1769 }
1770
1771
1772
1773
1774 @Test
1775 @Alerts("1")
1776 public void _tfoot_tr() throws Exception {
1777 test("tfoot", "tr");
1778 }
1779
1780
1781
1782
1783 @Test
1784 @Alerts("1")
1785 public void _thead_form() throws Exception {
1786 test("thead", "form");
1787 }
1788
1789
1790
1791
1792 @Test
1793 @Alerts("1")
1794 public void _thead_script() throws Exception {
1795 test("thead", "script");
1796 }
1797
1798
1799
1800
1801 @Test
1802 @Alerts("1")
1803 public void _thead_style() throws Exception {
1804 test("thead", "style");
1805 }
1806
1807
1808
1809
1810 @Test
1811 @Alerts("1")
1812 public void _thead_td() throws Exception {
1813 test("thead", "td");
1814 }
1815
1816
1817
1818
1819 @Test
1820 @Alerts("1")
1821 public void _thead_template() throws Exception {
1822 test("thead", "template");
1823 }
1824
1825
1826
1827
1828 @Test
1829 @Alerts("1")
1830 public void _thead_th() throws Exception {
1831 test("thead", "th");
1832 }
1833
1834
1835
1836
1837 @Test
1838 @Alerts("1")
1839 public void _thead_tr() throws Exception {
1840 test("thead", "tr");
1841 }
1842
1843
1844
1845
1846 @Test
1847 @Alerts("1")
1848 public void _tr_form() throws Exception {
1849 test("tr", "form");
1850 }
1851
1852
1853
1854
1855 @Test
1856 @Alerts("1")
1857 public void _tr_script() throws Exception {
1858 test("tr", "script");
1859 }
1860
1861
1862
1863
1864 @Test
1865 @Alerts("1")
1866 public void _tr_style() throws Exception {
1867 test("tr", "style");
1868 }
1869
1870
1871
1872
1873 @Test
1874 @Alerts("1")
1875 public void _tr_td() throws Exception {
1876 test("tr", "td");
1877 }
1878
1879
1880
1881
1882 @Test
1883 @Alerts("1")
1884 public void _tr_template() throws Exception {
1885 test("tr", "template");
1886 }
1887
1888
1889
1890
1891 @Test
1892 @Alerts("1")
1893 public void _tr_th() throws Exception {
1894 test("tr", "th");
1895 }
1896
1897
1898
1899
1900 @Test
1901 @Alerts("0")
1902 public void _template_caption() throws Exception {
1903 test("template", "tr");
1904 }
1905
1906
1907
1908
1909 @Test
1910 @Alerts("0")
1911 public void _template_col() throws Exception {
1912 test("template", "col");
1913 }
1914
1915
1916
1917
1918 @Test
1919 @Alerts("0")
1920 public void _template_colgroup() throws Exception {
1921 test("template", "colgroup");
1922 }
1923
1924
1925
1926
1927 @Test
1928 @Alerts("0")
1929 public void _template_frame() throws Exception {
1930 test("template", "frame");
1931 }
1932
1933
1934
1935
1936 @Test
1937 @Alerts("0")
1938 public void _template_tbody() throws Exception {
1939 test("template", "tbody");
1940 }
1941
1942
1943
1944
1945 @Test
1946 @Alerts("0")
1947 public void _template_td() throws Exception {
1948 test("template", "td");
1949 }
1950
1951
1952
1953
1954 @Test
1955 @Alerts("0")
1956 public void _template_tfoot() throws Exception {
1957 test("template", "tfoot");
1958 }
1959
1960
1961
1962
1963 @Test
1964 @Alerts("0")
1965 public void _template_th() throws Exception {
1966 test("template", "th");
1967 }
1968
1969
1970
1971
1972 @Test
1973 @Alerts("0")
1974 public void _template_thead() throws Exception {
1975 test("template", "thead");
1976 }
1977
1978
1979
1980
1981 @Test
1982 @Alerts("0")
1983 public void _template_tr() throws Exception {
1984 test("template", "tr");
1985 }
1986 }