1 /*
2 * Copyright (c) 2002-2025 Gargoyle Software Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * https://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15 package org.htmlunit.general;
16
17 import org.htmlunit.WebDriverTestCase;
18 import org.htmlunit.junit.annotation.Alerts;
19 import org.junit.jupiter.api.Test;
20
21 /**
22 * Unit tests for an element to close itself, which is defined in
23 * {@link org.htmlunit.cyberneko.HTMLElements}.
24 *
25 * @author Ahmed Ashour
26 * @author Frank Danek
27 * @author Ronald Brill
28 */
29 public class ElementClosesItselfTest extends WebDriverTestCase {
30
31 private void test(final String tagName) throws Exception {
32 if ("basefont".equals(tagName) || "isindex".equals(tagName)) {
33 loadPage2(headElementClosesItself(tagName));
34 verifyWindowName2(getWebDriver(), getExpectedAlerts());
35 return;
36 }
37
38 if ("title".equals(tagName)) {
39 // title is a bit special, we have to provide at least
40 // one closing tab otherwise title spans to the end of the file
41 loadPage2(DOCTYPE_HTML + "<html><head>\n"
42 + "<script>\n"
43 + LOG_WINDOW_NAME_FUNCTION
44 + "function test() {\n"
45 + " var e = document.getElementById('outer');\n"
46 + " log(e == null ? e : e.children.length);\n"
47 + "}\n"
48 + "</script>\n"
49 + "<title id='outer'><title></title>\n"
50 + "</head><body onload='test()'>\n"
51 + "</body></html>");
52 verifyWindowName2(getWebDriver(), getExpectedAlerts());
53 return;
54 }
55
56 if ("frame".equals(tagName)) {
57 loadPageVerifyTitle2(DOCTYPE_HTML + "<html><head>\n"
58 + "<script>\n"
59 + LOG_TITLE_FUNCTION
60 + "function test() {\n"
61 + " var e = document.getElementById('outer');\n"
62 + " log(e == null ? e : e.childNodes.length);\n"
63 + "}\n"
64 + "</script>\n"
65 + "</head>\n"
66 + "<frameset onload='test()'>\n"
67 + "<frame id='outer'><frame>\n"
68 + "</frameset></html>");
69 return;
70 }
71
72 if ("script".equals(tagName)) {
73 loadPageVerifyTitle2(DOCTYPE_HTML
74 + "<html><head>\n"
75 + "<script>\n"
76 + LOG_TITLE_FUNCTION
77 + "function test() {\n"
78 + " var e = document.getElementById('outer');\n"
79 + " log(e == null ? e : e.children.length);\n"
80 + "}\n"
81 + "</script>\n"
82 + "</head><body onload='test()'>\n"
83 + "<script id='outer'>//<script>\n"
84 + "</script>\n"
85 + "</body></html>");
86 return;
87 }
88
89 if ("frameset".equals(tagName)) {
90 loadPage2(DOCTYPE_HTML
91 + "<html><head>\n"
92 + "<script>\n"
93 + LOG_WINDOW_NAME_FUNCTION
94 + "function test() {\n"
95 + " var e = document.getElementById('outer');\n"
96 + " log(e == null ? e : e.children.length);\n"
97 + "}\n"
98 + "</script>\n"
99 + "</head>\n"
100 + "<frameset onload='test()' id='outer'>\n"
101 + "<frameset>\n"
102 + "</frameset></html>");
103 verifyWindowName2(getWebDriver(), getExpectedAlerts());
104 return;
105 }
106
107 loadPageVerifyTitle2(DOCTYPE_HTML
108 + "<html><head>\n"
109 + "<script>\n"
110 + LOG_TITLE_FUNCTION
111 + "function test() {\n"
112 + " var e = document.getElementById('outer');\n"
113 + " try {\n"
114 + " log(e == null ? e : e.children.length);\n"
115 + " } catch(e) { logEx(e); }"
116 + "}\n"
117 + "</script>\n"
118 + "</head><body onload='test()'>\n"
119 + "<" + tagName + " id='outer'><" + tagName + ">\n"
120 + "</body></html>");
121 }
122
123 private static String headElementClosesItself(final String tagName) {
124 return DOCTYPE_HTML
125 + "<html><head>\n"
126 + "<" + tagName + " id='outer'><" + tagName + ">\n"
127 + "<script>\n"
128 + LOG_WINDOW_NAME_FUNCTION
129 + "function test() {\n"
130 + " var e = document.getElementById('outer');\n"
131 + " log(e == null ? e : e.children.length);\n"
132 + "}\n"
133 + "</script>\n"
134 + "</head><body onload='test()'>\n"
135 + "</body></html>";
136 }
137
138 /**
139 * Test {@link org.htmlunit.html.HtmlAbbreviated}.
140 *
141 * @throws Exception if the test fails
142 */
143 @Test
144 @Alerts("1")
145 public void abbr() throws Exception {
146 test("abbr");
147 }
148
149 /**
150 * Test {@link org.htmlunit.html.HtmlAcronym}.
151 *
152 * @throws Exception if the test fails
153 */
154 @Test
155 @Alerts("1")
156 public void acronym() throws Exception {
157 test("acronym");
158 }
159
160 /**
161 * Test {@link org.htmlunit.html.HtmlAnchor}.
162 *
163 * @throws Exception if the test fails
164 */
165 @Test
166 @Alerts("0")
167 public void a() throws Exception {
168 test("a");
169 }
170
171 /**
172 * Test {@link org.htmlunit.html.HtmlAddress}.
173 *
174 * @throws Exception if the test fails
175 */
176 @Test
177 @Alerts("1")
178 public void address() throws Exception {
179 test("address");
180 }
181
182 /**
183 * Test {@link org.htmlunit.html.HtmlApplet}.
184 *
185 * @throws Exception if the test fails
186 */
187 @Test
188 @Alerts("1")
189 public void applet() throws Exception {
190 test("applet");
191 }
192
193 /**
194 * Test {@link org.htmlunit.html.HtmlArea}.
195 *
196 * @throws Exception if the test fails
197 */
198 @Test
199 @Alerts("0")
200 public void area() throws Exception {
201 test("area");
202 }
203
204 /**
205 * Test {@link org.htmlunit.html.HtmlArticle}.
206 *
207 * @throws Exception if the test fails
208 */
209 @Test
210 @Alerts("1")
211 public void article() throws Exception {
212 test("article");
213 }
214
215 /**
216 * Test {@link org.htmlunit.html.HtmlAside}.
217 *
218 * @throws Exception if the test fails
219 */
220 @Test
221 @Alerts("1")
222 public void aside() throws Exception {
223 test("aside");
224 }
225
226 /**
227 * Test {@link org.htmlunit.html.HtmlAudio}.
228 *
229 * @throws Exception if the test fails
230 */
231 @Test
232 @Alerts("1")
233 public void audio() throws Exception {
234 test("audio");
235 }
236
237 /**
238 * Test {@link org.htmlunit.html.HtmlBackgroundSound}.
239 *
240 * @throws Exception if the test fails
241 */
242 @Test
243 @Alerts("0")
244 public void bgsound() throws Exception {
245 test("bgsound");
246 }
247
248 /**
249 * Test {@link org.htmlunit.html.HtmlBase}.
250 *
251 * @throws Exception if the test fails
252 */
253 @Test
254 @Alerts("0")
255 public void base() throws Exception {
256 test("base");
257 }
258
259 /**
260 * Test {@link org.htmlunit.html.HtmlBaseFont}.
261 *
262 * @throws Exception if the test fails
263 */
264 @Test
265 @Alerts("0")
266 public void basefont() throws Exception {
267 test("basefont");
268 }
269
270 /**
271 * Test {@link org.htmlunit.html.HtmlBidirectionalIsolation}.
272 *
273 * @throws Exception if the test fails
274 */
275 @Test
276 @Alerts("1")
277 public void bdi() throws Exception {
278 test("bdi");
279 }
280
281 /**
282 * Test {@link org.htmlunit.html.HtmlBidirectionalOverride}.
283 *
284 * @throws Exception if the test fails
285 */
286 @Test
287 @Alerts("1")
288 public void bdo() throws Exception {
289 test("bdo");
290 }
291
292 /**
293 * Test {@link org.htmlunit.html.HtmlBig}.
294 *
295 * @throws Exception if the test fails
296 */
297 @Test
298 @Alerts("1")
299 public void big() throws Exception {
300 test("big");
301 }
302
303 /**
304 * Test {@link org.htmlunit.html.HtmlBlink}.
305 *
306 * @throws Exception if the test fails
307 */
308 @Test
309 @Alerts("1")
310 public void blink() throws Exception {
311 test("blink");
312 }
313
314 /**
315 * Test {@link org.htmlunit.html.HtmlBlockQuote}.
316 *
317 * @throws Exception if the test fails
318 */
319 @Test
320 @Alerts("1")
321 public void blockquote() throws Exception {
322 test("blockquote");
323 }
324
325 /**
326 * Test {@link org.htmlunit.html.HtmlBody}.
327 *
328 * @throws Exception if the test fails
329 */
330 @Test
331 @Alerts("0")
332 public void body() throws Exception {
333 test("body");
334 }
335
336 /**
337 * Test {@link org.htmlunit.html.HtmlBold}.
338 *
339 * @throws Exception if the test fails
340 */
341 @Test
342 @Alerts("1")
343 public void b() throws Exception {
344 test("b");
345 }
346
347 /**
348 * Test {@link org.htmlunit.html.HtmlBreak}.
349 *
350 * @throws Exception if the test fails
351 */
352 @Test
353 @Alerts("0")
354 public void br() throws Exception {
355 test("br");
356 }
357
358 /**
359 * Test {@link org.htmlunit.html.HtmlButton}.
360 *
361 * @throws Exception if the test fails
362 */
363 @Test
364 @Alerts("0")
365 public void button() throws Exception {
366 test("button");
367 }
368
369 /**
370 * Test {@link org.htmlunit.html.HtmlCanvas}.
371 *
372 * @throws Exception if the test fails
373 */
374 @Test
375 @Alerts("1")
376 public void canvas() throws Exception {
377 test("canvas");
378 }
379
380 /**
381 * Test {@link org.htmlunit.html.HtmlCaption}.
382 *
383 * @throws Exception if the test fails
384 */
385 @Test
386 @Alerts("null")
387 public void caption() throws Exception {
388 test("caption");
389 }
390
391 /**
392 * Test {@link org.htmlunit.html.HtmlCenter}.
393 *
394 * @throws Exception if the test fails
395 */
396 @Test
397 @Alerts("1")
398 public void center() throws Exception {
399 test("center");
400 }
401
402 /**
403 * Test {@link org.htmlunit.html.HtmlCitation}.
404 *
405 * @throws Exception if the test fails
406 */
407 @Test
408 @Alerts("1")
409 public void cite() throws Exception {
410 test("cite");
411 }
412
413 /**
414 * Test {@link org.htmlunit.html.HtmlCode}.
415 *
416 * @throws Exception if the test fails
417 */
418 @Test
419 @Alerts("1")
420 public void code() throws Exception {
421 test("code");
422 }
423
424 /**
425 * Test {@link org.htmlunit.html.HtmlCommand}.
426 *
427 * @throws Exception if the test fails
428 */
429 @Test
430 @Alerts(DEFAULT = "0",
431 FF = "1",
432 FF_ESR = "1")
433 public void command() throws Exception {
434 test("command");
435 }
436
437 /**
438 * Test {@link org.htmlunit.html.HtmlDataList}.
439 *
440 * @throws Exception if the test fails
441 */
442 @Test
443 @Alerts("1")
444 public void datalist() throws Exception {
445 test("datalist");
446 }
447
448 /**
449 * Test {@link org.htmlunit.html.HtmlDetails}.
450 *
451 * @throws Exception if the test fails
452 */
453 @Test
454 @Alerts("1")
455 public void details() throws Exception {
456 test("details");
457 }
458
459 /**
460 * Test {@link org.htmlunit.html.HtmlDefinition}.
461 *
462 * @throws Exception if the test fails
463 */
464 @Test
465 @Alerts("1")
466 public void dfn() throws Exception {
467 test("dfn");
468 }
469
470 /**
471 * Test {@link org.htmlunit.html.HtmlDefinitionDescription}.
472 *
473 * @throws Exception if the test fails
474 */
475 @Test
476 @Alerts("0")
477 public void dd() throws Exception {
478 test("dd");
479 }
480
481 /**
482 * Test {@link org.htmlunit.html.HtmlDeletedText}.
483 *
484 * @throws Exception if the test fails
485 */
486 @Test
487 @Alerts("1")
488 public void del() throws Exception {
489 test("del");
490 }
491
492 /**
493 * Test {@link org.htmlunit.html.HtmlDialog}.
494 *
495 * @throws Exception if the test fails
496 */
497 @Test
498 @Alerts("1")
499 public void dialog() throws Exception {
500 test("dialog");
501 }
502
503 /**
504 * Test {@link org.htmlunit.html.HtmlDirectory}.
505 *
506 * @throws Exception if the test fails
507 */
508 @Test
509 @Alerts("1")
510 public void dir() throws Exception {
511 test("dir");
512 }
513
514 /**
515 * Test {@link org.htmlunit.html.HtmlDivision}.
516 *
517 * @throws Exception if the test fails
518 */
519 @Test
520 @Alerts("1")
521 public void div() throws Exception {
522 test("div");
523 }
524
525 /**
526 * Test {@link org.htmlunit.html.HtmlDefinitionList}.
527 *
528 * @throws Exception if the test fails
529 */
530 @Test
531 @Alerts("1")
532 public void dl() throws Exception {
533 test("dl");
534 }
535
536 /**
537 * Test {@link org.htmlunit.html.HtmlDefinitionTerm}.
538 *
539 * @throws Exception if the test fails
540 */
541 @Test
542 @Alerts("0")
543 public void dt() throws Exception {
544 test("dt");
545 }
546
547 /**
548 * Test {@link org.htmlunit.html.HtmlEmbed}.
549 *
550 * @throws Exception if the test fails
551 */
552 @Test
553 @Alerts("0")
554 public void embed() throws Exception {
555 test("embed");
556 }
557
558 /**
559 * Test {@link org.htmlunit.html.HtmlEmphasis}.
560 *
561 * @throws Exception if the test fails
562 */
563 @Test
564 @Alerts("1")
565 public void em() throws Exception {
566 test("em");
567 }
568
569 /**
570 * Test {@link org.htmlunit.html.HtmlFieldSet}.
571 *
572 * @throws Exception if the test fails
573 */
574 @Test
575 @Alerts("1")
576 public void fieldset() throws Exception {
577 test("fieldset");
578 }
579
580 /**
581 * Test {@link org.htmlunit.html.HtmlFigureCaption}.
582 *
583 * @throws Exception if the test fails
584 */
585 @Test
586 @Alerts("1")
587 public void figcaption() throws Exception {
588 test("figcaption");
589 }
590
591 /**
592 * Test {@link org.htmlunit.html.HtmlFigure}.
593 *
594 * @throws Exception if the test fails
595 */
596 @Test
597 @Alerts("1")
598 public void figure() throws Exception {
599 test("figure");
600 }
601
602 /**
603 * Test {@link org.htmlunit.html.HtmlFont}.
604 *
605 * @throws Exception if the test fails
606 */
607 @Test
608 @Alerts("1")
609 public void font() throws Exception {
610 test("font");
611 }
612
613 /**
614 * Test {@link org.htmlunit.html.HtmlFooter}.
615 *
616 * @throws Exception if the test fails
617 */
618 @Test
619 @Alerts("1")
620 public void footer() throws Exception {
621 test("footer");
622 }
623
624 /**
625 * Test {@link org.htmlunit.html.HtmlForm}.
626 *
627 * @throws Exception if the test fails
628 */
629 @Test
630 @Alerts("0")
631 public void form() throws Exception {
632 test("form");
633 }
634
635 /**
636 * Test {@link org.htmlunit.html.HtmlFrame}.
637 *
638 * @throws Exception if the test fails
639 */
640 @Test
641 @Alerts("0")
642 public void frame() throws Exception {
643 test("frame");
644 }
645
646 /**
647 * Test {@link org.htmlunit.html.HtmlFrameSet}.
648 *
649 * @throws Exception if the test fails
650 */
651 @Test
652 @Alerts("1")
653 public void frameset() throws Exception {
654 test("frameset");
655 }
656
657 /**
658 * Test {@link org.htmlunit.html.HtmlHeading1}.
659 *
660 * @throws Exception if the test fails
661 */
662 @Test
663 @Alerts("0")
664 public void h1() throws Exception {
665 test("h1");
666 }
667
668 /**
669 * Test {@link org.htmlunit.html.HtmlHeading2}.
670 *
671 * @throws Exception if the test fails
672 */
673 @Test
674 @Alerts("0")
675 public void h2() throws Exception {
676 test("h2");
677 }
678
679 /**
680 * Test {@link org.htmlunit.html.HtmlHeading3}.
681 *
682 * @throws Exception if the test fails
683 */
684 @Test
685 @Alerts("0")
686 public void h3() throws Exception {
687 test("h3");
688 }
689
690 /**
691 * Test {@link org.htmlunit.html.HtmlHeading4}.
692 *
693 * @throws Exception if the test fails
694 */
695 @Test
696 @Alerts("0")
697 public void h4() throws Exception {
698 test("h4");
699 }
700
701 /**
702 * Test {@link org.htmlunit.html.HtmlHeading5}.
703 *
704 * @throws Exception if the test fails
705 */
706 @Test
707 @Alerts("0")
708 public void h5() throws Exception {
709 test("h5");
710 }
711
712 /**
713 * Test {@link org.htmlunit.html.HtmlHeading6}.
714 *
715 * @throws Exception if the test fails
716 */
717 @Test
718 @Alerts("0")
719 public void h6() throws Exception {
720 test("h6");
721 }
722
723 /**
724 * Test {@link org.htmlunit.html.HtmlHead}.
725 *
726 * @throws Exception if the test fails
727 */
728 @Test
729 @Alerts("null")
730 public void head() throws Exception {
731 test("head");
732 }
733
734 /**
735 * Test {@link org.htmlunit.html.HtmlHeader}.
736 *
737 * @throws Exception if the test fails
738 */
739 @Test
740 @Alerts("1")
741 public void header() throws Exception {
742 test("header");
743 }
744
745 /**
746 * Test {@link org.htmlunit.html.HtmlHorizontalRule}.
747 *
748 * @throws Exception if the test fails
749 */
750 @Test
751 @Alerts("0")
752 public void hr() throws Exception {
753 test("hr");
754 }
755
756 /**
757 * Test {@link org.htmlunit.html.HtmlHtml}.
758 *
759 * @throws Exception if the test fails
760 */
761 @Test
762 @Alerts("2")
763 public void html() throws Exception {
764 test("html");
765 }
766
767 /**
768 * Test {@link org.htmlunit.html.HtmlInlineFrame}.
769 *
770 * @throws Exception if the test fails
771 */
772 @Test
773 @Alerts("0")
774 public void iframe() throws Exception {
775 test("iframe");
776 }
777
778 /**
779 * Test {@link org.htmlunit.html.HtmlInlineQuotation}.
780 *
781 * @throws Exception if the test fails
782 */
783 @Test
784 @Alerts("1")
785 public void q() throws Exception {
786 test("q");
787 }
788
789 /**
790 * Test {@link org.htmlunit.html.HtmlImage}.
791 *
792 * @throws Exception if the test fails
793 */
794 @Test
795 @Alerts("0")
796 public void image() throws Exception {
797 test("image");
798 }
799
800 /**
801 * Test {@link org.htmlunit.html.HtmlImage}.
802 *
803 * @throws Exception if the test fails
804 */
805 @Test
806 @Alerts("0")
807 public void img() throws Exception {
808 test("img");
809 }
810
811 /**
812 * Test {@link org.htmlunit.html.HtmlInsertedText}.
813 *
814 * @throws Exception if the test fails
815 */
816 @Test
817 @Alerts("1")
818 public void ins() throws Exception {
819 test("ins");
820 }
821
822 /**
823 * Test {@link org.htmlunit.html.HtmlIsIndex}.
824 *
825 * @throws Exception if the test fails
826 */
827 @Test
828 @Alerts("1")
829 public void isindex() throws Exception {
830 test("isindex");
831 }
832
833 /**
834 * Test {@link org.htmlunit.html.HtmlItalic}.
835 *
836 * @throws Exception if the test fails
837 */
838 @Test
839 @Alerts("1")
840 public void i() throws Exception {
841 test("i");
842 }
843
844 /**
845 * Test {@link org.htmlunit.html.HtmlKeyboard}.
846 *
847 * @throws Exception if the test fails
848 */
849 @Test
850 @Alerts("1")
851 public void kbd() throws Exception {
852 test("kbd");
853 }
854
855 /**
856 * @throws Exception if the test fails
857 */
858 @Test
859 @Alerts("0")
860 public void keygen() throws Exception {
861 test("keygen");
862 }
863
864 /**
865 * Test {@link org.htmlunit.html.HtmlLabel}.
866 *
867 * @throws Exception if the test fails
868 */
869 @Test
870 @Alerts("1")
871 public void label() throws Exception {
872 test("label");
873 }
874
875 /**
876 * Test {@link org.htmlunit.html.HtmlLayer}.
877 *
878 * @throws Exception if the test fails
879 */
880 @Test
881 @Alerts("1")
882 public void layer() throws Exception {
883 test("layer");
884 }
885
886 /**
887 * Test {@link org.htmlunit.html.HtmlLegend}.
888 *
889 * @throws Exception if the test fails
890 */
891 @Test
892 @Alerts("1")
893 public void legend() throws Exception {
894 test("legend");
895 }
896
897 /**
898 * Test {@link org.htmlunit.html.HtmlListing}.
899 *
900 * @throws Exception if the test fails
901 */
902 @Test
903 @Alerts("1")
904 public void listing() throws Exception {
905 test("listing");
906 }
907
908 /**
909 * Test {@link org.htmlunit.html.HtmlListItem}.
910 *
911 * @throws Exception if the test fails
912 */
913 @Test
914 @Alerts("0")
915 public void li() throws Exception {
916 test("li");
917 }
918
919 /**
920 * Test {@link org.htmlunit.html.HtmlLink}.
921 *
922 * @throws Exception if the test fails
923 */
924 @Test
925 @Alerts("0")
926 public void link() throws Exception {
927 test("link");
928 }
929
930 /**
931 * Test {@link org.htmlunit.html.HtmlMain}.
932 *
933 * @throws Exception if the test fails
934 */
935 @Test
936 @Alerts("1")
937 public void main() throws Exception {
938 test("main");
939 }
940
941 /**
942 * Test {@link org.htmlunit.html.HtmlMap}.
943 *
944 * @throws Exception if the test fails
945 */
946 @Test
947 @Alerts("1")
948 public void map() throws Exception {
949 test("map");
950 }
951
952 /**
953 * Test {@link org.htmlunit.html.HtmlMarquee}.
954 *
955 * @throws Exception if the test fails
956 */
957 @Test
958 @Alerts("1")
959 public void marquee() throws Exception {
960 test("marquee");
961 }
962
963 /**
964 * Test {@link org.htmlunit.html.HtmlMark}.
965 *
966 * @throws Exception if the test fails
967 */
968 @Test
969 @Alerts("1")
970 public void mark() throws Exception {
971 test("mark");
972 }
973
974 /**
975 * Test {@link org.htmlunit.html.HtmlMenu}.
976 *
977 * @throws Exception if the test fails
978 */
979 @Test
980 @Alerts("1")
981 public void menu() throws Exception {
982 test("menu");
983 }
984
985 /**
986 * Test {@link org.htmlunit.html.HtmlMenuItem}.
987 *
988 * @throws Exception if the test fails
989 */
990 @Test
991 @Alerts("1")
992 public void menuitem() throws Exception {
993 test("menuitem");
994 }
995
996 /**
997 * Test {@link org.htmlunit.html.HtmlMeta}.
998 *
999 * @throws Exception if the test fails
1000 */
1001 @Test
1002 @Alerts("0")
1003 public void meta() throws Exception {
1004 test("meta");
1005 }
1006
1007 /**
1008 * Test {@link org.htmlunit.html.HtmlMeter}.
1009 *
1010 * @throws Exception if the test fails
1011 */
1012 @Test
1013 @Alerts("1")
1014 public void meter() throws Exception {
1015 test("meter");
1016 }
1017
1018 /**
1019 * Test {@link org.htmlunit.html.HtmlMultiColumn}.
1020 *
1021 * @throws Exception if the test fails
1022 */
1023 @Test
1024 @Alerts("1")
1025 public void multicol() throws Exception {
1026 test("multicol");
1027 }
1028
1029 /**
1030 * Test {@link org.htmlunit.html.HtmlNoBreak}.
1031 *
1032 * @throws Exception if the test fails
1033 */
1034 @Test
1035 @Alerts("0")
1036 public void nobr() throws Exception {
1037 test("nobr");
1038 }
1039
1040 /**
1041 * Test {@link org.htmlunit.html.HtmlNav}.
1042 *
1043 * @throws Exception if the test fails
1044 */
1045 @Test
1046 @Alerts("1")
1047 public void nav() throws Exception {
1048 test("nav");
1049 }
1050
1051 /**
1052 * Test {@link org.htmlunit.html.HtmlNextId}.
1053 *
1054 * @throws Exception if the test fails
1055 */
1056 @Test
1057 @Alerts("1")
1058 public void nextid() throws Exception {
1059 test("nextid");
1060 }
1061
1062 /**
1063 * Test {@link org.htmlunit.html.HtmlNoEmbed}.
1064 *
1065 * @throws Exception if the test fails
1066 */
1067 @Test
1068 @Alerts("0")
1069 public void noembed() throws Exception {
1070 test("noembed");
1071 }
1072
1073 /**
1074 * Test {@link org.htmlunit.html.HtmlNoFrames}.
1075 *
1076 * @throws Exception if the test fails
1077 */
1078 @Test
1079 @Alerts("0")
1080 public void noframes() throws Exception {
1081 test("noframes");
1082 }
1083
1084 /**
1085 * Test {@link org.htmlunit.html.HtmlNoLayer}.
1086 *
1087 * @throws Exception if the test fails
1088 */
1089 @Test
1090 @Alerts("1")
1091 public void nolayer() throws Exception {
1092 test("nolayer");
1093 }
1094
1095 /**
1096 * Test {@link org.htmlunit.html.HtmlNoScript}.
1097 *
1098 * @throws Exception if the test fails
1099 */
1100 @Test
1101 @Alerts("0")
1102 public void noscript() throws Exception {
1103 test("noscript");
1104 }
1105
1106 /**
1107 * Test {@link org.htmlunit.html.HtmlObject}.
1108 *
1109 * @throws Exception if the test fails
1110 */
1111 @Test
1112 @Alerts("1")
1113 public void object() throws Exception {
1114 test("object");
1115 }
1116
1117 /**
1118 * Test {@link org.htmlunit.html.HtmlOrderedList}.
1119 *
1120 * @throws Exception if the test fails
1121 */
1122 @Test
1123 @Alerts("1")
1124 public void ol() throws Exception {
1125 test("ol");
1126 }
1127
1128 /**
1129 * Test {@link org.htmlunit.html.HtmlOptionGroup}.
1130 *
1131 * @throws Exception if the test fails
1132 */
1133 @Test
1134 @Alerts("1")
1135 public void optgroup() throws Exception {
1136 test("optgroup");
1137 }
1138
1139 /**
1140 * Test {@link org.htmlunit.html.HtmlOption}.
1141 *
1142 * @throws Exception if the test fails
1143 */
1144 @Test
1145 @Alerts("0")
1146 public void option() throws Exception {
1147 test("option");
1148 }
1149
1150 /**
1151 * Test {@link org.htmlunit.html.HtmlOutput}.
1152 *
1153 * @throws Exception if the test fails
1154 */
1155 @Test
1156 @Alerts("1")
1157 public void output() throws Exception {
1158 test("output");
1159 }
1160
1161 /**
1162 * Test {@link org.htmlunit.html.HtmlParagraph}.
1163 *
1164 * @throws Exception if the test fails
1165 */
1166 @Test
1167 @Alerts("0")
1168 public void p() throws Exception {
1169 test("p");
1170 }
1171
1172 /**
1173 * Test {@link org.htmlunit.html.HtmlParameter}.
1174 *
1175 * @throws Exception if the test fails
1176 */
1177 @Test
1178 @Alerts("0")
1179 public void param() throws Exception {
1180 test("param");
1181 }
1182
1183 /**
1184 * Test {@link org.htmlunit.html.HtmlPlainText}.
1185 *
1186 * @throws Exception if the test fails
1187 */
1188 @Test
1189 @Alerts("0")
1190 public void plaintext() throws Exception {
1191 test("plaintext");
1192 }
1193
1194 /**
1195 * Test {@link org.htmlunit.html.HtmlPreformattedText}.
1196 *
1197 * @throws Exception if the test fails
1198 */
1199 @Test
1200 @Alerts("1")
1201 public void pre() throws Exception {
1202 test("pre");
1203 }
1204
1205 /**
1206 * Test {@link org.htmlunit.html.HtmlProgress}.
1207 *
1208 * @throws Exception if the test fails
1209 */
1210 @Test
1211 @Alerts("1")
1212 public void progress() throws Exception {
1213 test("progress");
1214 }
1215
1216 /**
1217 * Test {@link org.htmlunit.html.HtmlRuby}.
1218 *
1219 * @throws Exception if the test fails
1220 */
1221 @Test
1222 @Alerts("1")
1223 public void ruby() throws Exception {
1224 test("ruby");
1225 }
1226
1227 /**
1228 * Test {@link org.htmlunit.html.HtmlRb}.
1229 *
1230 * @throws Exception if the test fails
1231 */
1232 @Test
1233 @Alerts("1")
1234 public void rb() throws Exception {
1235 test("rb");
1236 }
1237
1238 /**
1239 * Test HtmlRbc.
1240 *
1241 * @throws Exception if the test fails
1242 */
1243 @Test
1244 @Alerts("1")
1245 public void rbc() throws Exception {
1246 test("rbc");
1247 }
1248
1249 /**
1250 * Test {@link org.htmlunit.html.HtmlRp}.
1251 *
1252 * @throws Exception if the test fails
1253 */
1254 @Test
1255 @Alerts("1")
1256 public void rp() throws Exception {
1257 test("rp");
1258 }
1259
1260 /**
1261 * Test {@link org.htmlunit.html.HtmlRt}.
1262 *
1263 * @throws Exception if the test fails
1264 */
1265 @Test
1266 @Alerts("1")
1267 public void rt() throws Exception {
1268 test("rt");
1269 }
1270
1271 /**
1272 * Test {@link org.htmlunit.html.HtmlRtc}.
1273 *
1274 * @throws Exception if the test fails
1275 */
1276 @Test
1277 @Alerts("1")
1278 public void rtc() throws Exception {
1279 test("rtc");
1280 }
1281
1282 /**
1283 * Test {@link org.htmlunit.html.HtmlS}.
1284 *
1285 * @throws Exception if the test fails
1286 */
1287 @Test
1288 @Alerts("1")
1289 public void s() throws Exception {
1290 test("s");
1291 }
1292
1293 /**
1294 * Test {@link org.htmlunit.html.HtmlSample}.
1295 *
1296 * @throws Exception if the test fails
1297 */
1298 @Test
1299 @Alerts("1")
1300 public void samp() throws Exception {
1301 test("samp");
1302 }
1303
1304 /**
1305 * Test {@link org.htmlunit.html.HtmlScript}.
1306 *
1307 * @throws Exception if the test fails
1308 */
1309 @Test
1310 @Alerts("0")
1311 public void script() throws Exception {
1312 test("script");
1313 }
1314
1315 /**
1316 * Test {@link org.htmlunit.html.HtmlSection}.
1317 *
1318 * @throws Exception if the test fails
1319 */
1320 @Test
1321 @Alerts("1")
1322 public void section() throws Exception {
1323 test("section");
1324 }
1325
1326 /**
1327 * Test {@link org.htmlunit.html.HtmlSelect}.
1328 *
1329 * @throws Exception if the test fails
1330 */
1331 @Test
1332 @Alerts("0")
1333 public void select() throws Exception {
1334 test("select");
1335 }
1336
1337 /**
1338 * Test {@link org.htmlunit.html.HtmlSmall}.
1339 *
1340 * @throws Exception if the test fails
1341 */
1342 @Test
1343 @Alerts("1")
1344 public void small() throws Exception {
1345 test("small");
1346 }
1347
1348 /**
1349 * Test {@link org.htmlunit.html.HtmlSource}.
1350 *
1351 * @throws Exception if the test fails
1352 */
1353 @Test
1354 @Alerts("0")
1355 public void source() throws Exception {
1356 test("source");
1357 }
1358
1359 /**
1360 * @throws Exception if the test fails
1361 */
1362 @Test
1363 @Alerts("1")
1364 public void spacer() throws Exception {
1365 test("spacer");
1366 }
1367
1368 /**
1369 * Test {@link org.htmlunit.html.HtmlSpan}.
1370 *
1371 * @throws Exception if the test fails
1372 */
1373 @Test
1374 @Alerts("1")
1375 public void span() throws Exception {
1376 test("span");
1377 }
1378
1379 /**
1380 * Test {@link org.htmlunit.html.HtmlStrike}.
1381 *
1382 * @throws Exception if the test fails
1383 */
1384 @Test
1385 @Alerts("1")
1386 public void strike() throws Exception {
1387 test("strike");
1388 }
1389
1390 /**
1391 * Test {@link org.htmlunit.html.HtmlStrong}.
1392 *
1393 * @throws Exception if the test fails
1394 */
1395 @Test
1396 @Alerts("1")
1397 public void strong() throws Exception {
1398 test("strong");
1399 }
1400
1401 /**
1402 * Test {@link org.htmlunit.html.HtmlStyle}.
1403 *
1404 * @throws Exception if the test fails
1405 */
1406 @Test
1407 @Alerts("0")
1408 public void style() throws Exception {
1409 test("style");
1410 }
1411
1412 /**
1413 * Test {@link org.htmlunit.html.HtmlSubscript}.
1414 *
1415 * @throws Exception if the test fails
1416 */
1417 @Test
1418 @Alerts("1")
1419 public void sub() throws Exception {
1420 test("sub");
1421 }
1422
1423 /**
1424 * Test {@link org.htmlunit.html.HtmlSummary}.
1425 *
1426 * @throws Exception if the test fails
1427 */
1428 @Test
1429 @Alerts("1")
1430 public void summary() throws Exception {
1431 test("summary");
1432 }
1433
1434 /**
1435 * Test {@link org.htmlunit.html.HtmlSuperscript}.
1436 *
1437 * @throws Exception if the test fails
1438 */
1439 @Test
1440 @Alerts("1")
1441 public void sup() throws Exception {
1442 test("sup");
1443 }
1444
1445 /**
1446 * Test {@link org.htmlunit.html.HtmlSvg}.
1447 *
1448 * @throws Exception if the test fails
1449 */
1450 @Test
1451 @Alerts("1")
1452 public void svg() throws Exception {
1453 test("svg");
1454 }
1455
1456 /**
1457 * Test {@link org.htmlunit.html.HtmlTable}.
1458 *
1459 * @throws Exception if the test fails
1460 */
1461 @Test
1462 @Alerts("0")
1463 public void table() throws Exception {
1464 test("table");
1465 }
1466
1467 /**
1468 * Test {@link org.htmlunit.html.HtmlTableColumn}.
1469 *
1470 * @throws Exception if the test fails
1471 */
1472 @Test
1473 @Alerts("null")
1474 public void col() throws Exception {
1475 test("col");
1476 }
1477
1478 /**
1479 * Test {@link org.htmlunit.html.HtmlTableColumnGroup}.
1480 *
1481 * @throws Exception if the test fails
1482 */
1483 @Test
1484 @Alerts("null")
1485 public void colgroup() throws Exception {
1486 test("colgroup");
1487 }
1488
1489 /**
1490 * Test {@link org.htmlunit.html.HtmlTableBody}.
1491 *
1492 * @throws Exception if the test fails
1493 */
1494 @Test
1495 @Alerts("null")
1496 public void tbody() throws Exception {
1497 test("tbody");
1498 }
1499
1500 /**
1501 * Test {@link org.htmlunit.html.HtmlTableDataCell}.
1502 *
1503 * @throws Exception if the test fails
1504 */
1505 @Test
1506 @Alerts("null")
1507 public void td() throws Exception {
1508 test("td");
1509 }
1510
1511 /**
1512 * Test {@link org.htmlunit.html.HtmlTableHeaderCell}.
1513 *
1514 * @throws Exception if the test fails
1515 */
1516 @Test
1517 @Alerts("null")
1518 public void th() throws Exception {
1519 test("th");
1520 }
1521
1522 /**
1523 * Test {@link org.htmlunit.html.HtmlTableRow}.
1524 *
1525 * @throws Exception if the test fails
1526 */
1527 @Test
1528 @Alerts("null")
1529 public void tr() throws Exception {
1530 test("tr");
1531 }
1532
1533 /**
1534 * Test {@link org.htmlunit.html.HtmlTrack}.
1535 *
1536 * @throws Exception if the test fails
1537 */
1538 @Test
1539 @Alerts("0")
1540 public void track() throws Exception {
1541 test("track");
1542 }
1543
1544 /**
1545 * Test {@link org.htmlunit.html.HtmlTextArea}.
1546 *
1547 * @throws Exception if the test fails
1548 */
1549 @Test
1550 @Alerts("0")
1551 public void textarea() throws Exception {
1552 test("textarea");
1553 }
1554
1555 /**
1556 * Test {@link org.htmlunit.html.HtmlTableFooter}.
1557 *
1558 * @throws Exception if the test fails
1559 */
1560 @Test
1561 @Alerts("null")
1562 public void tfoot() throws Exception {
1563 test("tfoot");
1564 }
1565
1566 /**
1567 * Test {@link org.htmlunit.html.HtmlTableHeader}.
1568 *
1569 * @throws Exception if the test fails
1570 */
1571 @Test
1572 @Alerts("null")
1573 public void thead() throws Exception {
1574 test("thead");
1575 }
1576
1577 /**
1578 * Test {@link org.htmlunit.html.HtmlTeletype}.
1579 *
1580 * @throws Exception if the test fails
1581 */
1582 @Test
1583 @Alerts("1")
1584 public void tt() throws Exception {
1585 test("tt");
1586 }
1587
1588 /**
1589 * Test {@link org.htmlunit.html.HtmlTime}.
1590 *
1591 * @throws Exception if the test fails
1592 */
1593 @Test
1594 @Alerts("1")
1595 public void time() throws Exception {
1596 test("time");
1597 }
1598
1599 /**
1600 * Test {@link org.htmlunit.html.HtmlTitle}.
1601 *
1602 * @throws Exception if the test fails
1603 */
1604 @Test
1605 @Alerts("0")
1606 public void title() throws Exception {
1607 test("title");
1608 }
1609
1610 /**
1611 * Test {@link org.htmlunit.html.HtmlUnderlined}.
1612 *
1613 * @throws Exception if the test fails
1614 */
1615 @Test
1616 @Alerts("1")
1617 public void u() throws Exception {
1618 test("u");
1619 }
1620
1621 /**
1622 * Test {@link org.htmlunit.html.HtmlUnorderedList}.
1623 *
1624 * @throws Exception if the test fails
1625 */
1626 @Test
1627 @Alerts("1")
1628 public void ul() throws Exception {
1629 test("ul");
1630 }
1631
1632 /**
1633 * Test {@link org.htmlunit.html.HtmlVariable}.
1634 *
1635 * @throws Exception if the test fails
1636 */
1637 @Test
1638 @Alerts("1")
1639 public void var() throws Exception {
1640 test("var");
1641 }
1642
1643 /**
1644 * Test {@link org.htmlunit.html.HtmlVideo}.
1645 *
1646 * @throws Exception if the test fails
1647 */
1648 @Test
1649 @Alerts("1")
1650 public void video() throws Exception {
1651 test("video");
1652 }
1653
1654 /**
1655 * Test {@link org.htmlunit.html.HtmlWordBreak}.
1656 *
1657 * @throws Exception if the test fails
1658 */
1659 @Test
1660 @Alerts("0")
1661 public void wbr() throws Exception {
1662 test("wbr");
1663 }
1664
1665 /**
1666 * Test {@link org.htmlunit.html.HtmlExample}.
1667 *
1668 * @throws Exception if the test fails
1669 */
1670 @Test
1671 @Alerts("0")
1672 public void xmp() throws Exception {
1673 test("xmp");
1674 }
1675
1676 /**
1677 * Test {@link org.htmlunit.html.HtmlInput}.
1678 *
1679 * @throws Exception if the test fails
1680 */
1681 @Test
1682 @Alerts("0")
1683 public void input() throws Exception {
1684 test("input");
1685 }
1686
1687 /**
1688 * Test {@link org.htmlunit.html.HtmlData}.
1689 *
1690 * @throws Exception if the test fails
1691 */
1692 @Test
1693 @Alerts("1")
1694 public void data() throws Exception {
1695 test("data");
1696 }
1697
1698 /**
1699 * Test HtmlContent.
1700 *
1701 * @throws Exception if the test fails
1702 */
1703 @Test
1704 @Alerts("1")
1705 public void content() throws Exception {
1706 test("content");
1707 }
1708
1709 /**
1710 * Test {@link org.htmlunit.html.HtmlPicture}.
1711 *
1712 * @throws Exception if the test fails
1713 */
1714 @Test
1715 @Alerts("1")
1716 public void picture() throws Exception {
1717 test("picture");
1718 }
1719
1720 /**
1721 * Test {@link org.htmlunit.html.HtmlTemplate}.
1722 *
1723 * @throws Exception if the test fails
1724 */
1725 @Test
1726 @Alerts("0")
1727 public void template() throws Exception {
1728 test("template");
1729 }
1730
1731 /**
1732 * Test {@link org.htmlunit.html.HtmlSlot}.
1733 *
1734 * @throws Exception if the test fails
1735 */
1736 @Test
1737 @Alerts("1")
1738 public void slot() throws Exception {
1739 test("slot");
1740 }
1741
1742 /**
1743 * @throws Exception if the test fails
1744 */
1745 @Test
1746 @Alerts("1")
1747 public void arbitrary() throws Exception {
1748 test("abcdefg");
1749 }
1750 }