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