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