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