View Javadoc
1   /*
2    * Copyright (c) 2002-2025 Gargoyle Software Inc.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * https://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  package org.htmlunit.general;
16  
17  import static java.nio.charset.StandardCharsets.ISO_8859_1;
18  
19  import java.awt.Color;
20  import java.awt.GradientPaint;
21  import java.io.File;
22  import java.io.IOException;
23  import java.lang.reflect.Method;
24  import java.util.ArrayList;
25  import java.util.Arrays;
26  import java.util.Collections;
27  import java.util.Comparator;
28  import java.util.List;
29  
30  import javax.imageio.ImageIO;
31  
32  import org.apache.commons.io.FileUtils;
33  import org.htmlunit.BrowserVersion;
34  import org.htmlunit.WebDriverTestCase;
35  import org.htmlunit.javascript.host.Location;
36  import org.htmlunit.javascript.host.Screen;
37  import org.htmlunit.javascript.host.crypto.Crypto;
38  import org.htmlunit.javascript.host.crypto.SubtleCrypto;
39  import org.htmlunit.javascript.host.css.ComputedCSSStyleDeclaration;
40  import org.htmlunit.javascript.host.dom.CDATASection;
41  import org.htmlunit.javascript.host.dom.NodeList;
42  import org.htmlunit.javascript.host.dom.XPathEvaluator;
43  import org.htmlunit.javascript.host.dom.XPathResult;
44  import org.htmlunit.javascript.host.html.HTMLCollection;
45  import org.htmlunit.javascript.host.performance.Performance;
46  import org.htmlunit.junit.BrowserRunner;
47  import org.htmlunit.junit.BrowserVersionClassRunner;
48  import org.htmlunit.junit.annotation.Alerts;
49  import org.htmlunit.junit.annotation.HtmlUnitNYI;
50  import org.jfree.chart.ChartFactory;
51  import org.jfree.chart.JFreeChart;
52  import org.jfree.chart.axis.NumberAxis;
53  import org.jfree.chart.plot.CategoryPlot;
54  import org.jfree.chart.plot.PlotOrientation;
55  import org.jfree.chart.renderer.category.LayeredBarRenderer;
56  import org.jfree.chart.util.SortOrder;
57  import org.jfree.data.category.DefaultCategoryDataset;
58  import org.junit.AfterClass;
59  import org.junit.BeforeClass;
60  import org.junit.Test;
61  import org.junit.runner.RunWith;
62  
63  /**
64   * Tests own properties of an object.
65   *
66   * @author Ronald Brill
67   */
68  @RunWith(BrowserRunner.class)
69  public class ElementOwnPropertySymbolsTest extends WebDriverTestCase {
70  
71      private static BrowserVersion BROWSER_VERSION_;
72  
73      private void test(final String tagName) throws Exception {
74          testString("", "document.createElement('" + tagName + "')");
75      }
76  
77      private void testString(final String preparation, final String string) throws Exception {
78          final String html = DOCTYPE_HTML
79                  + "<html><head><script>\n"
80                  + LOG_TEXTAREA_FUNCTION
81                  + "  function test(event) {\n"
82                  + "    var xmlDocument = document.implementation.createDocument('', '', null);\n"
83                  + "    var element = xmlDocument.createElement('wakwak');\n"
84                  + "    var unknown = document.createElement('harhar');\n"
85                  + "    var div = document.createElement('div');\n"
86                  + "    var svg = document.getElementById('mySvg');\n"
87                  + "    try{\n"
88                  + "      " + preparation + "\n"
89                  + "      process(" + string + ");\n"
90                  + "    } catch(e) {logEx(e);return;}\n"
91                  + "  }\n"
92                  + "\n"
93                  + "  /*\n"
94                  + "   * Alerts all properties (including functions) of the specified object.\n"
95                  + "   *\n"
96                  + "   * @param object the object to write the property of\n"
97                  + "   */\n"
98                  + "  function process(object) {\n"
99                  + "    var all = [];\n"
100                 + "    var props = Object.getOwnPropertySymbols(object.constructor.prototype);\n"
101                 + "    for (i = 0; i < props.length; i++) {\n"
102                 + "      var str = props[i].toString();\n"
103 
104                 + "      let desc = Object.getOwnPropertyDescriptor(object.constructor.prototype, props[i]);\n"
105                 + "      str += ' [';\n"
106                 + "      if (desc.get != undefined) str += 'G';\n"
107                 + "      if (desc.set != undefined) str += 'S';\n"
108                 + "      if (desc.writable) str += 'W';\n"
109                 + "      if (desc.configurable) str += 'C';\n"
110                 + "      if (desc.enumerable) str += 'E';\n"
111                 + "      str += ']'\n"
112 
113                 + "      var val = object[props[i]];\n"
114                 + "      if (typeof val === 'function') {\n"
115                 + "        str = str + ' [function]';\n"
116                 + "      } else if (typeof val === 'string') {\n"
117                 + "        str = str + ' [' + val + ']';\n"
118                 + "      } else {\n"
119                 + "        str = str + ' [' + JSON.stringify(val) + ']';\n"
120                 + "      }\n"
121                 + "      all.push(str);\n"
122                 + "    }\n"
123 
124                 + "    all.sort(sortFunction);\n"
125                 + "    if (all.length == 0) { all = '-' };\n"
126                 + "    log(all);\n"
127                 + "  }\n"
128                 + "  function sortFunction(s1, s2) {\n"
129                 + "    var s1lc = s1.toLowerCase();\n"
130                 + "    var s2lc =  s2.toLowerCase();\n"
131                 + "    if (s1lc > s2lc) { return 1; }\n"
132                 + "    if (s1lc < s2lc) { return -1; }\n"
133                 + "    return s1 > s2 ? 1 : -1;\n"
134                 + "  }\n"
135                 + "</script></head>\n"
136                 + "<body onload='test(event)'>\n"
137                 + "  <svg xmlns='http://www.w3.org/2000/svg' version='1.1'>\n"
138                 + "    <invalid id='mySvg'/>\n"
139                 + "  </svg>\n"
140 
141                 + "  <style>\n"
142                 + "    @page { margin: 1cm; }\n"
143                 + "  </style>\n"
144                 + "  <style>\n"
145                 + "    @media screen { p { background-color:#FFFFFF; }};\n"
146                 + "  </style>\n"
147                 + "  <style>\n"
148                 + "    @font-face { font-family: Delicious; src: url('Delicious-Bold.otf'); };\n"
149                 + "  </style>\n"
150                 + "  <style>\n"
151                 + "    @import 'imp.css';\n"
152                 + "  </style>\n"
153                 + "  <style>\n"
154                 + "    h3 { color: blue;  }\n"
155                 + "  </style>\n"
156 
157                 + "  <form name='myForm', id='myFormId'>"
158                 + "    <input type='radio' name='first'/><input type='radio' name='first'/>"
159                 + "    <input id='fileItem' type='file' />"
160                 + "  </form>"
161 
162                 + LOG_TEXTAREA
163                 + "</body></html>";
164 
165         if (BROWSER_VERSION_ == null) {
166             BROWSER_VERSION_ = getBrowserVersion();
167         }
168 
169         loadPageVerifyTextArea2(html);
170     }
171 
172     private static List<String> stringAsArray(final String string) {
173         if (string.isEmpty()) {
174             return Collections.emptyList();
175         }
176         return Arrays.asList(string.split(","));
177     }
178 
179     /**
180      * Resets browser-specific values.
181      */
182     @BeforeClass
183     public static void beforeClass() {
184         BROWSER_VERSION_ = null;
185     }
186 
187     /**
188      * Saves HTML and PNG files.
189      *
190      * @throws IOException if an error occurs
191      */
192     @AfterClass
193     public static void saveAll() throws IOException {
194         final DefaultCategoryDataset dataset = new DefaultCategoryDataset();
195         final int[] counts = {0, 0};
196         final StringBuilder html = new StringBuilder();
197         html.setLength(0);
198 
199         collectStatistics(BROWSER_VERSION_, dataset, html, counts);
200         saveChart(dataset);
201 
202         FileUtils.writeStringToFile(new File(getTargetDirectory()
203                 + "/ownsymbols-" + BROWSER_VERSION_.getNickname() + ".html"),
204                 htmlHeader()
205                     .append(overview(counts))
206                     .append(htmlDetailsHeader())
207                     .append(html)
208                     .append(htmlDetailsFooter())
209                     .append(htmlFooter()).toString(), ISO_8859_1);
210     }
211 
212     private static void collectStatistics(final BrowserVersion browserVersion, final DefaultCategoryDataset dataset,
213             final StringBuilder html, final int[] counts) {
214         final Method[] methods = ElementOwnPropertySymbolsTest.class.getMethods();
215         Arrays.sort(methods, Comparator.comparing(Method::getName));
216         for (final Method method : methods) {
217             if (method.isAnnotationPresent(Test.class)) {
218 
219                 final Alerts alerts = method.getAnnotation(Alerts.class);
220                 String[] expectedAlerts = {};
221                 if (BrowserVersionClassRunner.isDefined(alerts.value())) {
222                     expectedAlerts = alerts.value();
223                 }
224                 else if (browserVersion == BrowserVersion.EDGE) {
225                     expectedAlerts = BrowserVersionClassRunner
226                             .firstDefinedOrGiven(expectedAlerts, alerts.EDGE(), alerts.DEFAULT());
227                 }
228                 else if (browserVersion == BrowserVersion.FIREFOX_ESR) {
229                     expectedAlerts = BrowserVersionClassRunner
230                             .firstDefinedOrGiven(expectedAlerts, alerts.FF_ESR(), alerts.DEFAULT());
231                 }
232                 else if (browserVersion == BrowserVersion.FIREFOX) {
233                     expectedAlerts = BrowserVersionClassRunner
234                             .firstDefinedOrGiven(expectedAlerts, alerts.FF(), alerts.DEFAULT());
235                 }
236                 else if (browserVersion == BrowserVersion.CHROME) {
237                     expectedAlerts = BrowserVersionClassRunner
238                             .firstDefinedOrGiven(expectedAlerts, alerts.CHROME(), alerts.DEFAULT());
239                 }
240 
241                 final List<String> realProperties = stringAsArray(String.join(",", expectedAlerts));
242                 List<String> simulatedProperties = stringAsArray(String.join(",", expectedAlerts));
243 
244                 final HtmlUnitNYI htmlUnitNYI = method.getAnnotation(HtmlUnitNYI.class);
245                 String[] nyiAlerts = {};
246                 if (htmlUnitNYI != null) {
247                     if (browserVersion == BrowserVersion.EDGE) {
248                         nyiAlerts = BrowserVersionClassRunner.firstDefinedOrGiven(expectedAlerts, htmlUnitNYI.EDGE());
249                     }
250                     else if (browserVersion == BrowserVersion.FIREFOX_ESR) {
251                         nyiAlerts = BrowserVersionClassRunner.firstDefinedOrGiven(expectedAlerts, htmlUnitNYI.FF_ESR());
252                     }
253                     else if (browserVersion == BrowserVersion.FIREFOX) {
254                         nyiAlerts = BrowserVersionClassRunner.firstDefinedOrGiven(expectedAlerts, htmlUnitNYI.FF());
255                     }
256                     else if (browserVersion == BrowserVersion.CHROME) {
257                         nyiAlerts = BrowserVersionClassRunner.firstDefinedOrGiven(expectedAlerts, htmlUnitNYI.CHROME());
258                     }
259 
260                     simulatedProperties = stringAsArray(String.join(",", nyiAlerts));
261                 }
262 
263                 final List<String> erroredProperties = new ArrayList<>(simulatedProperties);
264                 erroredProperties.removeAll(realProperties);
265 
266                 final List<String> implementedProperties = new ArrayList<>(simulatedProperties);
267                 implementedProperties.retainAll(realProperties);
268 
269                 counts[1] += implementedProperties.size();
270                 counts[0] += realProperties.size();
271 
272                 htmlDetails(method.getName(), html, realProperties, implementedProperties, erroredProperties);
273 
274                 dataset.addValue(implementedProperties.size(), "Implemented", method.getName());
275                 dataset.addValue(realProperties.size(),
276                         browserVersion.getNickname().replace("FF", "Firefox "),
277                        method.getName());
278                 dataset.addValue(erroredProperties.size(), "Should not be implemented", method.getName());
279             }
280         }
281     }
282 
283     private static void saveChart(final DefaultCategoryDataset dataset) throws IOException {
284         final JFreeChart chart = ChartFactory.createBarChart(
285             "HtmlUnit implemented properties and methods for " + BROWSER_VERSION_.getNickname(), "Objects",
286             "Count", dataset, PlotOrientation.HORIZONTAL, true, true, false);
287         final CategoryPlot plot = (CategoryPlot) chart.getPlot();
288         final NumberAxis axis = (NumberAxis) plot.getRangeAxis();
289         axis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
290         final LayeredBarRenderer renderer = new LayeredBarRenderer();
291         plot.setRenderer(renderer);
292         plot.setRowRenderingOrder(SortOrder.DESCENDING);
293         renderer.setSeriesPaint(0, new GradientPaint(0, 0, Color.green, 0, 0, new Color(0, 64, 0)));
294         renderer.setSeriesPaint(1, new GradientPaint(0, 0, Color.blue, 0, 0, new Color(0, 0, 64)));
295         renderer.setSeriesPaint(2, new GradientPaint(0, 0, Color.red, 0, 0, new Color(64, 0, 0)));
296         ImageIO.write(chart.createBufferedImage(1200, 2400), "png",
297             new File(getTargetDirectory() + "/ownsymbols-" + BROWSER_VERSION_.getNickname() + ".png"));
298     }
299 
300     /**
301      * Returns the 'target' directory.
302      * @return the 'target' directory
303      */
304     public static String getTargetDirectory() {
305         final String dirName = "./target";
306         final File dir = new File(dirName);
307         if (!dir.exists()) {
308             if (!dir.mkdir()) {
309                 throw new RuntimeException("Could not create artifacts directory");
310             }
311         }
312         return dirName;
313     }
314 
315     private static StringBuilder htmlHeader() {
316         final StringBuilder html = new StringBuilder();
317         html.append(DOCTYPE_HTML);
318         html.append("<html><head>\n");
319         html.append("<style type=\"text/css\">\n");
320         html.append("table.bottomBorder { border-collapse:collapse; }\n");
321         html.append("table.bottomBorder td, table.bottomBorder th { "
322                             + "border-bottom:1px dotted black;padding:5px; }\n");
323         html.append("table.bottomBorder td.numeric { text-align:right; }\n");
324         html.append("</style>\n");
325         html.append("</head><body>\n");
326 
327         html.append("<div align='center'>").append("<h2>")
328         .append("HtmlUnit implemented symbols for " + BROWSER_VERSION_.getNickname())
329         .append("</h2>").append("</div>\n");
330         return html;
331     }
332 
333     private static StringBuilder overview(final int[] counts) {
334         final StringBuilder html = new StringBuilder();
335         html.append("<table class='bottomBorder'>");
336         html.append("<tr>\n");
337 
338         html.append("<th>Total Implemented:</th>\n");
339         html.append("<td>" + counts[1])
340             .append(" (" + Math.round(((double) counts[1]) / counts[0] * 100))
341             .append("%)</td>\n");
342 
343         html.append("</tr>\n");
344         html.append("</table>\n");
345 
346         html.append("<p><br></p>\n");
347 
348         return html;
349     }
350 
351     private static StringBuilder htmlFooter() {
352         final StringBuilder html = new StringBuilder();
353 
354         html.append("<br>").append("Legend:").append("<br>")
355         .append("<span style='color: blue'>").append("To be implemented").append("</span>").append("<br>")
356         .append("<span style='color: green'>").append("Implemented").append("</span>").append("<br>")
357         .append("<span style='color: red'>").append("Should not be implemented").append("</span>");
358         html.append("\n");
359 
360         html.append("</body>\n");
361         html.append("</html>\n");
362         return html;
363     }
364 
365     private static StringBuilder htmlDetailsHeader() {
366         final StringBuilder html = new StringBuilder();
367 
368         html.append("<table class='bottomBorder' width='100%'>");
369         html.append("<tr>\n");
370         html.append("<th>Class</th><th>Symbols</th><th>Counts</th>\n");
371         html.append("</tr>");
372         return html;
373     }
374 
375     private static StringBuilder htmlDetails(final String name, final StringBuilder html,
376             final List<String> realProperties,
377             final List<String> implementedProperties, final List<String> erroredProperties) {
378         html.append("<tr>").append('\n').append("<td rowspan='2'>").append("<a name='" + name + "'>").append(name)
379             .append("</a>").append("</td>").append('\n').append("<td>");
380         int implementedCount = 0;
381 
382         if (realProperties.isEmpty()) {
383             html.append("&nbsp;");
384         }
385         else if (realProperties.size() == 1
386                 && realProperties.contains("exception")
387                 && implementedProperties.size() == 1
388                 && implementedProperties.contains("exception")
389                 && erroredProperties.size() == 0) {
390             html.append("&nbsp;");
391         }
392         else {
393             for (int i = 0; i < realProperties.size(); i++) {
394                 final String color;
395                 if (implementedProperties.contains(realProperties.get(i))) {
396                     color = "green";
397                     implementedCount++;
398                 }
399                 else {
400                     color = "blue";
401                 }
402                 html.append("<span style='color: " + color + "'>").append(realProperties.get(i)).append("</span>");
403                 if (i < realProperties.size() - 1) {
404                     html.append(',').append(' ');
405                 }
406             }
407         }
408 
409         html.append("</td>").append("<td>").append(implementedCount).append('/')
410             .append(realProperties.size()).append("</td>").append("</tr>").append('\n');
411         html.append("<tr>").append("<td>");
412         for (int i = 0; i < erroredProperties.size(); i++) {
413             html.append("<span style='color: red'>").append(erroredProperties.get(i)).append("</span>");
414             if (i < erroredProperties.size() - 1) {
415                 html.append(',').append(' ');
416             }
417         }
418         if (erroredProperties.isEmpty()) {
419             html.append("&nbsp;");
420         }
421         html.append("</td>")
422             .append("<td>").append(erroredProperties.size()).append("</td>").append("</tr>\n");
423 
424         return html;
425     }
426 
427     private static StringBuilder htmlDetailsFooter() {
428         final StringBuilder html = new StringBuilder();
429         html.append("</table>");
430         return html;
431     }
432 
433     /**
434      * @throws Exception if the test fails
435      */
436     @Test
437     @Alerts("Symbol(Symbol.toStringTag) [C] [Text]")
438     public void text() throws Exception {
439         testString("", "document.createTextNode('some text')");
440     }
441 
442     /**
443      * @throws Exception if the test fails
444      */
445     @Test
446     @Alerts("Symbol(Symbol.toStringTag) [C] [Attr]")
447     public void attr() throws Exception {
448         testString("", "document.createAttribute('some_attrib')");
449     }
450 
451     /**
452      * @throws Exception if the test fails
453      */
454     @Test
455     @Alerts("Symbol(Symbol.toStringTag) [C] [Comment]")
456     public void comment() throws Exception {
457         testString("", "document.createComment('come_comment')");
458     }
459 
460     /**
461      * @throws Exception if the test fails
462      */
463     @Test
464     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
465     public void unknown() throws Exception {
466         testString("", "unknown");
467     }
468 
469     /**
470      * @throws Exception if the test fails
471      */
472     @Test
473     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
474     public void htmlElement() throws Exception {
475         testString("", "unknown");
476     }
477 
478     /**
479      * Test {@link org.htmlunit.javascript.host.Element}.
480      *
481      * @throws Exception if the test fails
482      */
483     @Test
484     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [Element],"
485                 + "Symbol(Symbol.unscopables) [C] [{\"after\":true,\"append\":true,\"before\":true,"
486                     + "\"prepend\":true,\"remove\":true,\"replaceChildren\":true,"
487                     + "\"replaceWith\":true,\"slot\":true}]",
488             FF = "Symbol(Symbol.toStringTag) [C] [Element],"
489                 + "Symbol(Symbol.unscopables) [C] [{\"slot\":true,\"before\":true,\"after\":true,"
490                     + "\"replaceWith\":true,\"remove\":true,\"prepend\":true,"
491                     + "\"append\":true,\"replaceChildren\":true}]",
492             FF_ESR = "Symbol(Symbol.toStringTag) [C] [Element],"
493                 + "Symbol(Symbol.unscopables) [C] [{\"slot\":true,\"before\":true,\"after\":true,"
494                     + "\"replaceWith\":true,\"remove\":true,\"prepend\":true,"
495                     + "\"append\":true,\"replaceChildren\":true}]")
496     @HtmlUnitNYI(CHROME = "Symbol(Symbol.toStringTag) [C] [Element]",
497             EDGE = "Symbol(Symbol.toStringTag) [C] [Element]",
498             FF = "Symbol(Symbol.toStringTag) [C] [Element]",
499             FF_ESR = "Symbol(Symbol.toStringTag) [C] [Element]")
500     public void element() throws Exception {
501         testString("", "element");
502     }
503 
504     /**
505      * Test {@link org.htmlunit.javascript.host.Element}.
506      *
507      * @throws Exception if the test fails
508      */
509     @Test
510     @Alerts(DEFAULT =
511                 "Symbol(Symbol.toStringTag) [C] [Element],"
512                 + "Symbol(Symbol.unscopables) [C] [{\"after\":true,\"append\":true,"
513                     + "\"before\":true,\"prepend\":true,\"remove\":true,\"replaceChildren\":true,\"replaceWith\":true,"
514                     + "\"slot\":true}]",
515             FF = "Symbol(Symbol.toStringTag) [C] [Element],"
516                 + "Symbol(Symbol.unscopables) [C] [{\"slot\":true,\"before\":true,\"after\":true,\"replaceWith\":true,"
517                     + "\"remove\":true,\"prepend\":true,\"append\":true,\"replaceChildren\":true}]",
518             FF_ESR = "Symbol(Symbol.toStringTag) [C] [Element],"
519                 + "Symbol(Symbol.unscopables) [C] [{\"slot\":true,\"before\":true,\"after\":true,\"replaceWith\":true,"
520                     + "\"remove\":true,\"prepend\":true,\"append\":true,\"replaceChildren\":true}]")
521     @HtmlUnitNYI(CHROME = "Symbol(Symbol.toStringTag) [C] [Element]",
522             EDGE = "Symbol(Symbol.toStringTag) [C] [Element]",
523             FF_ESR = "Symbol(Symbol.toStringTag) [C] [Element]",
524             FF = "Symbol(Symbol.toStringTag) [C] [Element]")
525     public void element2() throws Exception {
526         testString("", "element, document.createDocumentFragment()");
527     }
528 
529     /**
530      * @throws Exception if the test fails
531      */
532     @Test
533     @Alerts("TypeError")
534     public void currentStyle() throws Exception {
535         testString("", "document.body.currentStyle");
536     }
537 
538     /**
539      * @throws Exception if the test fails
540      */
541     @Test
542     @Alerts("Symbol(Symbol.toStringTag) [C] [Event]")
543     public void event() throws Exception {
544         testString("", "event");
545     }
546 
547     /**
548      * @throws Exception if the test fails
549      */
550     @Test
551     @Alerts("Symbol(Symbol.toStringTag) [C] [Window]")
552     public void window() throws Exception {
553         testString("", "window");
554     }
555 
556     /**
557      * Test {@link org.htmlunit.html.HtmlAbbreviated}.
558      *
559      * @throws Exception if the test fails
560      */
561     @Test
562     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
563     public void abbr() throws Exception {
564         test("abbr");
565     }
566 
567     /**
568      * Test {@link org.htmlunit.html.HtmlAcronym}.
569      *
570      * @throws Exception if the test fails
571      */
572     @Test
573     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
574     public void acronym() throws Exception {
575         test("acronym");
576     }
577 
578     /**
579      * Test {@link org.htmlunit.html.HtmlAnchor}.
580      *
581      * @throws Exception if the test fails
582      */
583     @Test
584     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLAnchorElement]")
585     public void a() throws Exception {
586         test("a");
587     }
588 
589     /**
590      * Test {@link org.htmlunit.html.HtmlAddress}.
591      *
592      * @throws Exception if the test fails
593      */
594     @Test
595     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
596     public void address() throws Exception {
597         test("address");
598     }
599 
600     /**
601      * Test {@link org.htmlunit.html.HtmlApplet}.
602      *
603      * @throws Exception if the test fails
604      */
605     @Test
606     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
607     public void applet() throws Exception {
608         test("applet");
609     }
610 
611     /**
612      * Test {@link org.htmlunit.html.HtmlArea}.
613      *
614      * @throws Exception if the test fails
615      */
616     @Test
617     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLAreaElement]")
618     public void area() throws Exception {
619         test("area");
620     }
621 
622     /**
623      * Test {@link org.htmlunit.html.HtmlArticle}.
624      *
625      * @throws Exception if the test fails
626      */
627     @Test
628     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
629     public void article() throws Exception {
630         test("article");
631     }
632 
633     /**
634      * Test {@link org.htmlunit.html.HtmlAside}.
635      *
636      * @throws Exception if the test fails
637      */
638     @Test
639     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
640     public void aside() throws Exception {
641         test("aside");
642     }
643 
644     /**
645      * Test {@link org.htmlunit.html.HtmlAudio}.
646      *
647      * @throws Exception if the test fails
648      */
649     @Test
650     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLAudioElement]")
651     public void audio() throws Exception {
652         test("audio");
653     }
654 
655     /**
656      * Test {@link org.htmlunit.html.HtmlBackgroundSound}.
657      *
658      * @throws Exception if the test fails
659      */
660     @Test
661     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
662     public void bgsound() throws Exception {
663         test("bgsound");
664     }
665 
666     /**
667      * Test {@link org.htmlunit.html.HtmlBase}.
668      *
669      * @throws Exception if the test fails
670      */
671     @Test
672     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLBaseElement]")
673     public void base() throws Exception {
674         test("base");
675     }
676 
677     /**
678      * Test {@link org.htmlunit.html.HtmlBaseFont}.
679      *
680      * @throws Exception if the test fails
681      */
682     @Test
683     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
684     public void basefont() throws Exception {
685         test("basefont");
686     }
687 
688     /**
689      * Test {@link org.htmlunit.html.HtmlBidirectionalIsolation}.
690      *
691      * @throws Exception if the test fails
692      */
693     @Test
694     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
695     public void bdi() throws Exception {
696         test("bdi");
697     }
698 
699     /**
700      * Test {@link org.htmlunit.html.HtmlBidirectionalOverride}.
701      *
702      * @throws Exception if the test fails
703      */
704     @Test
705     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
706     public void bdo() throws Exception {
707         test("bdo");
708     }
709 
710     /**
711      * Test {@link org.htmlunit.html.HtmlBig}.
712      *
713      * @throws Exception if the test fails
714      */
715     @Test
716     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
717     public void big() throws Exception {
718         test("big");
719     }
720 
721     /**
722      * Test {@link org.htmlunit.html.HtmlBlink}.
723      *
724      * @throws Exception if the test fails
725      */
726     @Test
727     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
728     public void blink() throws Exception {
729         test("blink");
730     }
731 
732     /**
733      * Test {@link org.htmlunit.html.HtmlBlockQuote}.
734      *
735      * @throws Exception if the test fails
736      */
737     @Test
738     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLQuoteElement]")
739     public void blockquote() throws Exception {
740         test("blockquote");
741     }
742 
743     /**
744      * Test {@link org.htmlunit.html.HtmlBody}.
745      *
746      * @throws Exception if the test fails
747      */
748     @Test
749     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLBodyElement]")
750     public void body() throws Exception {
751         test("body");
752     }
753 
754     /**
755      * Test {@link org.htmlunit.html.HtmlBold}.
756      *
757      * @throws Exception if the test fails
758      */
759     @Test
760     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
761     public void b() throws Exception {
762         test("b");
763     }
764 
765     /**
766      * Test {@link org.htmlunit.html.HtmlBreak}.
767      *
768      * @throws Exception if the test fails
769      */
770     @Test
771     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLBRElement]")
772     public void br() throws Exception {
773         test("br");
774     }
775 
776     /**
777      * Test {@link org.htmlunit.html.HtmlButton}.
778      *
779      * @throws Exception if the test fails
780      */
781     @Test
782     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLButtonElement]")
783     public void button() throws Exception {
784         test("button");
785     }
786 
787     /**
788      * Test {@link org.htmlunit.html.HtmlCanvas}.
789      *
790      * @throws Exception if the test fails
791      */
792     @Test
793     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLCanvasElement]")
794     public void canvas() throws Exception {
795         test("canvas");
796     }
797 
798     /**
799      * Test {@link org.htmlunit.html.HtmlCaption}.
800      *
801      * @throws Exception if the test fails
802      */
803     @Test
804     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTableCaptionElement]")
805     public void caption() throws Exception {
806         test("caption");
807     }
808 
809     /**
810      * Test {@link org.htmlunit.html.HtmlCenter}.
811      *
812      * @throws Exception if the test fails
813      */
814     @Test
815     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
816     public void center() throws Exception {
817         test("center");
818     }
819 
820     /**
821      * Test {@link org.htmlunit.html.HtmlCitation}.
822      *
823      * @throws Exception if the test fails
824      */
825     @Test
826     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
827     public void cite() throws Exception {
828         test("cite");
829     }
830 
831     /**
832      * Test {@link org.htmlunit.html.HtmlCode}.
833      *
834      * @throws Exception if the test fails
835      */
836     @Test
837     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
838     public void code() throws Exception {
839         test("code");
840     }
841 
842     /**
843      * Test {@link org.htmlunit.html.HtmlCommand}.
844      *
845      * @throws Exception if the test fails
846      */
847     @Test
848     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
849     public void command() throws Exception {
850         test("command");
851     }
852 
853     /**
854      * Test {@link org.htmlunit.html.HtmlDataList}.
855      *
856      * @throws Exception if the test fails
857      */
858     @Test
859     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLDataListElement]")
860     public void datalist() throws Exception {
861         test("datalist");
862     }
863 
864     /**
865      * Test {@link org.htmlunit.html.HtmlDefinition}.
866      *
867      * @throws Exception if the test fails
868      */
869     @Test
870     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
871     public void dfn() throws Exception {
872         test("dfn");
873     }
874 
875     /**
876      * Test {@link org.htmlunit.html.HtmlDefinitionDescription}.
877      *
878      * @throws Exception if the test fails
879      */
880     @Test
881     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
882     public void dd() throws Exception {
883         test("dd");
884     }
885 
886     /**
887      * Test {@link org.htmlunit.html.HtmlDeletedText}.
888      *
889      * @throws Exception if the test fails
890      */
891     @Test
892     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLModElement]")
893     public void del() throws Exception {
894         test("del");
895     }
896 
897     /**
898      * Test {@link org.htmlunit.html.HtmlDetails}.
899      *
900      * @throws Exception if the test fails
901      */
902     @Test
903     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLDetailsElement]")
904     public void details() throws Exception {
905         test("details");
906     }
907 
908     /**
909      * Test {@link org.htmlunit.html.HtmlDialog}.
910      *
911      * @throws Exception if the test fails
912      */
913     @Test
914     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLDialogElement]")
915     public void dialog() throws Exception {
916         test("dialog");
917     }
918 
919     /**
920      * Test {@link org.htmlunit.html.HtmlDirectory}.
921      *
922      * @throws Exception if the test fails
923      */
924     @Test
925     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLDirectoryElement]")
926     public void dir() throws Exception {
927         test("dir");
928     }
929 
930     /**
931      * Test {@link org.htmlunit.html.HtmlDivision}.
932      *
933      * @throws Exception if the test fails
934      */
935     @Test
936     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLDivElement]")
937     public void div() throws Exception {
938         test("div");
939     }
940 
941     /**
942      * Test {@link org.htmlunit.html.HtmlDefinitionList}.
943      *
944      * @throws Exception if the test fails
945      */
946     @Test
947     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLDListElement]")
948     public void dl() throws Exception {
949         test("dl");
950     }
951 
952     /**
953      * Test {@link org.htmlunit.html.HtmlDefinitionTerm}.
954      *
955      * @throws Exception if the test fails
956      */
957     @Test
958     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
959     public void dt() throws Exception {
960         test("dt");
961     }
962 
963     /**
964      * Test {@link org.htmlunit.html.HtmlEmbed}.
965      *
966      * @throws Exception if the test fails
967      */
968     @Test
969     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLEmbedElement]")
970     public void embed() throws Exception {
971         test("embed");
972     }
973 
974     /**
975      * Test {@link org.htmlunit.html.HtmlEmphasis}.
976      *
977      * @throws Exception if the test fails
978      */
979     @Test
980     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
981     public void em() throws Exception {
982         test("em");
983     }
984 
985     /**
986      * Test {@link org.htmlunit.html.HtmlFieldSet}.
987      *
988      * @throws Exception if the test fails
989      */
990     @Test
991     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLFieldSetElement]")
992     public void fieldset() throws Exception {
993         test("fieldset");
994     }
995 
996     /**
997      * Test {@link org.htmlunit.html.HtmlFigureCaption}.
998      *
999      * @throws Exception if the test fails
1000      */
1001     @Test
1002     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1003     public void figcaption() throws Exception {
1004         test("figcaption");
1005     }
1006 
1007     /**
1008      * Test {@link org.htmlunit.html.HtmlFigure}.
1009      *
1010      * @throws Exception if the test fails
1011      */
1012     @Test
1013     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1014     public void figure() throws Exception {
1015         test("figure");
1016     }
1017 
1018     /**
1019      * Test {@link org.htmlunit.html.HtmlFont}.
1020      *
1021      * @throws Exception if the test fails
1022      */
1023     @Test
1024     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLFontElement]")
1025     public void font() throws Exception {
1026         test("font");
1027     }
1028 
1029     /**
1030      * Test {@link org.htmlunit.html.HtmlForm}.
1031      *
1032      * @throws Exception if the test fails
1033      */
1034     @Test
1035     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [HTMLFormElement]")
1036     public void form() throws Exception {
1037         test("form");
1038     }
1039 
1040     /**
1041      * Test {@link org.htmlunit.javascript.host.xml.FormData}.
1042      *
1043      * @throws Exception if the test fails
1044      */
1045     @Test
1046     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [FormData]")
1047     public void formData() throws Exception {
1048         testString("", "new FormData()");
1049     }
1050 
1051     /**
1052      * Test {@link org.htmlunit.html.HtmlFooter}.
1053      *
1054      * @throws Exception if the test fails
1055      */
1056     @Test
1057     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1058     public void footer() throws Exception {
1059         test("footer");
1060     }
1061 
1062     /**
1063      * Test {@link org.htmlunit.html.HtmlFrame}.
1064      *
1065      * @throws Exception if the test fails
1066      */
1067     @Test
1068     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLFrameElement]")
1069     public void frame() throws Exception {
1070         test("frame");
1071     }
1072 
1073     /**
1074      * Test {@link org.htmlunit.html.HtmlFrameSet}.
1075      *
1076      * @throws Exception if the test fails
1077      */
1078     @Test
1079     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLFrameSetElement]")
1080     public void frameset() throws Exception {
1081         test("frameset");
1082     }
1083 
1084     /**
1085      * Test {@link org.htmlunit.html.HtmlHead}.
1086      *
1087      * @throws Exception if the test fails
1088      */
1089     @Test
1090     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLHeadElement]")
1091     public void head() throws Exception {
1092         test("head");
1093     }
1094 
1095     /**
1096      * Test {@link org.htmlunit.html.HtmlHeader}.
1097      *
1098      * @throws Exception if the test fails
1099      */
1100     @Test
1101     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1102     public void header() throws Exception {
1103         test("header");
1104     }
1105 
1106     /**
1107      * Test {@link org.htmlunit.html.HtmlHeading1}.
1108      *
1109      * @throws Exception if the test fails
1110      */
1111     @Test
1112     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLHeadingElement]")
1113     public void h1() throws Exception {
1114         test("h1");
1115     }
1116 
1117     /**
1118      * Test {@link org.htmlunit.html.HtmlHeading2}.
1119      *
1120      * @throws Exception if the test fails
1121      */
1122     @Test
1123     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLHeadingElement]")
1124     public void h2() throws Exception {
1125         test("h2");
1126     }
1127 
1128     /**
1129      * Test {@link org.htmlunit.html.HtmlHeading3}.
1130      *
1131      * @throws Exception if the test fails
1132      */
1133     @Test
1134     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLHeadingElement]")
1135     public void h3() throws Exception {
1136         test("h3");
1137     }
1138 
1139     /**
1140      * Test {@link org.htmlunit.html.HtmlHeading4}.
1141      *
1142      * @throws Exception if the test fails
1143      */
1144     @Test
1145     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLHeadingElement]")
1146     public void h4() throws Exception {
1147         test("h4");
1148     }
1149 
1150     /**
1151      * Test {@link org.htmlunit.html.HtmlHeading5}.
1152      *
1153      * @throws Exception if the test fails
1154      */
1155     @Test
1156     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLHeadingElement]")
1157     public void h5() throws Exception {
1158         test("h5");
1159     }
1160 
1161     /**
1162      * Test {@link org.htmlunit.html.HtmlHeading6}.
1163      *
1164      * @throws Exception if the test fails
1165      */
1166     @Test
1167     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLHeadingElement]")
1168     public void h6() throws Exception {
1169         test("h6");
1170     }
1171 
1172     /**
1173      * Test {@link org.htmlunit.html.HtmlHorizontalRule}.
1174      *
1175      * @throws Exception if the test fails
1176      */
1177     @Test
1178     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLHRElement]")
1179     public void hr() throws Exception {
1180         test("hr");
1181     }
1182 
1183     /**
1184      * Test {@link org.htmlunit.html.HtmlHtml}.
1185      *
1186      * @throws Exception if the test fails
1187      */
1188     @Test
1189     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLHtmlElement]")
1190     public void html() throws Exception {
1191         test("html");
1192     }
1193 
1194     /**
1195      * Test {@link org.htmlunit.html.HtmlInlineFrame}.
1196      *
1197      * @throws Exception if the test fails
1198      */
1199     @Test
1200     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLIFrameElement]")
1201     public void iframe() throws Exception {
1202         test("iframe");
1203     }
1204 
1205     /**
1206      * Test {@link org.htmlunit.html.HtmlInlineQuotation}.
1207      *
1208      * @throws Exception if the test fails
1209      */
1210     @Test
1211     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLQuoteElement]")
1212     public void q() throws Exception {
1213         test("q");
1214     }
1215 
1216     /**
1217      * Test {@link org.htmlunit.html.HtmlImage}.
1218      *
1219      * @throws Exception if the test fails
1220      */
1221     @Test
1222     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLImageElement]")
1223     public void img() throws Exception {
1224         test("img");
1225     }
1226 
1227     /**
1228      * Test {@link org.htmlunit.html.HtmlImage}.
1229      *
1230      * @throws Exception if the test fails
1231      */
1232     @Test
1233     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]",
1234             FF = "Symbol(Symbol.toStringTag) [C] [HTMLElement]",
1235             FF_ESR = "Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1236     public void image() throws Exception {
1237         test("image");
1238     }
1239 
1240     /**
1241      * Test {@link org.htmlunit.html.HtmlInsertedText}.
1242      *
1243      * @throws Exception if the test fails
1244      */
1245     @Test
1246     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLModElement]")
1247     public void ins() throws Exception {
1248         test("ins");
1249     }
1250 
1251     /**
1252      * Test {@link org.htmlunit.html.HtmlIsIndex}.
1253      *
1254      * @throws Exception if the test fails
1255      */
1256     @Test
1257     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
1258     public void isindex() throws Exception {
1259         test("isindex");
1260     }
1261 
1262     /**
1263      * Test {@link org.htmlunit.html.HtmlItalic}.
1264      *
1265      * @throws Exception if the test fails
1266      */
1267     @Test
1268     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1269     public void i() throws Exception {
1270         test("i");
1271     }
1272 
1273     /**
1274      * Test {@link org.htmlunit.html.HtmlKeyboard}.
1275      *
1276      * @throws Exception if the test fails
1277      */
1278     @Test
1279     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1280     public void kbd() throws Exception {
1281         test("kbd");
1282     }
1283 
1284     /**
1285      * @throws Exception if the test fails
1286      */
1287     @Test
1288     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
1289     public void keygen() throws Exception {
1290         test("keygen");
1291     }
1292 
1293     /**
1294      * Test {@link org.htmlunit.html.HtmlLabel}.
1295      *
1296      * @throws Exception if the test fails
1297      */
1298     @Test
1299     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLLabelElement]")
1300     public void label() throws Exception {
1301         test("label");
1302     }
1303 
1304     /**
1305      * Test {@link org.htmlunit.html.HtmlLayer}.
1306      *
1307      * @throws Exception if the test fails
1308      */
1309     @Test
1310     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [HTMLElement]",
1311             FF = "Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]",
1312             FF_ESR = "Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
1313     public void layer() throws Exception {
1314         test("layer");
1315     }
1316 
1317     /**
1318      * Test {@link org.htmlunit.html.HtmlLegend}.
1319      *
1320      * @throws Exception if the test fails
1321      */
1322     @Test
1323     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLLegendElement]")
1324     public void legend() throws Exception {
1325         test("legend");
1326     }
1327 
1328     /**
1329      * Test {@link org.htmlunit.html.HtmlListing}.
1330      *
1331      * @throws Exception if the test fails
1332      */
1333     @Test
1334     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLPreElement]")
1335     public void listing() throws Exception {
1336         test("listing");
1337     }
1338 
1339     /**
1340      * Test {@link org.htmlunit.html.HtmlListItem}.
1341      *
1342      * @throws Exception if the test fails
1343      */
1344     @Test
1345     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLLIElement]")
1346     public void li() throws Exception {
1347         test("li");
1348     }
1349 
1350     /**
1351      * Test {@link org.htmlunit.html.HtmlLink}.
1352      *
1353      * @throws Exception if the test fails
1354      */
1355     @Test
1356     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLLinkElement]")
1357     public void link() throws Exception {
1358         test("link");
1359     }
1360 
1361     /**
1362      * Test {@link org.htmlunit.html.HtmlMain}.
1363      *
1364      * @throws Exception if the test fails
1365      */
1366     @Test
1367     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1368     public void main() throws Exception {
1369         test("main");
1370     }
1371 
1372     /**
1373      * Test {@link org.htmlunit.html.HtmlMap}.
1374      *
1375      * @throws Exception if the test fails
1376      */
1377     @Test
1378     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLMapElement]")
1379     public void map() throws Exception {
1380         test("map");
1381     }
1382 
1383     /**
1384      * Test {@link org.htmlunit.html.HtmlMark}.
1385      *
1386      * @throws Exception if the test fails
1387      */
1388     @Test
1389     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1390     public void mark() throws Exception {
1391         test("mark");
1392     }
1393 
1394     /**
1395      * Test {@link org.htmlunit.html.HtmlMarquee}.
1396      *
1397      * @throws Exception if the test fails
1398      */
1399     @Test
1400     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLMarqueeElement]")
1401     public void marquee() throws Exception {
1402         test("marquee");
1403     }
1404 
1405     /**
1406      * Test {@link org.htmlunit.html.HtmlMenu}.
1407      *
1408      * @throws Exception if the test fails
1409      */
1410     @Test
1411     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLMenuElement]")
1412     public void menu() throws Exception {
1413         test("menu");
1414     }
1415 
1416     /**
1417      * Test {@link org.htmlunit.html.HtmlMenuItem}.
1418      *
1419      * @throws Exception if the test fails
1420      */
1421     @Test
1422     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
1423     public void menuitem() throws Exception {
1424         test("menuitem");
1425     }
1426 
1427     /**
1428      * Test {@link org.htmlunit.html.HtmlMeta}.
1429      *
1430      * @throws Exception if the test fails
1431      */
1432     @Test
1433     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLMetaElement]")
1434     public void meta() throws Exception {
1435         test("meta");
1436     }
1437 
1438     /**
1439      * Test {@link org.htmlunit.html.HtmlMeter}.
1440      *
1441      * @throws Exception if the test fails
1442      */
1443     @Test
1444     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLMeterElement]")
1445     public void meter() throws Exception {
1446         test("meter");
1447     }
1448 
1449     /**
1450      * Test {@link org.htmlunit.html.HtmlMultiColumn}.
1451      *
1452      * @throws Exception if the test fails
1453      */
1454     @Test
1455     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
1456     public void multicol() throws Exception {
1457         test("multicol");
1458     }
1459 
1460     /**
1461      * Test {@link org.htmlunit.html.HtmlNav}.
1462      *
1463      * @throws Exception if the test fails
1464      */
1465     @Test
1466     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1467     public void nav() throws Exception {
1468         test("nav");
1469     }
1470 
1471     /**
1472      * Test {@link org.htmlunit.html.HtmlNextId}.
1473      *
1474      * @throws Exception if the test fails
1475      */
1476     @Test
1477     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
1478     public void nextid() throws Exception {
1479         test("nextid");
1480     }
1481 
1482     /**
1483      * Test {@link org.htmlunit.html.HtmlNoBreak}.
1484      *
1485      * @throws Exception if the test fails
1486      */
1487     @Test
1488     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1489     public void nobr() throws Exception {
1490         test("nobr");
1491     }
1492 
1493     /**
1494      * Test {@link org.htmlunit.html.HtmlNoEmbed}.
1495      *
1496      * @throws Exception if the test fails
1497      */
1498     @Test
1499     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1500     public void noembed() throws Exception {
1501         test("noembed");
1502     }
1503 
1504     /**
1505      * Test {@link org.htmlunit.html.HtmlNoFrames}.
1506      *
1507      * @throws Exception if the test fails
1508      */
1509     @Test
1510     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1511     public void noframes() throws Exception {
1512         test("noframes");
1513     }
1514 
1515     /**
1516      * Test {@link org.htmlunit.html.HtmlNoLayer}.
1517      *
1518      * @throws Exception if the test fails
1519      */
1520     @Test
1521     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [HTMLElement]",
1522             FF = "Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]",
1523             FF_ESR = "Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
1524     public void nolayer() throws Exception {
1525         test("nolayer");
1526     }
1527 
1528     /**
1529      * Test {@link org.htmlunit.html.HtmlNoScript}.
1530      *
1531      * @throws Exception if the test fails
1532      */
1533     @Test
1534     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1535     public void noscript() throws Exception {
1536         test("noscript");
1537     }
1538 
1539     /**
1540      * Test {@link org.htmlunit.html.HtmlObject}.
1541      *
1542      * @throws Exception if the test fails
1543      */
1544     @Test
1545     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLObjectElement]")
1546     public void object() throws Exception {
1547         test("object");
1548     }
1549 
1550     /**
1551      * Test {@link org.htmlunit.html.HtmlOrderedList}.
1552      *
1553      * @throws Exception if the test fails
1554      */
1555     @Test
1556     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLOListElement]")
1557     public void ol() throws Exception {
1558         test("ol");
1559     }
1560 
1561     /**
1562      * Test {@link org.htmlunit.html.HtmlOptionGroup}.
1563      *
1564      * @throws Exception if the test fails
1565      */
1566     @Test
1567     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLOptGroupElement]")
1568     public void optgroup() throws Exception {
1569         test("optgroup");
1570     }
1571 
1572     /**
1573      * Test {@link org.htmlunit.html.HtmlOption}.
1574      *
1575      * @throws Exception if the test fails
1576      */
1577     @Test
1578     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLOptionElement]")
1579     public void option() throws Exception {
1580         test("option");
1581     }
1582 
1583     /**
1584      * Test {@link org.htmlunit.html.HtmlOutput}.
1585      *
1586      * @throws Exception if the test fails
1587      */
1588     @Test
1589     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLOutputElement]")
1590     public void output() throws Exception {
1591         test("output");
1592     }
1593 
1594     /**
1595      * Test {@link org.htmlunit.html.HtmlParagraph}.
1596      *
1597      * @throws Exception if the test fails
1598      */
1599     @Test
1600     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLParagraphElement]")
1601     public void p() throws Exception {
1602         test("p");
1603     }
1604 
1605     /**
1606      * Test {@link org.htmlunit.html.HtmlParameter}.
1607      *
1608      * @throws Exception if the test fails
1609      */
1610     @Test
1611     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLParamElement]")
1612     public void param() throws Exception {
1613         test("param");
1614     }
1615 
1616     /**
1617      * Test {@link Performance}.
1618      *
1619      * @throws Exception if the test fails
1620      */
1621     @Test
1622     @Alerts("Symbol(Symbol.toStringTag) [C] [Performance]")
1623     public void performance() throws Exception {
1624         testString("", "performance");
1625     }
1626 
1627     /**
1628      * Test {@link org.htmlunit.html.HtmlPlainText}.
1629      *
1630      * @throws Exception if the test fails
1631      */
1632     @Test
1633     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1634     public void plaintext() throws Exception {
1635         test("plaintext");
1636     }
1637 
1638     /**
1639      * Test {@link org.htmlunit.html.HtmlPreformattedText}.
1640      *
1641      * @throws Exception if the test fails
1642      */
1643     @Test
1644     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLPreElement]")
1645     public void pre() throws Exception {
1646         test("pre");
1647     }
1648 
1649     /**
1650      * Test {@link org.htmlunit.html.HtmlProgress}.
1651      *
1652      * @throws Exception if the test fails
1653      */
1654     @Test
1655     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLProgressElement]")
1656     public void progress() throws Exception {
1657         test("progress");
1658     }
1659 
1660     /**
1661      * Test {@link org.htmlunit.html.HtmlRb}.
1662      *
1663      * @throws Exception if the test fails
1664      */
1665     @Test
1666     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1667     public void rb() throws Exception {
1668         test("rb");
1669     }
1670 
1671     /**
1672      * Test HtmlRbc.
1673      *
1674      * @throws Exception if the test fails
1675      */
1676     @Test
1677     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
1678     public void rbc() throws Exception {
1679         test("rbc");
1680     }
1681 
1682     /**
1683      * Test {@link org.htmlunit.html.HtmlRp}.
1684      *
1685      * @throws Exception if the test fails
1686      */
1687     @Test
1688     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1689     public void rp() throws Exception {
1690         test("rp");
1691     }
1692 
1693     /**
1694      * Test {@link org.htmlunit.html.HtmlRt}.
1695      *
1696      * @throws Exception if the test fails
1697      */
1698     @Test
1699     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1700     public void rt() throws Exception {
1701         test("rt");
1702     }
1703 
1704     /**
1705      * Test {@link org.htmlunit.html.HtmlRtc}.
1706      *
1707      * @throws Exception if the test fails
1708      */
1709     @Test
1710     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1711     public void rtc() throws Exception {
1712         test("rtc");
1713     }
1714 
1715     /**
1716      * Test {@link org.htmlunit.html.HtmlRuby}.
1717      *
1718      * @throws Exception if the test fails
1719      */
1720     @Test
1721     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1722     public void ruby() throws Exception {
1723         test("ruby");
1724     }
1725 
1726     /**
1727      * Test {@link org.htmlunit.html.HtmlS}.
1728      *
1729      * @throws Exception if the test fails
1730      */
1731     @Test
1732     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1733     public void s() throws Exception {
1734         test("s");
1735     }
1736 
1737     /**
1738      * Test {@link org.htmlunit.html.HtmlSample}.
1739      *
1740      * @throws Exception if the test fails
1741      */
1742     @Test
1743     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1744     public void samp() throws Exception {
1745         test("samp");
1746     }
1747 
1748     /**
1749      * Test {@link org.htmlunit.html.HtmlScript}.
1750      *
1751      * @throws Exception if the test fails
1752      */
1753     @Test
1754     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLScriptElement]")
1755     public void script() throws Exception {
1756         test("script");
1757     }
1758 
1759     /**
1760      * Test {@link org.htmlunit.html.HtmlSection}.
1761      *
1762      * @throws Exception if the test fails
1763      */
1764     @Test
1765     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1766     public void section() throws Exception {
1767         test("section");
1768     }
1769 
1770     /**
1771      * Test {@link org.htmlunit.html.HtmlSelect}.
1772      *
1773      * @throws Exception if the test fails
1774      */
1775     @Test
1776     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [HTMLSelectElement]")
1777     public void select() throws Exception {
1778         test("select");
1779     }
1780 
1781     /**
1782      * Test {@link org.htmlunit.html.HtmlSelect}.
1783      *
1784      * @throws Exception if the test fails
1785      */
1786     @Test
1787     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [HTMLOptionsCollection]")
1788     public void optionsCollection() throws Exception {
1789         testString("var sel = document.createElement('select')", "sel.options");
1790     }
1791 
1792     /**
1793      * Test {@link org.htmlunit.html.HtmlSmall}.
1794      *
1795      * @throws Exception if the test fails
1796      */
1797     @Test
1798     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1799     public void small() throws Exception {
1800         test("small");
1801     }
1802 
1803     /**
1804      * Test {@link org.htmlunit.html.HtmlSource}.
1805      *
1806      * @throws Exception if the test fails
1807      */
1808     @Test
1809     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLSourceElement]")
1810     public void source() throws Exception {
1811         test("source");
1812     }
1813 
1814     /**
1815      * Test {@link org.htmlunit.html.HtmlSpan}.
1816      *
1817      * @throws Exception if the test fails
1818      */
1819     @Test
1820     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLSpanElement]")
1821     public void span() throws Exception {
1822         test("span");
1823     }
1824 
1825     /**
1826      * Test {@link org.htmlunit.html.HtmlStrike}.
1827      *
1828      * @throws Exception if the test fails
1829      */
1830     @Test
1831     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1832     public void strike() throws Exception {
1833         test("strike");
1834     }
1835 
1836     /**
1837      * Test {@link org.htmlunit.html.HtmlStrong}.
1838      *
1839      * @throws Exception if the test fails
1840      */
1841     @Test
1842     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1843     public void strong() throws Exception {
1844         test("strong");
1845     }
1846 
1847     /**
1848      * Test {@link org.htmlunit.html.HtmlStyle}.
1849      *
1850      * @throws Exception if the test fails
1851      */
1852     @Test
1853     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLStyleElement]")
1854     public void style() throws Exception {
1855         test("style");
1856     }
1857 
1858     /**
1859      * Test {@link org.htmlunit.html.HtmlSubscript}.
1860      *
1861      * @throws Exception if the test fails
1862      */
1863     @Test
1864     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1865     public void sub() throws Exception {
1866         test("sub");
1867     }
1868 
1869     /**
1870      * Test {@link org.htmlunit.html.HtmlSummary}.
1871      *
1872      * @throws Exception if the test fails
1873      */
1874     @Test
1875     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1876     public void summary() throws Exception {
1877         test("summary");
1878     }
1879 
1880     /**
1881      * Test {@link org.htmlunit.html.HtmlSuperscript}.
1882      *
1883      * @throws Exception if the test fails
1884      */
1885     @Test
1886     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
1887     public void sup() throws Exception {
1888         test("sup");
1889     }
1890 
1891     /**
1892      * Test {@link org.htmlunit.html.HtmlSvg}.
1893      *
1894      * @throws Exception if the test fails
1895      */
1896     @Test
1897     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
1898     public void svg() throws Exception {
1899         test("svg");
1900     }
1901 
1902     /**
1903      * Test {@link org.htmlunit.html.HtmlTable}.
1904      *
1905      * @throws Exception if the test fails
1906      */
1907     @Test
1908     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTableElement]")
1909     public void table() throws Exception {
1910         test("table");
1911     }
1912 
1913     /**
1914      * Test {@link org.htmlunit.html.HtmlTableColumn}.
1915      *
1916      * @throws Exception if the test fails
1917      */
1918     @Test
1919     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTableColElement]")
1920     public void col() throws Exception {
1921         test("col");
1922     }
1923 
1924     /**
1925      * Test {@link org.htmlunit.html.HtmlTableColumnGroup}.
1926      *
1927      * @throws Exception if the test fails
1928      */
1929     @Test
1930     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTableColElement]")
1931     public void colgroup() throws Exception {
1932         test("colgroup");
1933     }
1934 
1935     /**
1936      * Test {@link org.htmlunit.html.HtmlTableBody}.
1937      *
1938      * @throws Exception if the test fails
1939      */
1940     @Test
1941     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTableSectionElement]")
1942     public void tbody() throws Exception {
1943         test("tbody");
1944     }
1945 
1946     /**
1947      * Test {@link org.htmlunit.html.HtmlTableDataCell}.
1948      *
1949      * @throws Exception if the test fails
1950      */
1951     @Test
1952     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTableCellElement]")
1953     public void td() throws Exception {
1954         test("td");
1955     }
1956 
1957     /**
1958      * Test {@link org.htmlunit.html.HtmlTableHeaderCell}.
1959      *
1960      * @throws Exception if the test fails
1961      */
1962     @Test
1963     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTableCellElement]")
1964     public void th() throws Exception {
1965         test("th");
1966     }
1967 
1968     /**
1969      * Test {@link org.htmlunit.html.HtmlTableRow}.
1970      *
1971      * @throws Exception if the test fails
1972      */
1973     @Test
1974     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTableRowElement]")
1975     public void tr() throws Exception {
1976         test("tr");
1977     }
1978 
1979     /**
1980      * Test {@link org.htmlunit.html.HtmlTextArea}.
1981      *
1982      * @throws Exception if the test fails
1983      */
1984     @Test
1985     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTextAreaElement]")
1986     public void textarea() throws Exception {
1987         test("textarea");
1988     }
1989 
1990     /**
1991      * Test {@link org.htmlunit.html.HtmlTableFooter}.
1992      *
1993      * @throws Exception if the test fails
1994      */
1995     @Test
1996     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTableSectionElement]")
1997     public void tfoot() throws Exception {
1998         test("tfoot");
1999     }
2000 
2001     /**
2002      * Test {@link org.htmlunit.html.HtmlTableHeader}.
2003      *
2004      * @throws Exception if the test fails
2005      */
2006     @Test
2007     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTableSectionElement]")
2008     public void thead() throws Exception {
2009         test("thead");
2010     }
2011 
2012     /**
2013      * Test {@link org.htmlunit.html.HtmlTeletype}.
2014      *
2015      * @throws Exception if the test fails
2016      */
2017     @Test
2018     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
2019     public void tt() throws Exception {
2020         test("tt");
2021     }
2022 
2023     /**
2024      * Test {@link org.htmlunit.html.HtmlTime}.
2025      *
2026      * @throws Exception if the test fails
2027      */
2028     @Test
2029     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTimeElement]")
2030     public void time() throws Exception {
2031         test("time");
2032     }
2033 
2034     /**
2035      * Test {@link org.htmlunit.html.HtmlTitle}.
2036      *
2037      * @throws Exception if the test fails
2038      */
2039     @Test
2040     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTitleElement]")
2041     public void title() throws Exception {
2042         test("title");
2043     }
2044 
2045     /**
2046      * Test {@link org.htmlunit.html.HtmlTrack}.
2047      *
2048      * @throws Exception if the test fails
2049      */
2050     @Test
2051     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTrackElement]")
2052     public void track() throws Exception {
2053         test("track");
2054     }
2055 
2056     /**
2057      * Test {@link org.htmlunit.html.HtmlUnderlined}.
2058      *
2059      * @throws Exception if the test fails
2060      */
2061     @Test
2062     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
2063     public void u() throws Exception {
2064         test("u");
2065     }
2066 
2067     /**
2068      * Test {@link org.htmlunit.html.HtmlUnorderedList}.
2069      *
2070      * @throws Exception if the test fails
2071      */
2072     @Test
2073     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUListElement]")
2074     public void ul() throws Exception {
2075         test("ul");
2076     }
2077 
2078     /**
2079      * Test {@link org.htmlunit.html.HtmlVariable}.
2080      *
2081      * @throws Exception if the test fails
2082      */
2083     @Test
2084     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
2085     public void var() throws Exception {
2086         test("var");
2087     }
2088 
2089     /**
2090      * Test {@link org.htmlunit.html.HtmlVideo}.
2091      *
2092      * @throws Exception if the test fails
2093      */
2094     @Test
2095     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLVideoElement]")
2096     public void video() throws Exception {
2097         test("video");
2098     }
2099 
2100     /**
2101      * Test {@link org.htmlunit.html.HtmlWordBreak}.
2102      *
2103      * @throws Exception if the test fails
2104      */
2105     @Test
2106     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLElement]")
2107     public void wbr() throws Exception {
2108         test("wbr");
2109     }
2110 
2111     /**
2112      * Test {@link org.htmlunit.html.HtmlExample}.
2113      *
2114      * @throws Exception if the test fails
2115      */
2116     @Test
2117     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLPreElement]")
2118     public void xmp() throws Exception {
2119         test("xmp");
2120     }
2121 
2122     /**
2123      * Test {@link org.htmlunit.html.HtmlInput}.
2124      *
2125      * @throws Exception if the test fails
2126      */
2127     @Test
2128     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLInputElement]")
2129     public void input() throws Exception {
2130         test("input");
2131     }
2132 
2133     /**
2134      * Test {@link org.htmlunit.html.HtmlData}.
2135      *
2136      * @throws Exception if the test fails
2137      */
2138     @Test
2139     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLDataElement]")
2140     public void data() throws Exception {
2141         test("data");
2142     }
2143 
2144     /**
2145      * Test HtmlContent.
2146      *
2147      * @throws Exception if the test fails
2148      */
2149     @Test
2150     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLUnknownElement]")
2151     public void content() throws Exception {
2152         test("content");
2153     }
2154 
2155     /**
2156      * Test {@link org.htmlunit.html.HtmlPicture}.
2157      *
2158      * @throws Exception if the test fails
2159      */
2160     @Test
2161     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLPictureElement]")
2162     public void picutre() throws Exception {
2163         test("picture");
2164     }
2165 
2166     /**
2167      * Test {@link org.htmlunit.html.HtmlTemplate}.
2168      *
2169      * @throws Exception if the test fails
2170      */
2171     @Test
2172     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLTemplateElement]")
2173     public void template() throws Exception {
2174         test("template");
2175     }
2176 
2177     /**
2178      * Test {@link org.htmlunit.javascript.host.event.KeyboardEvent}.
2179      *
2180      * @throws Exception if the test fails
2181      */
2182     @Test
2183     @Alerts("Symbol(Symbol.toStringTag) [C] [KeyboardEvent]")
2184     public void keyboardEvent() throws Exception {
2185         testString("", "document.createEvent('KeyboardEvent')");
2186     }
2187 
2188     /**
2189      * Test {@link org.htmlunit.javascript.host.event.UIEvent}.
2190      *
2191      * @throws Exception if the test fails
2192      */
2193     @Test
2194     @Alerts("Symbol(Symbol.toStringTag) [C] [Event]")
2195     public void event2() throws Exception {
2196         testString("", "document.createEvent('Event')");
2197     }
2198 
2199     /**
2200      * Test {@link org.htmlunit.javascript.host.event.UIEvent}.
2201      *
2202      * @throws Exception if the test fails
2203      */
2204     @Test
2205     @Alerts("Symbol(Symbol.toStringTag) [C] [UIEvent]")
2206     public void uiEvent() throws Exception {
2207         testString("", "document.createEvent('UIEvent')");
2208     }
2209 
2210     /**
2211      * Test {@link org.htmlunit.javascript.host.URL}.
2212      *
2213      * @throws Exception if the test fails
2214      */
2215     @Test
2216     @Alerts("Symbol(Symbol.toStringTag) [C] [URL]")
2217     public void url() throws Exception {
2218         testString("", "new URL('http://developer.mozilla.org')");
2219     }
2220 
2221     /**
2222      * Test {@link org.htmlunit.javascript.host.URL}.
2223      *
2224      * @throws Exception if the test fails
2225      */
2226     @Test
2227     @Alerts("Symbol(Symbol.toStringTag) [C] [URL]")
2228     public void webkitURL() throws Exception {
2229         testString("", "new webkitURL('http://developer.mozilla.org')");
2230     }
2231 
2232     /**
2233      * Test {@link org.htmlunit.javascript.host.event.DragEvent}.
2234      *
2235      * @throws Exception if the test fails
2236      */
2237     @Test
2238     @Alerts("Symbol(Symbol.toStringTag) [C] [DragEvent]")
2239     public void dragEvent() throws Exception {
2240         testString("", "document.createEvent('DragEvent')");
2241     }
2242 
2243     /**
2244      * Test {@link org.htmlunit.javascript.host.event.PointerEvent}.
2245      *
2246      * @throws Exception if the test fails
2247      */
2248     @Test
2249     @Alerts("Symbol(Symbol.toStringTag) [C] [PointerEvent]")
2250     public void pointerEvent() throws Exception {
2251         testString("", "new PointerEvent('click')");
2252     }
2253 
2254     /**
2255      * Test {@link org.htmlunit.javascript.host.event.PointerEvent}.
2256      *
2257      * @throws Exception if the test fails
2258      */
2259     @Test
2260     @Alerts("NotSupportedError/DOMException")
2261     public void pointerEvent2() throws Exception {
2262         testString("", " document.createEvent('PointerEvent')");
2263     }
2264 
2265     /**
2266      * Test {@link org.htmlunit.javascript.host.event.WheelEvent}.
2267      *
2268      * @throws Exception if the test fails
2269      */
2270     @Test
2271     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [WheelEvent]",
2272             FF = "NotSupportedError/DOMException",
2273             FF_ESR = "NotSupportedError/DOMException")
2274     public void wheelEvent() throws Exception {
2275         testString("", "document.createEvent('WheelEvent')");
2276     }
2277 
2278     /**
2279      * Test {@link org.htmlunit.javascript.host.event.MouseEvent}.
2280      *
2281      * @throws Exception if the test fails
2282      */
2283     @Test
2284     @Alerts("Symbol(Symbol.toStringTag) [C] [MouseEvent]")
2285     public void mouseEvent() throws Exception {
2286         testString("", "document.createEvent('MouseEvent')");
2287     }
2288 
2289 
2290 
2291     /**
2292      * Test {@link org.htmlunit.javascript.host.event.CompositionEvent}.
2293      *
2294      * @throws Exception if the test fails
2295      */
2296     @Test
2297     @Alerts("Symbol(Symbol.toStringTag) [C] [CompositionEvent]")
2298     public void compositionEvent() throws Exception {
2299         testString("", "document.createEvent('CompositionEvent')");
2300     }
2301 
2302     /**
2303      * Test {@link org.htmlunit.javascript.host.event.FocusEvent}.
2304      *
2305      * @throws Exception if the test fails
2306      */
2307     @Test
2308     @Alerts("Symbol(Symbol.toStringTag) [C] [FocusEvent]")
2309     public void focusEvent() throws Exception {
2310         testString("", "document.createEvent('FocusEvent')");
2311     }
2312 
2313     /**
2314      * Test {@link org.htmlunit.javascript.host.event.InputEvent}.
2315      *
2316      * @throws Exception if the test fails
2317      */
2318     @Test
2319     @Alerts("Symbol(Symbol.toStringTag) [C] [InputEvent]")
2320     public void inputEvent() throws Exception {
2321         testString("", "new InputEvent('input')");
2322     }
2323 
2324     /**
2325      * Test {@link org.htmlunit.javascript.host.event.MouseWheelEvent}.
2326      *
2327      * @throws Exception if the test fails
2328      */
2329     @Test
2330     @Alerts("NotSupportedError/DOMException")
2331     public void mouseWheelEvent() throws Exception {
2332         testString("", "document.createEvent('MouseWheelEvent')");
2333     }
2334 
2335     /**
2336      * Test {@link org.htmlunit.javascript.host.event.SVGZoomEvent}.
2337      *
2338      * @throws Exception if the test fails
2339      */
2340     @Test
2341     @Alerts("NotSupportedError/DOMException")
2342     public void svgZoomEvent() throws Exception {
2343         testString("", "document.createEvent('SVGZoomEvent')");
2344     }
2345 
2346     /**
2347      * Test {@link org.htmlunit.javascript.host.event.TextEvent}.
2348      *
2349      * @throws Exception if the test fails
2350      */
2351     @Test
2352     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [TextEvent]",
2353             FF_ESR = "Symbol(Symbol.toStringTag) [C] [CompositionEvent]")
2354     public void textEvent() throws Exception {
2355         testString("", "document.createEvent('TextEvent')");
2356     }
2357 
2358     /**
2359      * Test {@link org.htmlunit.javascript.host.event.TouchEvent}.
2360      *
2361      * @throws Exception if the test fails
2362      */
2363     @Test
2364     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [TouchEvent]",
2365             FF = "ReferenceError",
2366             FF_ESR = "ReferenceError")
2367     public void touchEvent2() throws Exception {
2368         testString("", "new TouchEvent('touch')");
2369     }
2370 
2371     /**
2372      * Test {@link org.htmlunit.html.HtmlSlot}.
2373      *
2374      * @throws Exception if the test fails
2375      */
2376     @Test
2377     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLSlotElement]")
2378     public void slot() throws Exception {
2379         test("slot");
2380     }
2381 
2382     /**
2383      * Test {@link org.htmlunit.javascript.host.html.HTMLDocument}.
2384      *
2385      * @throws Exception if the test fails
2386      */
2387     @Test
2388     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [Document],"
2389                 + "Symbol(Symbol.unscopables) [C] [{\"append\":true,\"fullscreen\":true,"
2390                     + "\"prepend\":true,\"replaceChildren\":true}]",
2391             FF = "Symbol(Symbol.toStringTag) [C] [Document],"
2392                     + "Symbol(Symbol.unscopables) [C] [{\"fullscreen\":true,\"prepend\":true,"
2393                     + "\"append\":true,\"replaceChildren\":true}]",
2394             FF_ESR = "Symbol(Symbol.toStringTag) [C] [Document],"
2395                     + "Symbol(Symbol.unscopables) [C] [{\"fullscreen\":true,\"prepend\":true,"
2396                     + "\"append\":true,\"replaceChildren\":true}]")
2397     @HtmlUnitNYI(CHROME = "TypeError",
2398             EDGE = "TypeError",
2399             FF = "TypeError",
2400             FF_ESR = "TypeError")
2401     public void document() throws Exception {
2402         testString("", "new Document()");
2403     }
2404 
2405     /**
2406      * Test {@link org.htmlunit.javascript.host.html.HTMLDocument}.
2407      *
2408      * @throws Exception if the test fails
2409      */
2410     @Test
2411     @Alerts("Symbol(Symbol.toStringTag) [C] [HTMLDocument]")
2412     public void htmlDocument() throws Exception {
2413         testString("", "document");
2414     }
2415 
2416     /**
2417      * Test {@link org.htmlunit.javascript.host.dom.Document}.
2418      *
2419      * @throws Exception if the test fails
2420      */
2421     @Test
2422     @Alerts("Symbol(Symbol.toStringTag) [C] [XMLDocument]")
2423     public void xmlDocument() throws Exception {
2424         testString("", "xmlDocument");
2425     }
2426 
2427     /**
2428      * @throws Exception if the test fails
2429      */
2430     @Test
2431     @Alerts("Symbol(Symbol.toStringTag) [C] [SVGElement]")
2432     public void svgElement() throws Exception {
2433         testString("", "svg");
2434     }
2435 
2436     /**
2437      * @throws Exception if the test fails
2438      */
2439     @Test
2440     @Alerts("Symbol(Symbol.toStringTag) [C] [Attr]")
2441     public void nodeAndAttr() throws Exception {
2442         testString("", "document.createAttribute('some_attrib')");
2443     }
2444 
2445     /**
2446      * @throws Exception if the test fails
2447      */
2448     @Test
2449     @Alerts("Symbol(Symbol.toStringTag) [C] [Range]")
2450     public void range() throws Exception {
2451         testString("", "document.createRange()");
2452     }
2453 
2454     /**
2455      * @throws Exception if the test fails
2456      */
2457     @Test
2458     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [DocumentFragment],"
2459                 + "Symbol(Symbol.unscopables) [C] [{\"append\":true,\"prepend\":true,\"replaceChildren\":true}]",
2460             FF = "Symbol(Symbol.toStringTag) [C] [DocumentFragment],"
2461                 + "Symbol(Symbol.unscopables) [C] [{\"prepend\":true,\"append\":true,\"replaceChildren\":true}]",
2462             FF_ESR = "Symbol(Symbol.toStringTag) [C] [DocumentFragment],"
2463                 + "Symbol(Symbol.unscopables) [C] [{\"prepend\":true,\"append\":true,\"replaceChildren\":true}]")
2464     @HtmlUnitNYI(CHROME = "Symbol(Symbol.toStringTag) [C] [DocumentFragment]",
2465             EDGE = "Symbol(Symbol.toStringTag) [C] [DocumentFragment]",
2466             FF = "Symbol(Symbol.toStringTag) [C] [DocumentFragment]",
2467             FF_ESR = "Symbol(Symbol.toStringTag) [C] [DocumentFragment]")
2468     public void documentFragment() throws Exception {
2469         testString("", "document.createDocumentFragment()");
2470     }
2471 
2472     /**
2473      * @throws Exception if the test fails
2474      */
2475     @Test
2476     @Alerts("Symbol(Symbol.toStringTag) [C] [AudioContext]")
2477     public void audioContext() throws Exception {
2478         testString("", "new AudioContext()");
2479     }
2480 
2481     /**
2482      * @throws Exception if the test fails
2483      */
2484     @Test
2485     @Alerts("Symbol(Symbol.toStringTag) [C] [OfflineAudioContext]")
2486     public void offlineAudioContext() throws Exception {
2487         testString("", "new OfflineAudioContext({length: 44100 * 1, sampleRate: 44100})");
2488     }
2489 
2490     /**
2491      * @throws Exception if the test fails
2492      */
2493     @Test
2494     @Alerts("Symbol(Symbol.toStringTag) [C] [AudioParam]")
2495     public void audioParam() throws Exception {
2496         testString("var audioCtx = new AudioContext(); var gainNode = new GainNode(audioCtx);", "gainNode.gain");
2497     }
2498 
2499     /**
2500      * @throws Exception if the test fails
2501      */
2502     @Test
2503     @Alerts("Symbol(Symbol.toStringTag) [C] [GainNode]")
2504     public void gainNode() throws Exception {
2505         testString("var audioCtx = new AudioContext();", "new GainNode(audioCtx)");
2506     }
2507 
2508     /**
2509      * @throws Exception if the test fails
2510      */
2511     @Test
2512     @Alerts("Symbol(Symbol.toStringTag) [C] [BeforeUnloadEvent]")
2513     public void beforeUnloadEvent() throws Exception {
2514         testString("", "document.createEvent('BeforeUnloadEvent')");
2515     }
2516 
2517     /**
2518      * @throws Exception if the test fails
2519      */
2520     @Test
2521     @Alerts("Symbol(Symbol.toStringTag) [C] [CloseEvent]")
2522     public void closeEvent() throws Exception {
2523         testString("", "new CloseEvent('type-close')");
2524     }
2525 
2526     /**
2527      * @throws Exception if the test fails
2528      */
2529     @Test
2530     @Alerts("Symbol(Symbol.toStringTag) [C] [BlobEvent]")
2531     public void blobEvent() throws Exception {
2532         testString("var debug = {hello: 'world'};"
2533                     + "var blob = new Blob([JSON.stringify(debug, null, 2)], {type : 'application/json'});",
2534                     "new BlobEvent('blob', { 'data': blob })");
2535     }
2536 
2537     /**
2538      * Test {@link org.htmlunit.javascript.host.event.TouchEvent}.
2539      *
2540      * @throws Exception if the test fails
2541      */
2542     @Test
2543     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [TouchEvent]",
2544             FF = "ReferenceError",
2545             FF_ESR = "ReferenceError")
2546     public void touchEvent() throws Exception {
2547         testString("", "new TouchEvent('touch')");
2548     }
2549 
2550     /**
2551      * Test {@link org.htmlunit.javascript.host.event.DeviceMotionEvent}.
2552      *
2553      * @throws Exception if the test fails
2554      */
2555     @Test
2556     @Alerts("Symbol(Symbol.toStringTag) [C] [DeviceMotionEvent]")
2557     public void deviceMotionEvent() throws Exception {
2558         testString("", "new DeviceMotionEvent('motion')");
2559     }
2560 
2561     /**
2562      * Test {@link org.htmlunit.javascript.host.event.ErrorEvent}.
2563      *
2564      * @throws Exception if the test fails
2565      */
2566     @Test
2567     @Alerts("Symbol(Symbol.toStringTag) [C] [ErrorEvent]")
2568     public void errorEvent() throws Exception {
2569         testString("", "new ErrorEvent('error')");
2570     }
2571 
2572     /**
2573      * Test {@link org.htmlunit.javascript.host.event.GamepadEvent}.
2574      *
2575      * @throws Exception if the test fails
2576      */
2577     @Test
2578     @Alerts("Symbol(Symbol.toStringTag) [C] [GamepadEvent]")
2579     public void gamepadEvent() throws Exception {
2580         testString("", "new GamepadEvent('gamepad')");
2581     }
2582 
2583     /**
2584      * Test {@link org.htmlunit.javascript.host.event.MutationEvent}.
2585      *
2586      * @throws Exception if the test fails
2587      */
2588     @Test
2589     @Alerts(DEFAULT = "NotSupportedError/DOMException",
2590             FF = "Symbol(Symbol.toStringTag) [C] [MutationEvent]",
2591             FF_ESR = "Symbol(Symbol.toStringTag) [C] [MutationEvent]")
2592     public void mutationEvent() throws Exception {
2593         testString("", "document.createEvent('MutationEvent')");
2594     }
2595 
2596     /**
2597      * Test {@link org.htmlunit.javascript.host.event.OfflineAudioCompletionEvent}.
2598      *
2599      * @throws Exception if the test fails
2600      */
2601     @Test
2602     @Alerts("NotSupportedError/DOMException")
2603     public void offlineAudioCompletionEvent() throws Exception {
2604         testString("", "document.createEvent('OfflineAudioCompletionEvent')");
2605     }
2606 
2607     /**
2608      * @throws Exception if the test fails
2609      */
2610     @Test
2611     @Alerts("Symbol(Symbol.toStringTag) [C] [PageTransitionEvent]")
2612     public void pageTransitionEvent() throws Exception {
2613         testString("", "new PageTransitionEvent('transition')");
2614     }
2615 
2616     /**
2617      * Test {@link org.htmlunit.javascript.host.media.SourceBufferList}.
2618      *
2619      * @throws Exception if the test fails
2620      */
2621     @Test
2622     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [SourceBufferList]")
2623     @HtmlUnitNYI(CHROME = "TypeError",
2624             EDGE = "TypeError",
2625             FF = "TypeError",
2626             FF_ESR = "TypeError")
2627     public void sourceBufferList() throws Exception {
2628         testString("var mediaSource = new MediaSource;", "mediaSource.sourceBuffers");
2629     }
2630 
2631     /**
2632      * Test {@link HTMLCollection}.
2633      *
2634      * @throws Exception if the test fails
2635      */
2636     @Test
2637     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [HTMLCollection]")
2638     public void htmlCollection() throws Exception {
2639         testString("", "document.getElementsByTagName('div')");
2640     }
2641 
2642     /**
2643      * Test {@link HTMLCollection}.
2644      *
2645      * @throws Exception if the test fails
2646      */
2647     @Test
2648     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [HTMLCollection]")
2649     public void htmlCollectionDocumentAnchors() throws Exception {
2650         testString("", "document.anchors");
2651     }
2652 
2653     /**
2654      * Test {@link HTMLCollection}.
2655      *
2656      * @throws Exception if the test fails
2657      */
2658     @Test
2659     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [HTMLCollection]")
2660     public void htmlCollectionDocumentApplets() throws Exception {
2661         testString("", "document.applets");
2662     }
2663 
2664     /**
2665      * Test {@link HTMLCollection}.
2666      *
2667      * @throws Exception if the test fails
2668      */
2669     @Test
2670     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [HTMLCollection]")
2671     public void htmlCollectionDocumentEmbeds() throws Exception {
2672         testString("", "document.embeds");
2673     }
2674 
2675     /**
2676      * Test {@link HTMLCollection}.
2677      *
2678      * @throws Exception if the test fails
2679      */
2680     @Test
2681     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [HTMLCollection]")
2682     public void htmlCollectionDocumentForms() throws Exception {
2683         testString("", "document.forms");
2684     }
2685 
2686     /**
2687      * Test {@link HTMLCollection}.
2688      *
2689      * @throws Exception if the test fails
2690      */
2691     @Test
2692     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [HTMLCollection]")
2693     public void htmlCollectionDocumentImages() throws Exception {
2694         testString("", "document.images");
2695     }
2696 
2697     /**
2698      * Test {@link HTMLCollection}.
2699      *
2700      * @throws Exception if the test fails
2701      */
2702     @Test
2703     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [HTMLCollection]")
2704     public void htmlCollectionDocumentLinks() throws Exception {
2705         testString("", "document.links");
2706     }
2707 
2708     /**
2709      * Test {@link HTMLCollection}.
2710      *
2711      * @throws Exception if the test fails
2712      */
2713     @Test
2714     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [HTMLCollection]")
2715     public void htmlCollectionDocumentScripts() throws Exception {
2716         testString("", "document.scripts");
2717     }
2718 
2719     /**
2720      * Test {@link NodeList}.
2721      *
2722      * @throws Exception if the test fails
2723      */
2724     @Test
2725     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [NodeList]")
2726     public void nodeListElementById() throws Exception {
2727         testString("", "document.getElementById('myLog').childNodes");
2728     }
2729 
2730     /**
2731      * Test {@link NodeList}.
2732      *
2733      * @throws Exception if the test fails
2734      */
2735     @Test
2736     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [NodeList]")
2737     public void nodeListElementsByName() throws Exception {
2738         testString("", "document.getElementsByName('myLog')");
2739     }
2740 
2741     /**
2742      * Test {@link NodeList}.
2743      *
2744      * @throws Exception if the test fails
2745      */
2746     @Test
2747     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [NodeList]")
2748     public void nodeListButtonLabels() throws Exception {
2749         testString("var button = document.createElement('button');", "button.labels");
2750     }
2751 
2752     /**
2753      * Test {@link ComputedCSSStyleDeclaration}.
2754      *
2755      * @throws Exception if the test fails
2756      */
2757     @Test
2758     @Alerts(DEFAULT = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [CSSStyleDeclaration]",
2759             FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [CSS2Properties]",
2760             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [CSS2Properties]")
2761     public void computedStyle() throws Exception {
2762         testString("", "window.getComputedStyle(document.body)");
2763     }
2764 
2765     /**
2766      * Test {@link ComputedCSSStyleDeclaration}.
2767      *
2768      * @throws Exception if the test fails
2769      */
2770     @Test
2771     @Alerts(DEFAULT = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [CSSStyleDeclaration]",
2772             FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [CSS2Properties]",
2773             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [CSS2Properties]")
2774     @HtmlUnitNYI(FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [CSSStyleDeclaration]",
2775             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [CSSStyleDeclaration]")
2776     public void cssStyleDeclaration() throws Exception {
2777         testString("", "document.body.style");
2778     }
2779 
2780     /**
2781      * Test {@link Location}.
2782      *
2783      * @throws Exception if the test fails
2784      */
2785     @Test
2786     @Alerts("Symbol(Symbol.toStringTag) [C] [Location]")
2787     public void location() throws Exception {
2788         testString("", "window.location");
2789         testString("", "document.location");
2790     }
2791 
2792     /**
2793      * Test {@link Screen}.
2794      *
2795      * @throws Exception if the test fails
2796      */
2797     @Test
2798     @Alerts("Symbol(Symbol.toStringTag) [C] [Screen]")
2799     public void screen() throws Exception {
2800         testString("", "window.screen");
2801     }
2802 
2803     /**
2804      * Test {@link Screen}.
2805      *
2806      * @throws Exception if the test fails
2807      */
2808     @Test
2809     @Alerts("Symbol(Symbol.toStringTag) [C] [ScreenOrientation]")
2810     public void screenOrientation() throws Exception {
2811         testString("", "window.screen.orientation");
2812     }
2813 
2814     /**
2815      * Test {@link Crypto}.
2816      *
2817      * @throws Exception if the test fails
2818      */
2819     @Test
2820     @Alerts("Symbol(Symbol.toStringTag) [C] [Crypto]")
2821     public void crypto() throws Exception {
2822         testString("", "window.crypto");
2823     }
2824 
2825     /**
2826      * Test {@link SubtleCrypto}.
2827      *
2828      * @throws Exception if the test fails
2829      */
2830     @Test
2831     @Alerts("Symbol(Symbol.toStringTag) [C] [SubtleCrypto]")
2832     public void cryptoSubtle() throws Exception {
2833         testString("", "window.crypto.subtle");
2834     }
2835 
2836     /**
2837      * Test {@link XPathEvaluator}.
2838      *
2839      * @throws Exception if the test fails
2840      */
2841     @Test
2842     @Alerts("Symbol(Symbol.toStringTag) [C] [XPathEvaluator]")
2843     public void xPathEvaluator() throws Exception {
2844         testString("", "new XPathEvaluator()");
2845     }
2846 
2847     /**
2848      * Test {@link XPathExpression}.
2849      *
2850      * @throws Exception if the test fails
2851      */
2852     @Test
2853     @Alerts("Symbol(Symbol.toStringTag) [C] [XPathExpression]")
2854     public void xPathExpression() throws Exception {
2855         testString("var res = new XPathEvaluator().createExpression('//span')", "res");
2856     }
2857 
2858     /**
2859      * Test {@link XPathResult}.
2860      *
2861      * @throws Exception if the test fails
2862      */
2863     @Test
2864     @Alerts("Symbol(Symbol.toStringTag) [C] [XPathResult]")
2865     public void xPathResult() throws Exception {
2866         testString("var res = document.evaluate('/html/body', document, null, XPathResult.ANY_TYPE, null);", "res");
2867     }
2868 
2869     /**
2870      * Test {@link CDATASection}.
2871      *
2872      * @throws Exception if the test fails
2873      */
2874     @Test
2875     @Alerts("Symbol(Symbol.toStringTag) [C] [CDATASection]")
2876     public void cDATASection() throws Exception {
2877         final String setup = " var doc = document.implementation.createDocument('', '', null);\n"
2878                 + "var root = doc.appendChild(doc.createElement('root'));\n"
2879                 + "var cdata = root.appendChild(doc.createCDATASection('abcdef'));\n";
2880 
2881         testString(setup, "cdata");
2882     }
2883 
2884     /**
2885      * Test {@link CDATASection}.
2886      *
2887      * @throws Exception if the test fails
2888      */
2889     @Test
2890     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [DocumentType],"
2891                 + "Symbol(Symbol.unscopables) [C] "
2892                     + "[{\"after\":true,\"before\":true,\"remove\":true,\"replaceWith\":true}]",
2893             FF = "Symbol(Symbol.toStringTag) [C] [DocumentType],"
2894                 + "Symbol(Symbol.unscopables) [C] "
2895                     + "[{\"before\":true,\"after\":true,\"replaceWith\":true,\"remove\":true}]",
2896             FF_ESR = "Symbol(Symbol.toStringTag) [C] [DocumentType],"
2897                 + "Symbol(Symbol.unscopables) [C] "
2898                     + "[{\"before\":true,\"after\":true,\"replaceWith\":true,\"remove\":true}]")
2899     @HtmlUnitNYI(CHROME = "Symbol(Symbol.toStringTag) [C] [DocumentType]",
2900             EDGE = "Symbol(Symbol.toStringTag) [C] [DocumentType]",
2901             FF = "Symbol(Symbol.toStringTag) [C] [DocumentType]",
2902             FF_ESR = "Symbol(Symbol.toStringTag) [C] [DocumentType]")
2903     public void documentType() throws Exception {
2904         testString("", "document.firstChild");
2905     }
2906 
2907     /**
2908      * Test Blob.
2909      *
2910      * @throws Exception if the test fails
2911      */
2912     @Test
2913     @Alerts("Symbol(Symbol.toStringTag) [C] [Blob]")
2914     public void blob() throws Exception {
2915         testString("", "new Blob([1, 2], { type: \"text/html\" })");
2916     }
2917 
2918     /**
2919      * Test URLSearchParams.
2920      *
2921      * @throws Exception if the test fails
2922      */
2923     @Test
2924     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [URLSearchParams]")
2925     public void urlSearchParams() throws Exception {
2926         testString("", "new URLSearchParams('q=URLUtils.searchParams&topic=api')");
2927     }
2928 
2929     /**
2930      * Test NamedNodeMap.
2931      *
2932      * @throws Exception if the test fails
2933      */
2934     @Test
2935     @Alerts("Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [NamedNodeMap]")
2936     public void namedNodeMap() throws Exception {
2937         testString("", "element.attributes");
2938     }
2939 
2940     /**
2941      * Test MutationObserver.
2942      *
2943      * @throws Exception if the test fails
2944      */
2945     @Test
2946     @Alerts("Symbol(Symbol.toStringTag) [C] [MutationObserver]")
2947     public void mutationObserver() throws Exception {
2948         testString("", "new MutationObserver(function(m) {})");
2949     }
2950 
2951     /**
2952      * Test WebKitMutationObserver.
2953      *
2954      * @throws Exception if the test fails
2955      */
2956     @Test
2957     @Alerts(DEFAULT = "Symbol(Symbol.toStringTag) [C] [MutationObserver]",
2958             FF = "ReferenceError",
2959             FF_ESR = "ReferenceError")
2960     public void webKitMutationObserver() throws Exception {
2961         testString("", "new WebKitMutationObserver(function(m) {})");
2962     }
2963 
2964     /**
2965      * Test StyleSheet.
2966      *
2967      * @throws Exception if the test fails
2968      */
2969     @Test
2970     @Alerts("Symbol(Symbol.toStringTag) [C] [CSSStyleSheet]")
2971     public void cssStyleSheet() throws Exception {
2972         testString("", "document.styleSheets[0]");
2973     }
2974 
2975     /**
2976      * Test CSSPageRule.
2977      *
2978      * @throws Exception if the test fails
2979      */
2980     @Test
2981     @Alerts("Symbol(Symbol.toStringTag) [C] [CSSPageRule]")
2982     public void cssPageRule() throws Exception {
2983         testString("", "document.styleSheets[0].cssRules[0]");
2984     }
2985 
2986     /**
2987      * Test CSSMediaRule.
2988      *
2989      * @throws Exception if the test fails
2990      */
2991     @Test
2992     @Alerts("Symbol(Symbol.toStringTag) [C] [CSSMediaRule]")
2993     public void cssMediaRule() throws Exception {
2994         testString("", "document.styleSheets[1].cssRules[0]");
2995     }
2996 
2997     /**
2998      * Test CSSFontFaceRule.
2999      *
3000      * @throws Exception if the test fails
3001      */
3002     @Test
3003     @Alerts("Symbol(Symbol.toStringTag) [C] [CSSFontFaceRule]")
3004     public void cssFontFaceRule() throws Exception {
3005         testString("", "document.styleSheets[2].cssRules[0]");
3006     }
3007 
3008     /**
3009      * Test CSSImportRule.
3010      *
3011      * @throws Exception if the test fails
3012      */
3013     @Test
3014     @Alerts("Symbol(Symbol.toStringTag) [C] [CSSImportRule]")
3015     public void cssImportRule() throws Exception {
3016         testString("", "document.styleSheets[3].cssRules[0]");
3017     }
3018 
3019     /**
3020      * Test CSSRule.
3021      *
3022      * @throws Exception if the test fails
3023      */
3024     @Test
3025     @Alerts("Symbol(Symbol.toStringTag) [C] [CSSStyleRule]")
3026     public void cssStyleRule() throws Exception {
3027         testString("", "document.styleSheets[4].cssRules[0]");
3028     }
3029 
3030     /**
3031      * Test {@link org.htmlunit.javascript.host.geo.Geolocation}.
3032      *
3033      * @throws Exception if the test fails
3034      */
3035     @Test
3036     @Alerts(CHROME = "Symbol(Symbol.toStringTag) [C] [Geolocation]",
3037             EDGE = "Symbol(Symbol.toStringTag) [C] [Geolocation]",
3038             FF = "Symbol(Symbol.toStringTag) [C] [Geolocation]",
3039             FF_ESR = "Symbol(Symbol.toStringTag) [C] [Geolocation]")
3040     public void geolocation() throws Exception {
3041         testString("", " navigator.geolocation");
3042     }
3043 
3044     /**
3045      * Test {@link org.htmlunit.javascript.host.geo.Geolocation}.
3046      *
3047      * @throws Exception if the test fails
3048      */
3049     @Test
3050     @Alerts(CHROME = "Symbol(Symbol.toStringTag) [C] [XMLHttpRequest]",
3051             EDGE = "Symbol(Symbol.toStringTag) [C] [XMLHttpRequest]",
3052             FF = "Symbol(Symbol.toStringTag) [C] [XMLHttpRequest]",
3053             FF_ESR = "Symbol(Symbol.toStringTag) [C] [XMLHttpRequest]")
3054     public void xmlHttpRequest() throws Exception {
3055         testString("", "new XMLHttpRequest()");
3056     }
3057 
3058     /**
3059      * Test Request.
3060      *
3061      * @throws Exception if the test fails
3062      */
3063     @Test
3064     @Alerts(CHROME = "Symbol(Symbol.toStringTag) [C] [Request]",
3065             EDGE = "Symbol(Symbol.toStringTag) [C] [Request]",
3066             FF = "Symbol(Symbol.toStringTag) [C] [Request]",
3067             FF_ESR = "Symbol(Symbol.toStringTag) [C] [Request]")
3068     public void request() throws Exception {
3069         testString("", "new Request('https://www.htmlunit.org')");
3070     }
3071 
3072     /**
3073      * Test Response.
3074      *
3075      * @throws Exception if the test fails
3076      */
3077     @Test
3078     @Alerts(CHROME = "Symbol(Symbol.toStringTag) [C] [Response]",
3079             EDGE = "Symbol(Symbol.toStringTag) [C] [Response]",
3080             FF = "Symbol(Symbol.toStringTag) [C] [Response]",
3081             FF_ESR = "Symbol(Symbol.toStringTag) [C] [Response]")
3082     public void response() throws Exception {
3083         testString("", "new Response()");
3084     }
3085 
3086     /**
3087      * Test RadioNodeList.
3088      *
3089      * @throws Exception if the test fails
3090      */
3091     @Test
3092     @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [RadioNodeList]",
3093             EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [RadioNodeList]",
3094             FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [RadioNodeList]",
3095             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [RadioNodeList]")
3096     public void radioNodeList() throws Exception {
3097         testString("", "document.myForm.first");
3098     }
3099 
3100     /**
3101      * Test HTMLFormControlsCollection.
3102      *
3103      * @throws Exception if the test fails
3104      */
3105     @Test
3106     @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],"
3107                     + "Symbol(Symbol.toStringTag) [C] [HTMLFormControlsCollection]",
3108             EDGE = "Symbol(Symbol.iterator) [WC] [function],"
3109                     + "Symbol(Symbol.toStringTag) [C] [HTMLFormControlsCollection]",
3110             FF = "Symbol(Symbol.iterator) [WC] [function],"
3111                     + "Symbol(Symbol.toStringTag) [C] [HTMLFormControlsCollection]",
3112             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],"
3113                     + "Symbol(Symbol.toStringTag) [C] [HTMLFormControlsCollection]")
3114     public void htmlFormControlsCollection() throws Exception {
3115         testString("", "document.myForm.elements");
3116     }
3117 
3118     /**
3119      * Test {@link org.htmlunit.javascript.host.abort.AbortController}.
3120      *
3121      * @throws Exception if an error occurs
3122      */
3123     @Test
3124     @Alerts(CHROME = "Symbol(Symbol.toStringTag) [C] [AbortController]",
3125             EDGE = "Symbol(Symbol.toStringTag) [C] [AbortController]",
3126             FF = "Symbol(Symbol.toStringTag) [C] [AbortController]",
3127             FF_ESR = "Symbol(Symbol.toStringTag) [C] [AbortController]")
3128     public void abortController() throws Exception {
3129         testString("", "new AbortController()");
3130     }
3131 
3132     /**
3133      * Test {@link org.htmlunit.javascript.host.abort.AbortSignal}.
3134      *
3135      * @throws Exception if an error occurs
3136      */
3137     @Test
3138     @Alerts(CHROME = "Symbol(Symbol.toStringTag) [C] [AbortSignal]",
3139             EDGE = "Symbol(Symbol.toStringTag) [C] [AbortSignal]",
3140             FF = "Symbol(Symbol.toStringTag) [C] [AbortSignal]",
3141             FF_ESR = "Symbol(Symbol.toStringTag) [C] [AbortSignal]")
3142     public void abortSignal() throws Exception {
3143         testString("", "new AbortController().signal");
3144     }
3145 
3146     /**
3147      * Test {@link org.htmlunit.javascript.host.dom.DOMTokenList}.
3148      *
3149      * @throws Exception if an error occurs
3150      */
3151     @Test
3152     @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [DOMTokenList]",
3153             EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [DOMTokenList]",
3154             FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [DOMTokenList]",
3155             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [DOMTokenList]")
3156     public void domTokenList() throws Exception {
3157         testString("", "document.body.classList");
3158     }
3159 
3160     /**
3161      * Test {@link org.htmlunit.javascript.host.draganddrop.DataTransfer}.
3162      *
3163      * @throws Exception if an error occurs
3164      */
3165     @Test
3166     @Alerts(CHROME = "Symbol(Symbol.toStringTag) [C] [DataTransfer]",
3167             EDGE = "Symbol(Symbol.toStringTag) [C] [DataTransfer]",
3168             FF = "Symbol(Symbol.toStringTag) [C] [DataTransfer]",
3169             FF_ESR = "Symbol(Symbol.toStringTag) [C] [DataTransfer]")
3170     public void dataTransfer() throws Exception {
3171         testString("", "new DataTransfer()");
3172     }
3173 
3174     /**
3175      * Test {@link org.htmlunit.javascript.host.draganddrop.DataTransferItemList}.
3176      *
3177      * @throws Exception if an error occurs
3178      */
3179     @Test
3180     @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [DataTransferItemList]",
3181             EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [DataTransferItemList]",
3182             FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [DataTransferItemList]",
3183             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [DataTransferItemList]")
3184     public void dataTransferItemList() throws Exception {
3185         testString("", "new DataTransfer().items");
3186     }
3187 
3188     /**
3189      * Test {@link org.htmlunit.javascript.host.file.FileList}.
3190      *
3191      * @throws Exception if an error occurs
3192      */
3193     @Test
3194     @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [FileList]",
3195             EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [FileList]",
3196             FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [FileList]",
3197             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [FileList]")
3198     public void fileList() throws Exception {
3199         testString("", "new DataTransfer().files");
3200     }
3201 
3202     /**
3203      * Test {@link org.htmlunit.javascript.host.file.FileList}.
3204      *
3205      * @throws Exception if an error occurs
3206      */
3207     @Test
3208     @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [FileList]",
3209             EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [FileList]",
3210             FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [FileList]",
3211             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [FileList]")
3212     public void fileList2() throws Exception {
3213         testString("", "document.getElementById('fileItem').files");
3214     }
3215 
3216     /**
3217      * Test {@link org.htmlunit.javascript.host.PluginArray}.
3218      *
3219      * @throws Exception if an error occurs
3220      */
3221     @Test
3222     @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]",
3223             EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]",
3224             FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]",
3225             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [PluginArray]")
3226     public void pluginArray() throws Exception {
3227         testString("", "navigator.plugins");
3228     }
3229 
3230     /**
3231      * Test {@link org.htmlunit.javascript.host.Plugin}.
3232      *
3233      * @throws Exception if an error occurs
3234      */
3235     @Test
3236     @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]",
3237             EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]",
3238             FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]",
3239             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [Plugin]")
3240     public void plugin() throws Exception {
3241         testString("", "navigator.plugins[0]");
3242     }
3243 
3244     /**
3245      * Test {@link org.htmlunit.javascript.host.MimeTypeArray}.
3246      *
3247      * @throws Exception if an error occurs
3248      */
3249     @Test
3250     @Alerts(CHROME = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]",
3251             EDGE = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]",
3252             FF = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]",
3253             FF_ESR = "Symbol(Symbol.iterator) [WC] [function],Symbol(Symbol.toStringTag) [C] [MimeTypeArray]")
3254     public void mimeTypeArray() throws Exception {
3255         testString("", "navigator.mimeTypes");
3256     }
3257 
3258     /**
3259      * Test {@link org.htmlunit.javascript.host.MimeType}.
3260      *
3261      * @throws Exception if an error occurs
3262      */
3263     @Test
3264     @Alerts(CHROME = "Symbol(Symbol.toStringTag) [C] [MimeType]",
3265             EDGE = "Symbol(Symbol.toStringTag) [C] [MimeType]",
3266             FF = "Symbol(Symbol.toStringTag) [C] [MimeType]",
3267             FF_ESR = "Symbol(Symbol.toStringTag) [C] [MimeType]")
3268     public void mimeType() throws Exception {
3269         testString("", "navigator.mimeTypes[0]");
3270     }
3271 
3272     /**
3273      * Test {@link org.htmlunit.javascript.host.Navigator}.
3274      *
3275      * @throws Exception if an error occurs
3276      */
3277     @Test
3278     @Alerts(CHROME = "Symbol(Symbol.toStringTag) [C] [Navigator]",
3279             EDGE = "Symbol(Symbol.toStringTag) [C] [Navigator]",
3280             FF = "Symbol(Symbol.toStringTag) [C] [Navigator]",
3281             FF_ESR = "Symbol(Symbol.toStringTag) [C] [Navigator]")
3282     public void navigator() throws Exception {
3283         testString("", "navigator");
3284     }
3285 
3286     /**
3287      * Test {@link org.htmlunit.javascript.host.dom.DOMException}.
3288      *
3289      * @throws Exception if an error occurs
3290      */
3291     @Test
3292     @Alerts(CHROME = "Symbol(Symbol.toStringTag) [C] [DOMException]",
3293             EDGE = "Symbol(Symbol.toStringTag) [C] [DOMException]",
3294             FF = "Symbol(Symbol.toStringTag) [C] [DOMException]",
3295             FF_ESR = "Symbol(Symbol.toStringTag) [C] [DOMException]")
3296     public void domException() throws Exception {
3297         testString("", "new DOMException('message', 'name')");
3298     }
3299 }