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