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