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