diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml index 594e9878e8d..61afd4de5a2 100644 --- a/.github/workflows/checkstyle.yml +++ b/.github/workflows/checkstyle.yml @@ -22,12 +22,12 @@ jobs: steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up JDK - uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 + uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 with: java-version: 21 distribution: 'temurin' cache: maven - - uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v0.20.1 + - uses: reviewdog/action-setup@e04ffabe3898a0af8d0fb1af00c188831c4b5893 # v0.20.1 name: Set up reviewdog with: reviewdog_version: latest diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index e0c5c1693ce..50c0767f714 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -24,12 +24,12 @@ jobs: steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up JDK ${{ matrix.Java }} - uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 + uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 with: java-version: ${{ matrix.Java }} distribution: 'temurin' cache: maven - - uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v0.20.1 + - uses: reviewdog/action-setup@e04ffabe3898a0af8d0fb1af00c188831c4b5893 # v0.20.1 name: Set up reviewdog with: reviewdog_version: latest diff --git a/.github/workflows/pmd.yml b/.github/workflows/pmd.yml index b5f1a3d3c9f..8e2105e7af5 100644 --- a/.github/workflows/pmd.yml +++ b/.github/workflows/pmd.yml @@ -20,12 +20,12 @@ jobs: steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up JDK - uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 + uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 with: java-version: 21 distribution: 'temurin' cache: maven - - uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v0.20.1 + - uses: reviewdog/action-setup@e04ffabe3898a0af8d0fb1af00c188831c4b5893 # v0.20.1 name: Set up reviewdog with: reviewdog_version: latest diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 562589dacba..3536fd3b400 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -37,7 +37,7 @@ jobs: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 + uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1 with: results_file: results.sarif results_format: sarif @@ -59,7 +59,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: SARIF file path: results.sarif diff --git a/README.md b/README.md index 393e8eea5ae..b33c3624078 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ![HtmlUnit Logo](https://github.com/HtmlUnit/htmlunit/blob/master/src/site/resources/images/htmlunit.png) -Version 4.7.0 / November 29, 2024 +Version 4.13.0 / June 03, 2025 :heart: [Sponsor](https://github.com/sponsors/rbri) @@ -13,11 +13,9 @@ Version 4.7.0 / November 29, 2024 ### News -**[Developer Blog][15]** +**[Developer Blog](https://htmlunit.github.io/htmlunit-blog/)** -[HtmlUnit@mastodon][13] | [HtmlUnit@Twitter][3] - -[HtmlUnit Kanban Board][6] +[HtmlUnit@mastodon](https://fosstodon.org/@HtmlUnit) | [HtmlUnit@bsky](https://bsky.app/profile/htmlunit.bsky.social) | [HtmlUnit@Twitter](https://twitter.com/HtmlUnit) > **Check out HtmlUnit [satellite projects](https://github.com/orgs/HtmlUnit/repositories)**, such as: @@ -53,7 +51,7 @@ Add to your `pom.xml`: org.htmlunit htmlunit - 4.7.0 + 4.13.0 ``` @@ -62,7 +60,7 @@ Add to your `pom.xml`: Add to your `build.gradle`: ```groovy -implementation group: 'org.htmlunit', name: 'htmlunit', version: '4.7.0' +implementation group: 'org.htmlunit', name: 'htmlunit', version: '4.13.0' ``` ## Vulnerabilities @@ -93,18 +91,56 @@ HtmlUnit is typically used for testing purposes or to retrieve information from * Support for basic and NTLM authentication * Excellent JavaScript support +HtmlUnit is used as the underlying "browser" by different Open Source tools like + * [WebDriver](https://github.com/SeleniumHQ/selenium) + * [Arquillian Drone](https://arquillian.org/arquillian-extension-drone) + * [Serenity BDD](https://serenity-bdd.info) + * [XLT](https://www.xceptance.com/en/products/xlt/) + * [FluentLenium](https://github.com/FluentLenium/FluentLenium) + * [WETATOR](https://www.wetator.org/) + * [Selenium Foundation](https://github.com/sbabcoc/Selenium-Foundation) + * [Spring Testing](https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#spring-mvc-test-server-htmlunit) + * [Selenide](https://selenide.org/) + * [JWebUnit](https://jwebunit.github.io/jwebunit/) + * [JSFUnit](http://www.jboss.org/jsfunit/) + * ... + +HtmlUnit is used by many projects for automated web testing + * [jenkins-test-harness](https://github.com/jenkinsci/jenkins-test-harness) + * [Apache Shiro](https://shiro.apache.org/) + * [Apache Struts](https://struts.apache.org/) + * [Quarkus](https://quarkus.io/) + * [Togglz](https://www.togglz.org/) + * [Dataverse](https://dataverse.org/) + * [Janssen Project](https://github.com/JanssenProject/jans) + * [Apache TomEE](https://github.com/apache/tomee) + * [Apache Maven Surefire](https://maven.apache.org/surefire/) + * [JSCover](http://tntim96.github.io/JSCover/) + * [Apache Jackrabbit](https://jackrabbit.apache.org/jcr/index.html) + * [Apache MyFaces](https://myfaces.apache.org/) + * [JakartaEE TCK](https://github.com/jakartaee/platform-tck) + * [Jakarta Security](https://github.com/jakartaee/security) + * [OpenXava](https://github.com/openxava/openxava) + * [Cargo](https://github.com/codehaus-cargo/cargo) + * [piranha cloud](https://github.com/piranhacloud/piranha) + * ... + ## Getting Started You can start here: * [Getting Started][7] +* [Introduction to HtmlUnit - Baeldung](https://www.baeldung.com/htmlunit) * [The Java Web Scraping Handbook][8] A nice tutorial about webscraping with a lot of background information and details about HtmlUnit. * [Web Scraping][9] Examples how to implement web scraping using HtmlUnit, Selenium or jaunt and compares them. * [The Complete Guide to Web Scraping with Java][10] A small straightforward guide to web scraping with Java. * [How to test Jakarta Faces with HtmlUnit and Arquillian][11] * [WebScraping.AI HtmlUnit FAQ][13]: + ## Contributing Pull Requests and all other Community Contributions are essential for open source software. Every contribution - from bug reports to feature requests, typos to full new features - are greatly appreciated. +Please try to keep your pull requests small (don't bundle unrelated changes) and try to include test cases. + ## Last CI build The latest builds are available from our [Jenkins CI build server][2] @@ -136,7 +172,7 @@ Add the snapshot repository and dependency to your `pom.xml`: org.htmlunit htmlunit - 4.8.0-SNAPSHOT + 4.14.0-SNAPSHOT @@ -155,7 +191,7 @@ repositories { } // ... dependencies { - implementation group: 'org.htmlunit', name: 'htmlunit', version: '4.8.0-SNAPSHOT' + implementation group: 'org.htmlunit', name: 'htmlunit', version: '4.14.0-SNAPSHOT' // ... } ``` @@ -187,10 +223,6 @@ check dependencies for known security problems mvn dependency-check:check ``` -### Contributing - -I welcome contributions, especially in the form of pull requests. -Please try to keep your pull requests small (don't bundle unrelated changes) and try to include test cases. ## Some insights [HtmlUnit at openhub][5] @@ -201,16 +233,12 @@ Please try to keep your pull requests small (don't bundle unrelated changes) and [1]: https://sourceforge.net/projects/htmlunit/files/htmlunit/4.1.0/ "HtmlUnit on sourceforge" [2]: https://jenkins.wetator.org/view/HtmlUnit/ "HtmlUnit CI" -[3]: https://twitter.com/HtmlUnit "https://twitter.com/HtmlUnit" [4]: https://www.htmlunit.org "https://www.htmlunit.org" [5]: https://www.openhub.net/p/HtmlUnit "https://www.openhub.net/p/HtmlUnit" -[6]: https://github.com/HtmlUnit/htmlunit/projects/1 "https://github.com/HtmlUnit/htmlunit/projects/1" [7]: https://www.htmlunit.org/gettingStarted.html [8]: https://www.scrapingbee.com/java-webscraping-book/ [9]: https://www.innoq.com/en/blog/webscraping/ [10]: https://www.webscrapingapi.com/java-web-scraping/ [11]: http://www.mastertheboss.com/java-ee/jsf/how-to-test-jakarta-faces-with-htmlunit-and-arquillian [12]: https://github.com/HtmlUnit/htmlunit/releases -[13]: https://fosstodon.org/@HtmlUnit -[14]: https://webscraping.ai/faq/htmlunit -[15]: https://htmlunit.github.io/htmlunit-blog/ +[13]: https://webscraping.ai/faq/htmlunit \ No newline at end of file diff --git a/checkstyle.xml b/checkstyle.xml index 801f430d970..b6e52d0a9b1 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -24,7 +24,7 @@ - + @@ -122,6 +122,10 @@ + + + + @@ -130,7 +134,7 @@ - + @@ -138,6 +142,16 @@ + + + + + + + + + + @@ -250,7 +264,6 @@ - \ No newline at end of file diff --git a/checkstyle_suppressions.xml b/checkstyle_suppressions.xml index c095435aad1..4be0af779aa 100644 --- a/checkstyle_suppressions.xml +++ b/checkstyle_suppressions.xml @@ -39,7 +39,7 @@ - + @@ -73,6 +73,7 @@ + diff --git a/pom.xml b/pom.xml index 3735a0c0ea8..1686e058fa0 100644 --- a/pom.xml +++ b/pom.xml @@ -3,18 +3,20 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 + org.htmlunit htmlunit - 4.7.0 + 4.13.0 + jar + HtmlUnit + + A headless browser intended for use in testing web-based applications. + Gargoyle Software Inc. http://www.GargoyleSoftware.com/ - jar - - A headless browser intended for use in testing web-based applications. - https://www.htmlunit.org @@ -25,29 +27,40 @@ 8 8 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 + 4.13.0 + 4.13.0 + 4.13.0 + 4.13.0 + 4.13.0 + 4.13.0 4.5.14 + 3.17.0 + 2.19.0 + 1.3.5 + 0.1.2 - 4.27.0 - 4.27.0 - selenium-devtools-v131 + + 4.32.0 + 4.32.0 + selenium-devtools-v136 - 9.4.56.v20240826 - 2.24.2 - 2.0.16 - - - 10.20.1 - 4.8.6 - 7.7.0 + 4.13.2 - 1.3.0 + 9.4.57.v20241219 + 4.0.66 + 2.24.3 + 2.0.17 + 1.13.1 + 1.5 + 4.4.0 + 1.5.6 + + + 10.25.0 + 4.9.3 + 7.14.0 + 1.4.1 10.0.4 @@ -56,7 +69,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.13.0 + 3.14.0 org.apache.maven.plugins @@ -78,7 +91,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.8.6.6 + 4.9.3.0 com.github.spotbugs @@ -190,19 +203,19 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 org.apache.maven.plugins maven-javadoc-plugin - 3.11.1 + 3.11.2 true protected - html,missing,reference,syntax + html,reference,syntax true true - netscape:netscape.*:org.htmlunit.platform.util + org.htmlunit.platform.util @@ -225,6 +238,7 @@ + org.apache.maven.plugins maven-enforcer-plugin @@ -269,7 +284,7 @@ org.apache.felix maven-bundle-plugin - 6.0.0 + 5.1.9 true @@ -284,7 +299,7 @@ org.simplify4u.plugins pgpverify-maven-plugin - 1.18.2 + 1.19.1 @@ -309,7 +324,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -324,6 +339,30 @@ + + org.jacoco + jacoco-maven-plugin + 0.8.13 + + + + prepare-agent + + + + report + prepare-package + + report + + + + + + org/htmlunit/cssparser/** + + + @@ -339,7 +378,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -370,7 +409,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -398,11 +437,12 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false + **/huge/CtorPrototypeTest.java **/huge/ElementClosesElementTest.java -Xms256m -Xmx512m @@ -426,7 +466,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -456,7 +496,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -485,7 +525,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -514,7 +554,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -543,7 +583,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -571,7 +611,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -599,7 +639,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -627,7 +667,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -656,7 +696,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 false @@ -678,14 +718,14 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.11.1 + 3.11.2 true protected - html,missing,reference,syntax + html,reference,syntax true true - netscape:netscape.*:org.htmlunit.platform.util + org.htmlunit.platform.util @@ -698,7 +738,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.8.0 + 3.9.0 org.apache.maven.plugins @@ -1196,6 +1236,9 @@ Markus Winter + + Christoph Burgmer + @@ -1204,10 +1247,6 @@ httpmime ${httpcomponents.version} - - commons-codec - commons-codec - commons-logging commons-logging @@ -1255,43 +1294,22 @@ org.apache.commons commons-lang3 - 3.17.0 - - - org.apache.commons - commons-text - 1.12.0 - - - org.apache.commons - commons-lang3 - - + ${commons-lang3.version} commons-io commons-io - 2.18.0 + ${commons-io.version} commons-logging commons-logging - 1.3.4 - - - commons-net - commons-net - 3.11.1 - - - commons-codec - commons-codec - 1.17.1 + ${commons-logging.version} org.brotli dec - 0.1.2 + ${brotli.version} @@ -1367,7 +1385,7 @@ org.apache.xmlgraphics batik-transcoder - 1.18 + 1.19 test @@ -1381,10 +1399,23 @@ + + org.apache.commons + commons-text + ${commons-text.version} + test + + + org.apache.commons + commons-lang3 + + + + commons-fileupload commons-fileupload - 1.5 + ${commons-fileupload.version} test @@ -1400,13 +1431,13 @@ com.github.romankh3 image-comparison - 4.4.0 + ${image-comparison.version} test org.jfree jfreechart - 1.5.5 + ${jfreechart.version} test @@ -1425,7 +1456,7 @@ com.caucho quercus - 4.0.66 + ${quercus.version} test diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 6260cda210e..8203c30eaee 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -7,6 +7,614 @@ + + + The prototype for DOMRect is now DOMRectReadOnly. + + + Internal javascript class ClientRect renamed to DOMRect (the old name was a leftover from IE). + + + Internal javascript class ClientRectList renamed to DOMRectList (the old name was a leftover from IE). + + + core-js: Adjust order of evaluation of function arguments to match the spec. + + + core-js: Major tidy up of 'NativeTypedArrayView' to better match spec. + + + core-js: Refactor functions to be lambdas rather than IdScriptableObject's. + + + The prototype for HTMLAllCollectionis no longer the HTMLCollection, it is now object. + + + HTMLTableCellElement now supports the 'align', 'ch', 'chOff', 'headers', 'height', 'noWrap', + 'rowSpan', 'scope', 'vAlign', 'width' properties. + + + HTMLTableColElement now supports the 'align', 'ch', 'chOff', and 'vAlign' properties. + + + Internal javascript class HTMLTableComponent removed. The prototype for HTMLTableCellElement, + HTMLTableColElement, and HTMLTableRowElement is now the correct HTMLElement. + + + HTMLTableSectionElement now supports the deleteRow() and insertRow() functions. + + + HTMLTableSectionElement now supports the 'align' and 'rows' properties. + + + HTMLTableElement now supports the deleteRow() and insertRow() functions. + + + HTMLTableElement now supports the 'align' and 'rows' properties. + + + Internal javascript class RowContainer removed. The prototype for HTMLTableElement, and + HTMLTableSectionElement is now the correct HTMLElement. + + + HTMLUListElement now supports the 'compact' property. + + + HTMLOListElement now supports the 'compact' property. + + + HTMLMenuElement now supports the 'compact' property. + + + HTMLLIElement now supports the 'type' property. + + + HTMLDListElement now supports the 'compact' property. + + + HTMLDListElement now supports the 'compact' property. + + + Internal javascript class HTMLListElement removed. The prototype for HTMLDListElement, + HTMLDirectoryElement, HTMLLIElement, HTMLMenuElement, HTMLOListElement, and HTMLUListElement + is now the correct HTMLElement. + + + Internal javascript class HTMLListElement removed. The prototype for HTMLDListElement, + HTMLDirectoryElement, HTMLLIElement, HTMLMenuElement, HTMLOListElement, andHTMLUListElement + is now the correct HTMLElement. + + + Javascript class configuration reworked, this allows some optimizations in the furture. + + + Constructor prototype fixes, now we have the correct prototypes for most classes. + The RecursiveFunctionObject workaround is no longer required. + + + DomNodeIterator is now serializable. + + + FF138: adjust datetimeformat for several locales. + + + Chrome/Edge 136: Clicking an image input no longer submits the value as param. + + + FF138: Frame elements are accessible by name. + + + FF138: Error.captureStackTrace() is supported. + + + FF138: js constant maxActions added to Notification. + + + FF138: stylesheet links checking the content type for 'text/css'. + + + + + + + WebClient option NekoReaderBufferSize added. You can use this to increase the buffer size used by + the Neko Html parser to optimize parsing performance. + + + HTMLParser parseFragment(DomNode, String), parse(WebResponse, HtmlPage, boolean, boolean), and + parseFragment(DomNode, DomNode, String, boolean) are deprecated. + + + neko: HTMLScanner always requires a document handler; the null check is moved to the setter + and all the others are removed. + + + neko: avoid HTML1011 error for self closing tags. + + + neko: ignore whitespace before the closing > when parsing special tags. + + + neko: remove two superfluous conversions from the code. + + + core-js: NativeArray impl is now lambda based. + + + core-js: improved date string parser; support optional ms digits, + skip ms digits, extended year support is not available in es6 + + + core-js: detailed message added to IndexOutOfBoundsExceptions + + + core-js: add double null check pattern when initializing cache values. + + + DomTokenList.forEach() now takes care of the current state of the list + (e.g. the forEach function might add/remove elements to the list itself). + + + NodeList.forEach() now takes care of the current state of the list + (e.g. the forEach function might add/remove elements to the list itself). + + + AlertHandler, ConfirmHandler, FrameContentHandler, CharacterDataChangeListener, and IncorrectnessListener + marked as @FunctionalInterface. + + + Upgrade Apache commons-io to 2.19.0. + + + Element.scrollIntoView() now triggers scroll events on all parents. + + + For FF scroll events are of type UIEvent. + + + Scroll events are not bubbling and not cancelable. + + + core-js: Function.prototype[Symbol.hasInstance] fixed. + + + core-js: regression in hex and unicode hex parsing or regexp fixed + + + CSS blockSize support improved. + + + core-js: Complete reimplementation of 'String.prototype.search', 'String.prototype.replace', + 'String.prototype.replaceAll', and 'String.prototype.split'. The new impl is much closer to the spec. + + + core-js: Fix a character class parsing regression for regexp. + + + core-js: Fix handling of \x and \u in regexp. + + + FF137: SVGDiscardElement added. + + + Chrome/Edge 135, FF137: Setter validation for length style properties adjusted. + + + Chrome/Edge 135: Style properties 'interactivity', 'overflowBlock', 'overflowInline', and 'scrollMarkerGroup' added. + + + FF137: Adjust clientHeight for some ruby related tags. + + + Chrome/Edge 135, FF137: Improved namespace handling when sending an html document via XMLHttpRequest. + + + Chrome/Edge 135: Improved <br> handling in options tags. + + + Chrome/Edge 135, FF137: Fixed font sizes for smaller/larger css prooerty value. + + + FF137: Set span for table cells to zero if provided value is invalid. + + + core-js: Some fixes for strict handling. + + + core-js: Several code improvements for the RegExp implementation. + + + WebClient.setWebSocketAdapter(WebSocketAdapterFactory) added. This should + help to use a different WebSocket implementation. + + + WebSocketAdapter splitted into WebSocketAdapter and WebSocketListener. + New interface WebSocketAdapterFactory introduced. This should help to + make it simpler to use a different WebSocket implementation. + + + core-js: Named capture groups in RegularExpressions now supported. + + + Deprecated method CssStyleSheet.validateSelectors(SelectorList, int, DomNode) removed. + + + Deprecated method HtmlForm.getElements() removed. + + + Deprecated method WebRequest.setRefererlHeader(URL) removed. + + + + + + + NumberFormatException when calculating the clientHeight/offsetHeight. + + + + + + + Event 'onload' is trigger by FF ESR also if the frame content was not shown because of csp. + + + Initial support for font sizes 'xx-small', 'x-small', 'small', 'medium', 'large', + 'x-large', 'xx-large', 'xxx-large', 'smaller', and 'larger'. + + + core-js: Refactor NativeString based on lambdas and stop using IdScriptableObject. + + + The style cache has to handle all parents of added or deleted nodes. + + + Class HiddenFunctionObject removed, this was a leftover from the IE age. + + + core-js: Arguments.callee is always the same function in strict mode. + + + core-js: Arguments.caller is not available in real browsers. + + + core-js: An issue where capture groups in quantified expressions (min = 2) were not cleared between iterations fixed. + For example, in /(?:(\2)(\d)){2}/, during the second iteration, \2 incorrectly retained the first iteration's value instead of being reset. + + + Switched back from our RegExp translation into java regular expressions to use the core Rhino stuff. Rhino mades significant + progress in this arae. This simplifies out impl and supports more features in the future. + + + core-js: RegExp lookbehind implemented. + + + core-js: NativeObject converted from IdScriptableObject to lambda constructor + + + core-js: problem with 'super' and nested lambdas + + + core-js: RegExp.prototype[Symbol.match] and String.prototype.match. + + + core-js: Implement Symbol.match. + + + core-js: String.prototype.match. As per the spec, it is simply supposed to invoke the Symbol.match of the regexp. + + + core-js: Fix the behaviour of Regexp sticky flag. + + + Deprecated methods removed from EncodingSniffer, HttpClientConverter, WebResponse, and WebResponseWrapper. + + + cssparser: improved support for var initial values. + + + Apache commons-codec is no longer a runtime dependency. + + + atob() has to remove all whitespace from the provided string. + + + atob() must always fail on invalid input. + + + The script async attribute is ignored if the src attribute is absent. + + + Many more checkstyle jdoc rules enabled and all violations fixed. + + + HtmlImage onerror event is triggerd for 204 responses. + + + Some minor code improvements found by spotbugs. + + + Some more event initialization fixes. + + + Fix various event initialization when working with WebSocket's. + + + + + + + core-js: NativeGlobal now based on lambda functions. + + + Avoid using XPath for implementing form submit on enter key pressed. + + + Implement Document.getElementById() without using XPath. + + + NPE in org.htmlunit.javascript.JavaScriptEngine.asJavaScriptException(). + + + Upgrade commons-logging to 1.3.5. + + + StyleElement implements no longer the Comparable interface. For our special needs we now using the + static method compareToByImportanceAndSpecificity(StyleElement, StyleElement). + + + core-js: load more classes lazily. + + + HtmlUrlInput value trimming fixed. + + + Replace the deprecated WebElement.getAttribute(String) with getDomAttribute(String) and getDomProperty(String) + at many places in the test suite. + + + Use StandardCharsets.UTF_8 instead of Charsets.UTF_8 for the sample code. + + + HtmlTextArea - several fixes to throw the correct error. + + + AudioContext/OfflineAudioContext - several fixes to throw the correct error. + + + 'Illegal constructor' is a type error. + + + Firefox ESR accept header no longer contains 'image/avif,image/webp,image/png,image/svg+xml'. + + + core-js: BigInt, Boolean and Number converted to use lambdas. + + + core-js: Function hoisting inside blocks is now a core Rhino feature, our own hack is gone. + + + core-js: Map and Set converted to use lambdas. + + + core-js: lambda-based classes serializable are serializable. + + + core-js: bunch of changes to make the SlotMap handling faster. + + + CSSStyleSheet - several fixes to throw the correct error. + + + XPath.evaluate() throws a TypeError. + + + Document - several fixes to throw the correct error. + + + XMLHttpRequest - several fixes to throw the correct error. + + + Geolocation.ctor() throws a TypeError. + + + TreeWalker.ctor() throws a TypeError. + + + MutationObserver.observe() throws a TypeError. + + + DOMParser.parseFromString() throws a TypeError. + + + Window.postMessage() throws a SyntaxError. + + + Window.atob()/btoa() throws an InvalidCharacterError. + + + DomNode.appendChild() throws a HierarchyRequstError. + + + AbstractRange.ctor() throws a TypeError. + + + DOMTokenList - several fixes to throw the correct error. + + + CSSGroupingRule - several fixes to throw the correct error. + + + HTMLInputElement value/selectionStart/selectionEnd properties throws the correct error (InvalidStateError). + + + SVGMatrix.rotateFromVector()/inverse() throws the correct error (InvalidAccessError/InvalidStateError). + + + Crypto.getRandomValues() throws a QuotaExceededError. + + + CanvasRenderingContext2D.measureText() throws a TypeError. + + + HTMLTableElement/HTMLTableRowElement - several fixes to throw the correct error. + + + Element.querySelectorAll()/querySelector() throws a SyntaxError. + + + HTMLOptionsCollection.add() throws a NotFoundError. + + + Accessing a HTMLDocument without a js peer throws a TypeError. + + + Document.createElementNS() throws a TypeError. + + + Document.createElementNS() throws a TypeError. + + + Selection.getRangeAt() throws an IndexSizeError. + + + Node.replaceChild()/removeChild()/insertBefore() several fixes to throw the correct error. + + + HTMLDocument.appendChild() throws HierarchyRequstError. + + + Document.createElement() throws InvalidCharacterError. + + + ImageData.ctor() various fixes to throw the correct error in different situations. + + + CharacterData.deleteData() throws an IndexSizeError. + + + Document.querySelectorAll() throws a SyntaxError if the selector is invalid. + + + Document.createEvent() creates the correct exception when the event type is not supported. + + + DOMException name property was missing. + + + Handling of the error code when construction DOMException is fixed. + + + Document.evaluate() now throws a SyntaxError instead of an InternalError. + + + Upgrade commons-codec to 1.18.0. + + + WebClientOptions sslClientCertificateStore is transient. + + + + + + + WebClientOptions SSLTrustStore is transient. + + + WebClientOptions.Geolocation is serializable now + + + HtmlDomTreeWalker is serializable now + + + core-js: junit-vintage-engine was NOT marked as 'test' dependency, therefore we had junit + as part of our depenencies/lib/diestribution (regression from 4.8.0) + + + BigInt support added. + + + core-js: Symbol.hasInstance for Function.prototype implemented. + + + core-js: Context#emptyArgs is deprecated. + + + + + + + cssparser: support plain color definitions with var/calc. + + + cssparser: 'and' is a valid class name. + + + cssparser: support relative color definitions. + + + websocket-client: jetty updated to 9.4.57.v20241219. + + + core-js: add an empty slot map (singleton) for cases where no slots exist; this should reduce the memory needed a bit + + + core-js: methods cannot be used as constructor fixed + + + Upgrade commons-codec to 1.17.2. + + + Apache commons-net is no longer a runtime dependency. + + + Apache commons-text is no longer a runtime dependency. + + + core-js: Extract function calling out of the interpreter loop for performance. + + + Avoid ConcurrentModificationExceptions in frame processing. + + + core-js: handle stack frames in the correct order. + + + cssparser: support hwb(), lab(), lch(), oklab(), and oklch() color definitions. + + + cssparser: add support for 'none' in modern color definitions. + + + core-js: fix border checks for typedarray set-method (see https://github.com/HtmlUnit/htmlunit-core-js/issues/27) + + + core-js: Allow symbol keys in getter/setter in object literal syntax like 'var o = { get [aSymbol]: value }'. + + + core-js: Support for generator methods in object literals like 'o = {*g() {...}}' added. + + + core-js: Implement the super operator - which can actually be used outside of classes and will do something that intuitively is "refer to the prototype". + + + core-js: Fix tokenEnd and cursor for string, template, xml literals and multiline comments when using multibyte characters. + + + FAQ updated with some info about page history. + + + DomElement#getStaticElementsByTagName() has to check for prefix. + + + Upgrade Apache commons-text to 1.13.0. + + + core-js: Some improvments for the interpreter by generating smaller interpreter bytecode. + + + + core-js: String.prototype.matchAll, Symbol.matchAll, and RegExp.prototype[Symbol.matchAll] added. diff --git a/src/jenkins/huge-tests-m-o b/src/jenkins/huge-tests-m-o index cdd22ad9987..4b04403eeb3 100644 --- a/src/jenkins/huge-tests-m-o +++ b/src/jenkins/huge-tests-m-o @@ -4,7 +4,7 @@ pipeline { lock resource: 'htmlunit-test-ports' disableConcurrentBuilds() timestamps() - timeout(time: 15, unit: 'MINUTES') + timeout(time: 35, unit: 'MINUTES') } tools { jdk 'openjdk-11+28' diff --git a/src/main/java/org/htmlunit/AbstractPage.java b/src/main/java/org/htmlunit/AbstractPage.java index 1ddf2d29272..940d8c67a5c 100644 --- a/src/main/java/org/htmlunit/AbstractPage.java +++ b/src/main/java/org/htmlunit/AbstractPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/AjaxController.java b/src/main/java/org/htmlunit/AjaxController.java index f845bbef786..bd8cb6674c6 100644 --- a/src/main/java/org/htmlunit/AjaxController.java +++ b/src/main/java/org/htmlunit/AjaxController.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/AlertHandler.java b/src/main/java/org/htmlunit/AlertHandler.java index 41b4508b5c6..d8b768a0f6c 100644 --- a/src/main/java/org/htmlunit/AlertHandler.java +++ b/src/main/java/org/htmlunit/AlertHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ * @author Mike Bowler * @author Ronald Brill */ +@FunctionalInterface public interface AlertHandler extends Serializable { /** diff --git a/src/main/java/org/htmlunit/BrowserVersion.java b/src/main/java/org/htmlunit/BrowserVersion.java index 2912be38195..99e4eb6a4fe 100644 --- a/src/main/java/org/htmlunit/BrowserVersion.java +++ b/src/main/java/org/htmlunit/BrowserVersion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import java.util.TimeZone; import org.apache.commons.io.FilenameUtils; -import org.htmlunit.javascript.configuration.AbstractJavaScriptConfiguration; +import org.htmlunit.css.CssPixelValueConverter; import org.htmlunit.javascript.configuration.BrowserFeature; import org.htmlunit.javascript.configuration.SupportedBrowser; import org.htmlunit.util.MimeType; @@ -61,31 +61,11 @@ * @author Frank Danek * @author Ronald Brill */ -@SuppressWarnings("PMD.AvoidDuplicateLiterals") +@SuppressWarnings({"PMD.AvoidDuplicateLiterals", "PMD.TooManyFields"}) public final class BrowserVersion implements Serializable { - /** - * Application name the Netscape navigator series of browsers. - */ - private static final String NETSCAPE = "Netscape"; - - /** - * United States English language identifier. - */ - private static final String LANGUAGE_ENGLISH_US = "en-US"; - - /** - * United States. - */ - private static final String TIMEZONE_NEW_YORK = "America/New_York"; - - /** - * The WIN32 platform. - */ - private static final String PLATFORM_WIN32 = "Win32"; - /** Latest Firefox. */ - public static final BrowserVersion FIREFOX = new BrowserVersion(133, "FF"); + public static final BrowserVersion FIREFOX = new BrowserVersion(138, "FF"); private static final int FIREFOX_ESR_NUMERIC = 128; @@ -93,10 +73,10 @@ public final class BrowserVersion implements Serializable { public static final BrowserVersion FIREFOX_ESR = new BrowserVersion(FIREFOX_ESR_NUMERIC, "FF-ESR"); /** Latest Edge. */ - public static final BrowserVersion EDGE = new BrowserVersion(131, "Edge"); + public static final BrowserVersion EDGE = new BrowserVersion(136, "Edge"); /** Latest Chrome. */ - public static final BrowserVersion CHROME = new BrowserVersion(131, "Chrome"); + public static final BrowserVersion CHROME = new BrowserVersion(136, "Chrome"); /** * Array with all supported browsers. @@ -117,6 +97,7 @@ public final class BrowserVersion implements Serializable { + FIREFOX_ESR.getBrowserVersionNumeric() + ".0) Gecko/20100101 Firefox/" + FIREFOX_ESR.getBrowserVersionNumeric() + ".0"; FIREFOX_ESR.buildId_ = "20181001000000"; + FIREFOX_ESR.vendor_ = ""; FIREFOX_ESR.productSub_ = "20100101"; FIREFOX_ESR.headerNamesOrdered_ = new String[] { HttpHeader.HOST, @@ -133,7 +114,7 @@ public final class BrowserVersion implements Serializable { HttpHeader.SEC_FETCH_SITE, HttpHeader.SEC_FETCH_USER, HttpHeader.PRIORITY}; - FIREFOX_ESR.htmlAcceptHeader_ = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8"; + FIREFOX_ESR.htmlAcceptHeader_ = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; FIREFOX_ESR.acceptLanguageHeader_ = "en-US,en;q=0.5"; FIREFOX_ESR.xmlHttpRequestAcceptHeader_ = "*/*"; FIREFOX_ESR.imgAcceptHeader_ = "image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5"; @@ -152,6 +133,7 @@ public final class BrowserVersion implements Serializable { + FIREFOX.getBrowserVersionNumeric() + ".0) Gecko/20100101 Firefox/" + FIREFOX.getBrowserVersionNumeric() + ".0"; FIREFOX.buildId_ = "20181001000000"; + FIREFOX.vendor_ = ""; FIREFOX.productSub_ = "20100101"; FIREFOX.headerNamesOrdered_ = new String[] { HttpHeader.HOST, @@ -188,7 +170,6 @@ public final class BrowserVersion implements Serializable { CHROME.userAgent_ = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/" + CHROME.getBrowserVersionNumeric() + ".0.0.0 Safari/537.36"; - CHROME.applicationCodeName_ = "Mozilla"; CHROME.vendor_ = "Google Inc."; CHROME.productSub_ = "20030107"; CHROME.headerNamesOrdered_ = new String[] { @@ -215,9 +196,26 @@ public final class BrowserVersion implements Serializable { CHROME.imgAcceptHeader_ = "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"; CHROME.cssAcceptHeader_ = "text/css,*/*;q=0.1"; CHROME.scriptAcceptHeader_ = "*/*"; + + /* + CHROME.secClientHintUserAgentHeader_ = "\"Not(A:Brand\";v=\"99\", \"Google Chrome\";v=\"" + + CHROME.getBrowserVersionNumeric() + "\", \"Chromium\";v=\"" + + CHROME.getBrowserVersionNumeric() + "\""; + CHROME.secClientHintUserAgentHeader_ = "\"Chromium\";v=\"" + + CHROME.getBrowserVersionNumeric() + "\", \"Not:A-Brand\";v=\"24\", \"Google Chrome\";v=\"" + + CHROME.getBrowserVersionNumeric() + "\""; + */ + // 135 + /* CHROME.secClientHintUserAgentHeader_ = "\"Google Chrome\";v=\"" - + CHROME.getBrowserVersionNumeric() + "\", \"Chromium\";v=\"" - + CHROME.getBrowserVersionNumeric() + "\", \"Not_A Brand\";v=\"24\""; + + CHROME.getBrowserVersionNumeric() + "\", \"Not-A.Brand\";v=\"8\", \"Chromium\";v=\"" + + CHROME.getBrowserVersionNumeric() + "\""; + */ + // 136 + CHROME.secClientHintUserAgentHeader_ = "\"Chromium\";v=\"" + + CHROME.getBrowserVersionNumeric() + "\", \"Google Chrome\";v=\"" + + CHROME.getBrowserVersionNumeric() + "\", \"Not.A/Brand\";v=\"99\""; + CHROME.fontHeights_ = new int[] { 0, 1, 2, 4, 5, 5, 6, 8, 9, 10, 11, 12, 15, 16, 16, 17, 18, 20, 21, 22, 23, 25, 26, 26, 27, 28, 30, 31, 32, 33, 34, 36, 37, 37, 38, 40, 42, 43, 44, 45, 47, 48, 48, 49, 51, 52, 53, 54, 55, 57, @@ -234,7 +232,6 @@ public final class BrowserVersion implements Serializable { + EDGE.getBrowserVersionNumeric() + ".0.0.0 Safari/537.36 Edg/" + EDGE.getBrowserVersionNumeric() + ".0.0.0"; - EDGE.applicationCodeName_ = "Mozilla"; EDGE.vendor_ = "Google Inc."; EDGE.productSub_ = "20030107"; EDGE.headerNamesOrdered_ = new String[] { @@ -261,9 +258,26 @@ public final class BrowserVersion implements Serializable { EDGE.imgAcceptHeader_ = "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"; EDGE.cssAcceptHeader_ = "text/css,*/*;q=0.1"; EDGE.scriptAcceptHeader_ = "*/*"; + + /* + EDGE.secClientHintUserAgentHeader_ = "\"Chromium\";v=\"" + + EDGE.getBrowserVersionNumeric() + "\", \"Not:A-Brand\";v=\"24\", \"Microsoft Edge\";v=\"" + + EDGE.getBrowserVersionNumeric() + "\""; + EDGE.secClientHintUserAgentHeader_ = "\"Not(A:Brand\";v=\"99\", \"Microsoft Edge\";v=\"" + + EDGE.getBrowserVersionNumeric() + "\", \"Chromium\";v=\"" + + EDGE.getBrowserVersionNumeric() + "\""; + */ + // 135 + /* EDGE.secClientHintUserAgentHeader_ = "\"Microsoft Edge\";v=\"" - + EDGE.getBrowserVersionNumeric() + "\", \"Chromium\";v=\"" - + EDGE.getBrowserVersionNumeric() + "\", \"Not_A Brand\";v=\"24\""; + + EDGE.getBrowserVersionNumeric() + "\", \"Not-A.Brand\";v=\"8\", \"Chromium\";v=\"" + + EDGE.getBrowserVersionNumeric() + "\""; + */ + // 136 + EDGE.secClientHintUserAgentHeader_ = "\"Chromium\";v=\"" + + EDGE.getBrowserVersionNumeric() + "\", \"Microsoft Edge\";v=\"" + + EDGE.getBrowserVersionNumeric() + "\", \"Not.A/Brand\";v=\"99\""; + EDGE.fontHeights_ = new int[] { 0, 1, 2, 4, 5, 5, 6, 8, 9, 10, 11, 12, 15, 16, 16, 17, 18, 20, 21, 22, 23, 25, 26, 26, 27, 28, 30, 31, 32, 33, 34, 36, 37, 37, 38, 40, 42, 43, 44, 45, 47, 48, 48, 49, 51, 52, 53, 54, 55, 57, @@ -371,7 +385,7 @@ public final class BrowserVersion implements Serializable { FIREFOX.registerUploadMimeType("mp3", "audio/mpeg"); FIREFOX.registerUploadMimeType("ogv", "video/ogg"); FIREFOX.registerUploadMimeType("ogm", "video/ogg"); - FIREFOX.registerUploadMimeType("ogg", "video/ogg"); + FIREFOX.registerUploadMimeType("ogg", "application/ogg"); FIREFOX.registerUploadMimeType("oga", "audio/ogg"); FIREFOX.registerUploadMimeType("opus", "audio/ogg"); FIREFOX.registerUploadMimeType("webm", "video/webm"); @@ -387,17 +401,17 @@ public final class BrowserVersion implements Serializable { private final int browserVersionNumeric_; private final String nickname_; - private String applicationCodeName_ = "Mozilla"; - private String applicationMinorVersion_ = "0"; + private String applicationCodeName_; + private String applicationMinorVersion_; private String applicationName_; private String applicationVersion_; private String buildId_; private String productSub_; - private String vendor_ = ""; - private Locale browserLocale_ = Locale.forLanguageTag(LANGUAGE_ENGLISH_US); - private boolean onLine_ = true; - private String platform_ = PLATFORM_WIN32; - private TimeZone systemTimezone_ = TimeZone.getTimeZone(TIMEZONE_NEW_YORK); + private String vendor_; + private Locale browserLocale_; + private boolean onLine_; + private String platform_; + private TimeZone systemTimezone_; private String userAgent_; private final Set features_; private String acceptEncodingHeader_; @@ -423,7 +437,15 @@ public final class BrowserVersion implements Serializable { browserVersionNumeric_ = browserVersionNumeric; nickname_ = nickname; - applicationName_ = NETSCAPE; + applicationCodeName_ = "Mozilla"; + applicationMinorVersion_ = "0"; + applicationName_ = "Netscape"; + onLine_ = true; + platform_ = "Win32"; + + browserLocale_ = Locale.forLanguageTag("en-US"); + systemTimezone_ = TimeZone.getTimeZone("America/New_York"); + acceptEncodingHeader_ = "gzip, deflate, br"; htmlAcceptHeader_ = "*/*"; imgAcceptHeader_ = "*/*"; @@ -468,7 +490,7 @@ else if (isFirefox()) { final BrowserFeature browserFeature = field.getAnnotation(BrowserFeature.class); if (browserFeature != null) { for (final SupportedBrowser browser : browserFeature.value()) { - if (AbstractJavaScriptConfiguration.isCompatible(expectedBrowser, browser)) { + if (expectedBrowser == browser) { features_.add(features); } } @@ -598,7 +620,7 @@ public String getVendor() { /** * Returns the browser locale. - * Default value is {@link #LANGUAGE_ENGLISH_US} if not explicitly configured. + * Default value is ENGLISH_US if not explicitly configured. * @return the system locale */ public Locale getBrowserLocale() { @@ -607,7 +629,7 @@ public Locale getBrowserLocale() { /** * Returns the browser application language, for example "en-us". - * Default value is {@link #LANGUAGE_ENGLISH_US} if not explicitly configured. + * Default value is ENGLISH_US if not explicitly configured. * @return the browser application language * @see MSDN documentation */ @@ -627,7 +649,7 @@ public boolean isOnLine() { /** * Returns the platform on which the application is running, for example "Win32". - * Default value is {@link #PLATFORM_WIN32} if not explicitly configured. + * Default value is 'Win32' if not explicitly configured. * @return the platform on which the application is running * @see MSDN documentation */ @@ -797,13 +819,47 @@ public String getUploadMimeType(final File file) { * @return the corresponding height */ public int getFontHeight(final String fontSize) { - if (fontHeights_ == null) { + if (fontHeights_ == null || fontSize.isEmpty()) { return 18; } - final int fontSizeInt = Integer.parseInt(fontSize.substring(0, fontSize.length() - 2)); + + if ("xx-small".equalsIgnoreCase(fontSize)) { + return fontHeights_[9]; + } + if ("x-small".equalsIgnoreCase(fontSize)) { + return fontHeights_[10]; + } + if ("small".equalsIgnoreCase(fontSize)) { + return fontHeights_[13]; + } + if ("medium".equalsIgnoreCase(fontSize)) { + return fontHeights_[16]; + } + if ("large".equalsIgnoreCase(fontSize)) { + return fontHeights_[18]; + } + if ("x-large".equalsIgnoreCase(fontSize)) { + return fontHeights_[24]; + } + if ("xx-large".equalsIgnoreCase(fontSize)) { + return fontHeights_[32]; + } + if ("xxx-large".equalsIgnoreCase(fontSize)) { + return fontHeights_[48]; + } + + if ("smaller".equalsIgnoreCase(fontSize)) { + return fontHeights_[13]; + } + if ("larger".equalsIgnoreCase(fontSize)) { + return fontHeights_[19]; + } + + final int fontSizeInt = CssPixelValueConverter.pixelValue(fontSize); if (fontSizeInt < fontHeights_.length) { return fontHeights_[fontSizeInt]; } + return (int) (fontSizeInt * 1.2); } @@ -1020,7 +1076,7 @@ public BrowserVersionBuilder setScriptAcceptHeader(final String scriptAcceptHead /** * @param xmlHttpRequestAcceptHeader the {@code Accept} header to be used when - * performing XMLHttpRequests + * performing XMLHttpRequests * @return this for fluent use */ public BrowserVersionBuilder setXmlHttpRequestAcceptHeader(final String xmlHttpRequestAcceptHeader) { diff --git a/src/main/java/org/htmlunit/BrowserVersionFeatures.java b/src/main/java/org/htmlunit/BrowserVersionFeatures.java index 6253793c5c7..858d156c6fa 100644 --- a/src/main/java/org/htmlunit/BrowserVersionFeatures.java +++ b/src/main/java/org/htmlunit/BrowserVersionFeatures.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -90,6 +90,10 @@ public enum BrowserVersionFeatures { @BrowserFeature({FF, FF_ESR}) EVENT_ONPOPSTATE_DOCUMENT_CREATE_NOT_SUPPORTED, + /** Scroll events are of type 'UIEvent'. */ + @BrowserFeature({FF, FF_ESR}) + EVENT_SCROLL_UIEVENT, + /** Supports event type 'TextEvent'. */ @BrowserFeature({FF, FF_ESR}) EVENT_TYPE_MUTATIONEVENT, @@ -133,7 +137,7 @@ public enum BrowserVersionFeatures { HTMLDOCUMENT_ELEMENTS_BY_NAME_EMPTY, /** Calls to document.XYZ also looks at frames. */ - @BrowserFeature({CHROME, EDGE}) + @BrowserFeature({CHROME, EDGE, FF}) HTMLDOCUMENT_GET_ALSO_FRAMES, /** Removing the active element from the dom tree triggers the onblur event. */ @@ -156,10 +160,6 @@ public enum BrowserVersionFeatures { @BrowserFeature({CHROME, EDGE}) HTMLIMAGE_HTMLUNKNOWNELEMENT, - /** Clicking an image input submits the value as param if defined. */ - @BrowserFeature({CHROME, EDGE}) - HTMLIMAGE_NAME_VALUE_PARAMS, - /** HTMLInputElement image type is not supported. */ @BrowserFeature({CHROME, EDGE}) HTMLINPUT_TYPE_IMAGE_IGNORES_CUSTOM_VALIDITY, @@ -172,6 +172,10 @@ public enum BrowserVersionFeatures { @BrowserFeature({CHROME, EDGE}) HTMLINPUT_TYPE_WEEK_SUPPORTED, + /** For a stylesheet link report an error if the response type is not text/css. */ + @BrowserFeature({FF, FF_ESR}) + HTMLLINK_CHECK_RESPONSE_TYPE_FOR_STYLESHEET, + /** If the type is present for a link only use if type is text/css. */ @BrowserFeature({CHROME, EDGE}) HTMLLINK_CHECK_TYPE_FOR_STYLESHEET, @@ -220,7 +224,8 @@ public enum BrowserVersionFeatures { @BrowserFeature(FF_ESR) JS_ANCHOR_PATHNAME_DETECT_WIN_DRIVES_URL, - /** The anchor pathname detects url's starting with one letter as file url's + /** + * The anchor pathname detects url's starting with one letter as file url's * and replaces them with the file protocol. */ @BrowserFeature({CHROME, EDGE}) JS_ANCHOR_PATHNAME_DETECT_WIN_DRIVES_URL_REPLACE, @@ -265,6 +270,22 @@ public enum BrowserVersionFeatures { @BrowserFeature(FF) JS_CLIENTHEIGHT_RADIO_CHECKBOX_14, + /** ClientHeight for rb is 17. */ + @BrowserFeature({FF, FF_ESR}) + JS_CLIENTHEIGHT_RB_17, + + /** ClientHeight for rt is 9. */ + @BrowserFeature({FF, FF_ESR}) + JS_CLIENTHEIGHT_RT_9, + + /** ClientHeight for ruby is 17. */ + @BrowserFeature({FF, FF_ESR}) + JS_CLIENTHEIGHT_RUBY_17, + + /** ClientWidth for text/password input is 154. */ + @BrowserFeature(FF_ESR) + JS_CLIENTWIDTH_INPUT_TEXT_154, + /** ClientWidth for text/password input is 173. */ @BrowserFeature({CHROME, EDGE}) JS_CLIENTWIDTH_INPUT_TEXT_173, @@ -290,7 +311,7 @@ public enum BrowserVersionFeatures { JS_DOCUMENT_SELECTION_RANGE_COUNT, /** Javascript {@code Error.captureStackTrace}. */ - @BrowserFeature({CHROME, EDGE}) + @BrowserFeature({CHROME, EDGE, FF}) JS_ERROR_CAPTURE_STACK_TRACE, /** Javascript {@code Error.stackTraceLimit}. */ @@ -305,19 +326,10 @@ public enum BrowserVersionFeatures { @BrowserFeature({FF, FF_ESR}) JS_EVENT_KEYBOARD_CTOR_WHICH, - /** do not trigger the onload event if the frame content - * was not shown because of the csp. */ - @BrowserFeature(FF_ESR) - JS_EVENT_LOAD_SUPPRESSED_BY_CONTENT_SECURIRY_POLICY, - /** form.dispatchEvent(e) submits the form if the event is of type 'submit'. */ @BrowserFeature({FF, FF_ESR}) JS_FORM_DISPATCHEVENT_SUBMITS, - /** HTMLObject Validity isValid ignores custom error property. */ - @BrowserFeature({CHROME, EDGE}) - JS_HTML_OBJECT_VALIDITYSTATE_ISVALID_IGNORES_CUSTOM_ERROR, - /** Executes the {@code onload} handler, regardless of the whether the element was already attached to the page. */ @BrowserFeature({FF, FF_ESR}) JS_IFRAME_ALWAYS_EXECUTE_ONLOAD, @@ -412,14 +424,14 @@ public enum BrowserVersionFeatures { @BrowserFeature({FF, FF_ESR}) JS_STORAGE_PRESERVED_INCLUDED, + /** Indicates letterSpacing support percent values. */ + @BrowserFeature(FF) + JS_STYLE_LETTER_SPACING_ACCEPTS_PERCENT, + /** Indicates wordSpacing support percent values. */ @BrowserFeature({FF, FF_ESR}) JS_STYLE_WORD_SPACING_ACCEPTS_PERCENT, - /** Set span zo zero if provided value is invalid. */ - @BrowserFeature({CHROME, EDGE}) - JS_TABLE_SPAN_SET_ZERO_IF_INVALID, - /** window.getComputedStyle works with pseudo selectors without colon in front. */ @BrowserFeature({CHROME, EDGE}) JS_WINDOW_COMPUTED_STYLE_PSEUDO_ACCEPT_WITHOUT_COLON, @@ -429,10 +441,10 @@ public enum BrowserVersionFeatures { JS_WINDOW_INSTALL_TRIGGER_NULL, /** - * Difference of window.outer/inner height is 136. + * Difference of window.outer/inner height is 138. */ @BrowserFeature(EDGE) - JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_136, + JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_138, /** * Difference of window.outer/inner height is 147. @@ -443,9 +455,15 @@ public enum BrowserVersionFeatures { /** * Difference of window.outer/inner height is 91. */ - @BrowserFeature({FF, FF_ESR}) + @BrowserFeature(FF_ESR) JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_91, + /** + * Difference of window.outer/inner height is 93. + */ + @BrowserFeature(FF) + JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_93, + /** Window.getSelection returns null, if the window is not visible. */ @BrowserFeature({FF, FF_ESR}) JS_WINDOW_SELECTION_NULL_IF_INVISIBLE, diff --git a/src/main/java/org/htmlunit/Cache.java b/src/main/java/org/htmlunit/Cache.java index b9ad5bf8a86..3b9e14523d0 100644 --- a/src/main/java/org/htmlunit/Cache.java +++ b/src/main/java/org/htmlunit/Cache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -169,7 +169,7 @@ else if (response.getResponseHeaderValue(HttpHeader.LAST_MODIFIED) != null) { * @param request the request corresponding to the specified compiled script * @param response the response corresponding to the specified compiled script * @param toCache the object that is to be cached, if possible (may be for instance a compiled script or - * simply a WebResponse) + * simply a WebResponse) * @return whether the response was cached or not */ public boolean cacheIfPossible(final WebRequest request, final WebResponse response, final Object toCache) { diff --git a/src/main/java/org/htmlunit/ClipboardHandler.java b/src/main/java/org/htmlunit/ClipboardHandler.java index 5bb4ae0bacc..e00a2a57097 100644 --- a/src/main/java/org/htmlunit/ClipboardHandler.java +++ b/src/main/java/org/htmlunit/ClipboardHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/CollectingAlertHandler.java b/src/main/java/org/htmlunit/CollectingAlertHandler.java index e86c785ca5b..76ca4d2aae2 100644 --- a/src/main/java/org/htmlunit/CollectingAlertHandler.java +++ b/src/main/java/org/htmlunit/CollectingAlertHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/ConfirmHandler.java b/src/main/java/org/htmlunit/ConfirmHandler.java index 77c3727c58a..1502869f3e2 100644 --- a/src/main/java/org/htmlunit/ConfirmHandler.java +++ b/src/main/java/org/htmlunit/ConfirmHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,9 @@ * are triggered when the JavaScript function window.confirm() is invoked. * * @author Mike Bowler + * @author Ronald Brill */ +@FunctionalInterface public interface ConfirmHandler extends Serializable { /** diff --git a/src/main/java/org/htmlunit/CookieManager.java b/src/main/java/org/htmlunit/CookieManager.java index ce71e3ae66b..063e3c417da 100644 --- a/src/main/java/org/htmlunit/CookieManager.java +++ b/src/main/java/org/htmlunit/CookieManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/DefaultCredentialsProvider.java b/src/main/java/org/htmlunit/DefaultCredentialsProvider.java index 59012821abe..b9c3478866e 100644 --- a/src/main/java/org/htmlunit/DefaultCredentialsProvider.java +++ b/src/main/java/org/htmlunit/DefaultCredentialsProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ public class DefaultCredentialsProvider implements CredentialsProvider, Serializ /** The {@code null} value represents any host. */ public static final String ANY_HOST = null; - /**The {@code -1} value represents any port. */ + /** The {@code -1} value represents any port. */ public static final int ANY_PORT = -1; /** The {@code null} value represents any realm. */ diff --git a/src/main/java/org/htmlunit/DefaultCssErrorHandler.java b/src/main/java/org/htmlunit/DefaultCssErrorHandler.java index 6cb7c625360..ecbc2bbc23b 100644 --- a/src/main/java/org/htmlunit/DefaultCssErrorHandler.java +++ b/src/main/java/org/htmlunit/DefaultCssErrorHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/DefaultPageCreator.java b/src/main/java/org/htmlunit/DefaultPageCreator.java index 1b0f996d933..85aff6db4ca 100644 --- a/src/main/java/org/htmlunit/DefaultPageCreator.java +++ b/src/main/java/org/htmlunit/DefaultPageCreator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -297,7 +297,7 @@ protected HtmlPage createHtmlPage(final WebResponse webResponse, final WebWindow final HtmlPage page = new HtmlPage(webResponse, webWindow); webWindow.setEnclosedPage(page); - HTML_PARSER.parse(webResponse, page, false, false); + HTML_PARSER.parse(webWindow.getWebClient(), webResponse, page, false, false); return page; } @@ -313,7 +313,7 @@ protected XHtmlPage createXHtmlPage(final WebResponse webResponse, final WebWind final XHtmlPage page = new XHtmlPage(webResponse, webWindow); webWindow.setEnclosedPage(page); - HTML_PARSER.parse(webResponse, page, true, false); + HTML_PARSER.parse(webWindow.getWebClient(), webResponse, page, true, false); return page; } diff --git a/src/main/java/org/htmlunit/DialogWindow.java b/src/main/java/org/htmlunit/DialogWindow.java index 571a691f723..12e5e0ac4a7 100644 --- a/src/main/java/org/htmlunit/DialogWindow.java +++ b/src/main/java/org/htmlunit/DialogWindow.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/DownloadedContent.java b/src/main/java/org/htmlunit/DownloadedContent.java index a3654cb8d20..29d6d2443dc 100644 --- a/src/main/java/org/htmlunit/DownloadedContent.java +++ b/src/main/java/org/htmlunit/DownloadedContent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/ElementNotFoundException.java b/src/main/java/org/htmlunit/ElementNotFoundException.java index 18341269852..3f178ad5159 100644 --- a/src/main/java/org/htmlunit/ElementNotFoundException.java +++ b/src/main/java/org/htmlunit/ElementNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/FailingHttpStatusCodeException.java b/src/main/java/org/htmlunit/FailingHttpStatusCodeException.java index 1ccc2ff1089..98b652d6803 100644 --- a/src/main/java/org/htmlunit/FailingHttpStatusCodeException.java +++ b/src/main/java/org/htmlunit/FailingHttpStatusCodeException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/FormEncodingType.java b/src/main/java/org/htmlunit/FormEncodingType.java index d395c57c560..1033fef81f5 100644 --- a/src/main/java/org/htmlunit/FormEncodingType.java +++ b/src/main/java/org/htmlunit/FormEncodingType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/FrameContentHandler.java b/src/main/java/org/htmlunit/FrameContentHandler.java index 0bde91b58de..90917500cba 100644 --- a/src/main/java/org/htmlunit/FrameContentHandler.java +++ b/src/main/java/org/htmlunit/FrameContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ * * @author Ronald Brill */ +@FunctionalInterface public interface FrameContentHandler { /** diff --git a/src/main/java/org/htmlunit/History.java b/src/main/java/org/htmlunit/History.java index 6122e714716..15ac7a25907 100644 --- a/src/main/java/org/htmlunit/History.java +++ b/src/main/java/org/htmlunit/History.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/HttpHeader.java b/src/main/java/org/htmlunit/HttpHeader.java index d61c962bf34..b71be6f696c 100644 --- a/src/main/java/org/htmlunit/HttpHeader.java +++ b/src/main/java/org/htmlunit/HttpHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/HttpMethod.java b/src/main/java/org/htmlunit/HttpMethod.java index a77391a2234..36002469782 100644 --- a/src/main/java/org/htmlunit/HttpMethod.java +++ b/src/main/java/org/htmlunit/HttpMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/HttpWebConnection.java b/src/main/java/org/htmlunit/HttpWebConnection.java index 7f266d0ebb2..a5304245782 100644 --- a/src/main/java/org/htmlunit/HttpWebConnection.java +++ b/src/main/java/org/htmlunit/HttpWebConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -426,7 +426,8 @@ private static Charset getCharset(final Charset charset, final List 127) { return charset; } @@ -1288,6 +1289,8 @@ public synchronized String toString() { @Override public void close() { httpClientBuilder_.clear(); + sharedAuthCache_.clear(); + httpClientContextByThread_.clear(); if (connectionManager_ != null) { connectionManager_.shutdown(); diff --git a/src/main/java/org/htmlunit/ImmediateRefreshHandler.java b/src/main/java/org/htmlunit/ImmediateRefreshHandler.java index 9aa782d7d51..de10d5746cd 100644 --- a/src/main/java/org/htmlunit/ImmediateRefreshHandler.java +++ b/src/main/java/org/htmlunit/ImmediateRefreshHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/IncorrectnessListener.java b/src/main/java/org/htmlunit/IncorrectnessListener.java index c7d539e5872..be471515020 100644 --- a/src/main/java/org/htmlunit/IncorrectnessListener.java +++ b/src/main/java/org/htmlunit/IncorrectnessListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,9 @@ * that HtmlUnit can handle but that denote a badly written application. * * @author Marc Guillemot + * @author Ronald Brill */ +@FunctionalInterface public interface IncorrectnessListener { /** diff --git a/src/main/java/org/htmlunit/IncorrectnessListenerImpl.java b/src/main/java/org/htmlunit/IncorrectnessListenerImpl.java index ddf3bf0ab3d..b966c7c19e0 100644 --- a/src/main/java/org/htmlunit/IncorrectnessListenerImpl.java +++ b/src/main/java/org/htmlunit/IncorrectnessListenerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/MockWebConnection.java b/src/main/java/org/htmlunit/MockWebConnection.java index 52e5c4c6bdf..4e28befb684 100644 --- a/src/main/java/org/htmlunit/MockWebConnection.java +++ b/src/main/java/org/htmlunit/MockWebConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -386,7 +386,7 @@ public void setResponse(final URL url, final String content, final String conten * @param title the title of the page */ public void setResponseAsGenericHtml(final URL url, final String title) { - final String content = "" + title + ""; + final String content = "" + title + ""; setResponse(url, content); } diff --git a/src/main/java/org/htmlunit/NiceRefreshHandler.java b/src/main/java/org/htmlunit/NiceRefreshHandler.java index 58d61966d4e..0a369a13082 100644 --- a/src/main/java/org/htmlunit/NiceRefreshHandler.java +++ b/src/main/java/org/htmlunit/NiceRefreshHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/NicelyResynchronizingAjaxController.java b/src/main/java/org/htmlunit/NicelyResynchronizingAjaxController.java index 90e3b2b3e07..99305812765 100644 --- a/src/main/java/org/htmlunit/NicelyResynchronizingAjaxController.java +++ b/src/main/java/org/htmlunit/NicelyResynchronizingAjaxController.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/NotYetImplementedException.java b/src/main/java/org/htmlunit/NotYetImplementedException.java index e837e64928f..daeac7bdd2a 100644 --- a/src/main/java/org/htmlunit/NotYetImplementedException.java +++ b/src/main/java/org/htmlunit/NotYetImplementedException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/ObjectInstantiationException.java b/src/main/java/org/htmlunit/ObjectInstantiationException.java index 25a22cb349d..4645bcfeafb 100644 --- a/src/main/java/org/htmlunit/ObjectInstantiationException.java +++ b/src/main/java/org/htmlunit/ObjectInstantiationException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/OnbeforeunloadHandler.java b/src/main/java/org/htmlunit/OnbeforeunloadHandler.java index 401828f4fc8..232da80ac69 100644 --- a/src/main/java/org/htmlunit/OnbeforeunloadHandler.java +++ b/src/main/java/org/htmlunit/OnbeforeunloadHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/Page.java b/src/main/java/org/htmlunit/Page.java index 57f40739fe2..e721620594d 100644 --- a/src/main/java/org/htmlunit/Page.java +++ b/src/main/java/org/htmlunit/Page.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/PageCreator.java b/src/main/java/org/htmlunit/PageCreator.java index 0d134e25403..d774a5fb750 100644 --- a/src/main/java/org/htmlunit/PageCreator.java +++ b/src/main/java/org/htmlunit/PageCreator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/PrintHandler.java b/src/main/java/org/htmlunit/PrintHandler.java index cf7ebfad005..1cf16eff3da 100644 --- a/src/main/java/org/htmlunit/PrintHandler.java +++ b/src/main/java/org/htmlunit/PrintHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/PromptHandler.java b/src/main/java/org/htmlunit/PromptHandler.java index 5947e7baf0e..484aa3cc45b 100644 --- a/src/main/java/org/htmlunit/PromptHandler.java +++ b/src/main/java/org/htmlunit/PromptHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/ProxyConfig.java b/src/main/java/org/htmlunit/ProxyConfig.java index c4433cddb54..5b3aca2dbf9 100644 --- a/src/main/java/org/htmlunit/ProxyConfig.java +++ b/src/main/java/org/htmlunit/ProxyConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -156,7 +156,7 @@ public void removeHostsFromProxyBypass(final String pattern) { * configured proxy. * @param hostname the name of the host to check * @return {@code true} if the host with the specified hostname should be accessed bypassing the - * configured proxy, {@code false} otherwise. + * configured proxy, {@code false} otherwise. */ protected boolean shouldBypassProxy(final String hostname) { boolean bypass = false; diff --git a/src/main/java/org/htmlunit/RefreshHandler.java b/src/main/java/org/htmlunit/RefreshHandler.java index b05f15addb1..aec83a4600b 100644 --- a/src/main/java/org/htmlunit/RefreshHandler.java +++ b/src/main/java/org/htmlunit/RefreshHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/Screen.java b/src/main/java/org/htmlunit/Screen.java index 7c9f382d46f..739c5131858 100644 --- a/src/main/java/org/htmlunit/Screen.java +++ b/src/main/java/org/htmlunit/Screen.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/ScriptException.java b/src/main/java/org/htmlunit/ScriptException.java index c8687e62bda..275b3248f57 100644 --- a/src/main/java/org/htmlunit/ScriptException.java +++ b/src/main/java/org/htmlunit/ScriptException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,8 +52,8 @@ public class ScriptException extends RuntimeException { * @param page the page in which the script causing this exception was executed * @param throwable the exception that was thrown from the script engine * @param scriptSourceCode the code that was being executed when this exception - * was thrown. This may be null if the exception was not caused by execution - * of JavaScript. + * was thrown. This may be null if the exception was not caused by execution + * of JavaScript. */ public ScriptException(final HtmlPage page, final Throwable throwable, final String scriptSourceCode) { @@ -192,7 +192,7 @@ public String getScriptSourceCode() { * thrown. * * @return the line of source or an empty string if the exception was not thrown - * due to the execution of a script. + * due to the execution of a script. */ public String getFailingLine() { final int lineNumber = getFailingLineNumber(); @@ -218,7 +218,7 @@ public String getFailingLine() { * Returns the line number of the source that was executing at the time of the exception. * * @return the line number or -1 if the exception was not thrown due to the - * execution of a script. + * execution of a script. */ public int getFailingLineNumber() { if (getCause() instanceof RhinoException) { @@ -233,7 +233,7 @@ public int getFailingLineNumber() { * Returns the column number of the source that was executing at the time of the exception. * * @return the column number or -1 if the exception was not thrown due to the - * execution of a script. + * execution of a script. */ public int getFailingColumnNumber() { if (getCause() instanceof RhinoException) { diff --git a/src/main/java/org/htmlunit/ScriptPreProcessor.java b/src/main/java/org/htmlunit/ScriptPreProcessor.java index c8eb14602fd..b5c0ede9770 100644 --- a/src/main/java/org/htmlunit/ScriptPreProcessor.java +++ b/src/main/java/org/htmlunit/ScriptPreProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/ScriptResult.java b/src/main/java/org/htmlunit/ScriptResult.java index 554c8103672..c30b5630433 100644 --- a/src/main/java/org/htmlunit/ScriptResult.java +++ b/src/main/java/org/htmlunit/ScriptResult.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/SgmlPage.java b/src/main/java/org/htmlunit/SgmlPage.java index 6b643e27f63..33250378c75 100644 --- a/src/main/java/org/htmlunit/SgmlPage.java +++ b/src/main/java/org/htmlunit/SgmlPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -347,24 +347,23 @@ public Comment createComment(final String data) { * Create a new NodeIterator over the subtree rooted at the * specified node. * @param root The node which will be iterated together with its - * children. The NodeIterator is initially positioned - * just before this node. The whatToShow flags and the - * filter, if any, are not considered when setting this position. The - * root must not be null. + * children. The NodeIterator is initially positioned + * just before this node. The whatToShow flags and the + * filter, if any, are not considered when setting this position. The + * root must not be null. * @param whatToShow This flag specifies which node types may appear in - * the logical view of the tree presented by the - * NodeIterator. See the description of - * NodeFilter for the set of possible SHOW_ - * values.These flags can be combined using OR. + * the logical view of the tree presented by the + * NodeIterator. See the description of + * NodeFilter for the set of possible SHOW_ + * values.These flags can be combined using OR. * @param filter The NodeFilter to be used with this - * NodeIterator, or null to indicate no - * filter. + * NodeIterator, or null to indicate no + * filter. * @param entityReferenceExpansion The value of this flag determines - * whether entity reference nodes are expanded. + * whether entity reference nodes are expanded. * @return The newly created NodeIterator. * @exception DOMException - * NOT_SUPPORTED_ERR: Raised if the specified root is - * null. + * NOT_SUPPORTED_ERR: Raised if the specified root is null. */ public DomNodeIterator createNodeIterator(final Node root, final int whatToShow, final NodeFilter filter, final boolean entityReferenceExpansion) throws DOMException { diff --git a/src/main/java/org/htmlunit/SilentCssErrorHandler.java b/src/main/java/org/htmlunit/SilentCssErrorHandler.java index 88d44bf8f9d..c7022d09a81 100644 --- a/src/main/java/org/htmlunit/SilentCssErrorHandler.java +++ b/src/main/java/org/htmlunit/SilentCssErrorHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/SilentIncorrectnessListener.java b/src/main/java/org/htmlunit/SilentIncorrectnessListener.java index fe95df873b2..e8e1dfa1995 100644 --- a/src/main/java/org/htmlunit/SilentIncorrectnessListener.java +++ b/src/main/java/org/htmlunit/SilentIncorrectnessListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/StatusHandler.java b/src/main/java/org/htmlunit/StatusHandler.java index f1a7a07c8d4..2ea5ff8be5b 100644 --- a/src/main/java/org/htmlunit/StatusHandler.java +++ b/src/main/java/org/htmlunit/StatusHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/StorageHolder.java b/src/main/java/org/htmlunit/StorageHolder.java index 73e4e970334..19b917817a7 100644 --- a/src/main/java/org/htmlunit/StorageHolder.java +++ b/src/main/java/org/htmlunit/StorageHolder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/StringWebResponse.java b/src/main/java/org/htmlunit/StringWebResponse.java index 5ac6e4e6464..0f1d0fbd791 100644 --- a/src/main/java/org/htmlunit/StringWebResponse.java +++ b/src/main/java/org/htmlunit/StringWebResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/TextPage.java b/src/main/java/org/htmlunit/TextPage.java index fe21deaf77f..1c30e4c721d 100644 --- a/src/main/java/org/htmlunit/TextPage.java +++ b/src/main/java/org/htmlunit/TextPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/ThreadedRefreshHandler.java b/src/main/java/org/htmlunit/ThreadedRefreshHandler.java index b2925a38d2a..756f11401e8 100644 --- a/src/main/java/org/htmlunit/ThreadedRefreshHandler.java +++ b/src/main/java/org/htmlunit/ThreadedRefreshHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/TopLevelWindow.java b/src/main/java/org/htmlunit/TopLevelWindow.java index 99bf5c5dfa4..178006f2c30 100644 --- a/src/main/java/org/htmlunit/TopLevelWindow.java +++ b/src/main/java/org/htmlunit/TopLevelWindow.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -115,7 +115,7 @@ public void close() { * * Closes this window. * @param ignoreOnbeforeunloadAccepted if true the result of triggering the OnbeforeunloadAccepted event - * will be ignored + * will be ignored */ public void close(final boolean ignoreOnbeforeunloadAccepted) { final Page page = getEnclosedPage(); diff --git a/src/main/java/org/htmlunit/UnexpectedPage.java b/src/main/java/org/htmlunit/UnexpectedPage.java index 2040e4afaf0..faa027e247d 100644 --- a/src/main/java/org/htmlunit/UnexpectedPage.java +++ b/src/main/java/org/htmlunit/UnexpectedPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/Version.java b/src/main/java/org/htmlunit/Version.java index d737e259004..dcb6d452021 100644 --- a/src/main/java/org/htmlunit/Version.java +++ b/src/main/java/org/htmlunit/Version.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,6 +79,6 @@ public static String getProductVersion() { * @return the copyright notice */ public static String getCopyright() { - return "Copyright (c) 2002-2024 Gargoyle Software Inc. All rights reserved."; + return "Copyright (c) 2002-2025 Gargoyle Software Inc. All rights reserved."; } } diff --git a/src/main/java/org/htmlunit/WaitingRefreshHandler.java b/src/main/java/org/htmlunit/WaitingRefreshHandler.java index 91186fce65b..1d26563b47d 100644 --- a/src/main/java/org/htmlunit/WaitingRefreshHandler.java +++ b/src/main/java/org/htmlunit/WaitingRefreshHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/WebAssert.java b/src/main/java/org/htmlunit/WebAssert.java index ceaa25d46fd..612e444cc46 100644 --- a/src/main/java/org/htmlunit/WebAssert.java +++ b/src/main/java/org/htmlunit/WebAssert.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/WebClient.java b/src/main/java/org/htmlunit/WebClient.java index 08f92818e53..c17eedc9094 100644 --- a/src/main/java/org/htmlunit/WebClient.java +++ b/src/main/java/org/htmlunit/WebClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -99,6 +99,10 @@ import org.htmlunit.util.MimeType; import org.htmlunit.util.NameValuePair; import org.htmlunit.util.UrlUtils; +import org.htmlunit.websocket.JettyWebSocketAdapter.JettyWebSocketAdapterFactory; +import org.htmlunit.websocket.WebSocketAdapter; +import org.htmlunit.websocket.WebSocketAdapterFactory; +import org.htmlunit.websocket.WebSocketListener; import org.htmlunit.webstart.WebStartHandler; /** @@ -147,6 +151,7 @@ * @author René Schwietzke * @author Sven Strickroth */ +@SuppressWarnings("PMD.TooManyFields") public class WebClient implements Serializable, AutoCloseable { /** Logging support. */ @@ -191,6 +196,7 @@ public class WebClient implements Serializable, AutoCloseable { private transient WebConnection webConnection_; private CredentialsProvider credentialsProvider_ = new DefaultCredentialsProvider(); private CookieManager cookieManager_ = new CookieManager(); + private WebSocketAdapterFactory webSocketAdapterFactory_; private transient AbstractJavaScriptEngine scriptEngine_; private transient List loadQueue_; private final Map requestHeaders_ = Collections.synchronizedMap(new HashMap<>(89)); @@ -332,6 +338,8 @@ public WebClient(final BrowserVersion browserVersion, final boolean javaScriptEn } loadQueue_ = new ArrayList<>(); + webSocketAdapterFactory_ = new JettyWebSocketAdapterFactory(); + // The window must be constructed AFTER the script engine. currentWindowTracker_ = new CurrentWindowTracker(this, true); currentWindow_ = new TopLevelWindow("", this); @@ -507,7 +515,8 @@

P getPage(final WebWindow webWindow, final WebRequest webReques /** * Convenient method to build a URL and load it into the current WebWindow as it would be done * by {@link #getPage(WebWindow, WebRequest)}. - * @param url the URL of the new content + * @param url the URL of the new content; in contrast to real browsers plain file url's are not supported. + * You have to use the 'file', 'data', 'blob', 'http' or 'https' protocol. * @param

the page type * @return the new page * @throws FailingHttpStatusCodeException if the server returns a failing status code AND the property @@ -523,7 +532,8 @@ public

P getPage(final String url) throws IOException, FailingH /** * Convenient method to load a URL into the current top WebWindow as it would be done * by {@link #getPage(WebWindow, WebRequest)}. - * @param url the URL of the new content + * @param url the URL of the new content; in contrast to real browsers plain file url's are not supported. + * You have to use the 'file', 'data', 'blob', 'http' or 'https' protocol. * @param

the page type * @return the new page * @throws FailingHttpStatusCodeException if the server returns a failing status code AND the property @@ -534,7 +544,6 @@ public

P getPage(final URL url) throws IOException, FailingHttp final WebRequest request = new WebRequest(url, getBrowserVersion().getHtmlAcceptHeader(), getBrowserVersion().getAcceptEncodingHeader()); request.setCharset(UTF_8); - return getPage(getCurrentWindow().getTopWindow(), request); } @@ -589,7 +598,7 @@ public Page loadWebResponseInto(final WebResponse webResponse, final WebWindow w * @param webResponse the response that will be used to create the new page * @param webWindow the window that the new page will be placed within * @param forceAttachmentWithFilename if not {@code null}, handle this as an attachment with the specified name - * or if an empty string ("") use the filename provided in the response + * or if an empty string ("") use the filename provided in the response * @throws IOException if an IO error occurs * @throws FailingHttpStatusCodeException if the server returns a failing status code AND the property * {@link WebClientOptions#setThrowExceptionOnFailingStatusCode(boolean)} is set to true @@ -1539,7 +1548,8 @@ private WebResponse makeWebResponseForJavaScriptUrl(final WebWindow webWindow, f * @return the WebResponse */ public WebResponse loadWebResponse(final WebRequest webRequest) throws IOException { - switch (webRequest.getUrl().getProtocol()) { + final String protocol = webRequest.getUrl().getProtocol(); + switch (protocol) { case UrlUtils.ABOUT: return makeWebResponseForAboutUrl(webRequest); @@ -1552,8 +1562,12 @@ public WebResponse loadWebResponse(final WebRequest webRequest) throws IOExcepti case "blob": return makeWebResponseForBlobUrl(webRequest); - default: + case "http": + case "https": return loadWebResponseFromWebConnection(webRequest, ALLOWED_REDIRECTIONS_SAME_URL); + + default: + throw new IOException("Unsupported protocol '" + protocol + "'"); } } @@ -2080,7 +2094,7 @@ public void setClipboardHandler(final ClipboardHandler handler) { /** * Returns the current {@link PrintHandler}. * @return the current {@link PrintHandler} or null if print - * requests are ignored + * requests are ignored */ public PrintHandler getPrintHandler() { return printHandler_; @@ -2091,7 +2105,7 @@ public PrintHandler getPrintHandler() { * (Printing Spec). * * @param handler the new {@link PrintHandler} or null if you like to - * ignore print requests (default is null) + * ignore print requests (default is null) */ public void setPrintHandler(final PrintHandler handler) { printHandler_ = handler; @@ -2540,6 +2554,7 @@ private void readObject(final ObjectInputStream in) throws IOException, ClassNot scriptEngine_ = new JavaScriptEngine(this); jobManagers_ = Collections.synchronizedList(new ArrayList<>()); loadQueue_ = new ArrayList<>(); + css3ParserPool_ = new CSS3ParserPool(); } private static class LoadJob { @@ -2589,13 +2604,12 @@ public boolean isOutdated() { * @param target the name of the target window * @param request the request to perform * @param checkHash if true check for hashChenage - * @param forceLoad if true always load the request even if there is already the same in the queue * @param forceAttachmentWithFilename if not {@code null} the AttachmentHandler isAttachment() method is not called, - * the response has to be handled as attachment in any case + * the response has to be handled as attachment in any case * @param description information about the origin of the request. Useful for debugging. */ public void download(final WebWindow requestingWindow, final String target, - final WebRequest request, final boolean checkHash, final boolean forceLoad, + final WebRequest request, final boolean checkHash, final String forceAttachmentWithFilename, final String description) { final WebWindow targetWindow = resolveWindow(requestingWindow, target); @@ -2632,9 +2646,7 @@ public void download(final WebWindow requestingWindow, final String target, final WebRequest otherRequest = otherLoadJob.request_; final URL otherUrl = otherRequest.getUrl(); - // TODO: investigate but it seems that IE considers query string too but not FF - if (!forceLoad - && url.getPath().equals(otherUrl.getPath()) // fail fast + if (url.getPath().equals(otherUrl.getPath()) // fail fast && url.toString().equals(otherUrl.toString()) && request.getRequestParameters().equals(otherRequest.getRequestParameters()) && Objects.equals(request.getRequestBody(), otherRequest.getRequestBody())) { @@ -2863,7 +2875,7 @@ public HtmlPage loadHtmlCodeIntoCurrentWindow(final String htmlCode) throws IOEx final HtmlPage page = new HtmlPage(webResponse, webWindow); webWindow.setEnclosedPage(page); - htmlParser.parse(webResponse, page, false, false); + htmlParser.parse(this, webResponse, page, false, false); return page; } @@ -2884,15 +2896,34 @@ public XHtmlPage loadXHtmlCodeIntoCurrentWindow(final String xhtmlCode) throws I final XHtmlPage page = new XHtmlPage(webResponse, webWindow); webWindow.setEnclosedPage(page); - htmlParser.parse(webResponse, page, true, false); + htmlParser.parse(this, webResponse, page, true, false); return page; } + /** + * Creates a new {@link WebSocketAdapter}. + * + * @param webSocketListener the {@link WebSocketListener} + * @return a new {@link WebSocketAdapter} + */ + public WebSocketAdapter buildWebSocketAdapter(final WebSocketListener webSocketListener) { + return webSocketAdapterFactory_.buildWebSocketAdapter(this, webSocketListener); + } + + /** + * Defines a new factory method to create a new WebSocketAdapter. + * + * @param factory a {@link WebSocketAdapterFactory} + */ + public void setWebSocketAdapter(final WebSocketAdapterFactory factory) { + webSocketAdapterFactory_ = factory; + } + /** * INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
* * @return a CSS3Parser that will return to an internal pool for reuse if closed using the - * try-with-resource concept + * try-with-resource concept */ public PooledCSS3Parser getCSS3Parser() { return this.css3ParserPool_.get(); @@ -2919,7 +2950,7 @@ static class CSS3ParserPool { * Our pool. We only hold data when it is available. In addition, synchronization against * this deque is cheap. */ - private ConcurrentLinkedDeque parsers_ = new ConcurrentLinkedDeque<>(); + private final ConcurrentLinkedDeque parsers_ = new ConcurrentLinkedDeque<>(); /** * Fetch a new or recycled CSS3parser. Make sure you use the try-with-resource concept diff --git a/src/main/java/org/htmlunit/WebClientOptions.java b/src/main/java/org/htmlunit/WebClientOptions.java index 030d13981f1..71d0df3aacf 100644 --- a/src/main/java/org/htmlunit/WebClientOptions.java +++ b/src/main/java/org/htmlunit/WebClientOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,6 +37,7 @@ * @author Madis Pärn * @author Ronald Brill */ +@SuppressWarnings("PMD.TooManyFields") public class WebClientOptions implements Serializable { /** 1920. */ @@ -53,9 +54,9 @@ public class WebClientOptions implements Serializable { private boolean isRedirectEnabled_ = true; private File tempFileDirectory_; - private KeyStore sslClientCertificateStore_; + private transient KeyStore sslClientCertificateStore_; private char[] sslClientCertificatePassword_; - private KeyStore sslTrustStore_; + private transient KeyStore sslTrustStore_; private String[] sslClientProtocols_; private String[] sslClientCipherSuites_; @@ -82,6 +83,8 @@ public class WebClientOptions implements Serializable { private boolean geolocationEnabled_; private Geolocation geolocation_; + private int nekoReaderBufferSize_ = -1; + private boolean webSocketEnabled_ = true; private int webSocketMaxTextMessageSize_ = -1; private int webSocketMaxTextMessageBufferSize_ = -1; @@ -188,6 +191,7 @@ public boolean isRedirectEnabled() { * In some cases the impl seems to pick old certificates from the {@link KeyStore}. To avoid * that, wrap your {@link KeyStore} inside your own {@link KeyStore} impl and filter out outdated * certificates. + *

This property is transient (because KeyStore is not serializable) * * @param keyStore {@link KeyStore} to use * @param keyStorePassword the keystore password @@ -205,6 +209,7 @@ public void setSSLClientCertificateKeyStore(final KeyStore keyStore, final char[ * "sun.security.ssl.allowUnsafeRenegotiation" to true, as hinted in * * TLS Renegotiation Issue. + *

This property is transient (because KeyStore is not serializable) * * @param keyStoreUrl the URL which locates the certificate {@link KeyStore} * @param keyStorePassword the certificate {@link KeyStore} password @@ -253,6 +258,8 @@ public void setSSLClientCertificateKeyStore(final InputStream keyStoreInputStrea /** * Gets the SSLClientCertificateStore. + *

This property is transient (because KeyStore is not serializable) + * * @return the KeyStore for use on SSL connections */ public KeyStore getSSLClientCertificateStore() { @@ -541,8 +548,8 @@ public String getSSLInsecureProtocol() { /** * Sets the SSL server certificate trust store. All server certificates will be validated against * this trust store. - *

- * The needed parameters are used to construct a {@link java.security.KeyStore}. + *

This property is transient (because KeyStore is not serializable) + *

The needed parameters are used to construct a {@link java.security.KeyStore}. * * @param sslTrustStoreUrl the URL which locates the trust store * @param sslTrustStorePassword the trust store password @@ -564,6 +571,7 @@ void setSSLTrustStore(final KeyStore keyStore) { /** * Gets the SSL TrustStore. + *

This property is transient (because KeyStore is not serializable) * @return the SSL TrustStore for insecure SSL connections */ public KeyStore getSSLTrustStore() { @@ -635,8 +643,8 @@ public int getHistoryPageCacheLimit() { * entries in the history. For older entries only the url is saved; the page * will be (re)retrieved on demand. * @param historyPageCacheLimit maximum number of pages to cache in history - * default is Integer.MAX_VALUE; negative values are having the same effect - * as setting this to zero. + * default is Integer.MAX_VALUE; negative values are having the same effect + * as setting this to zero. */ public void setHistoryPageCacheLimit(final int historyPageCacheLimit) { historyPageCacheLimit_ = historyPageCacheLimit; @@ -720,6 +728,22 @@ public int getScreenHeight() { return screenHeight_; } + /** + * @return the Neko Html parser reader buffer size + */ + public int getNekoReaderBufferSize() { + return nekoReaderBufferSize_; + } + + /** + * Sets the Neko Html parser reader buffer size. + * + * @param nekoReaderBufferSize the new value + */ + public void setNekoReaderBufferSize(final int nekoReaderBufferSize) { + nekoReaderBufferSize_ = nekoReaderBufferSize; + } + /** * Enables/disables WebSocket support. By default, this property is enabled. * @@ -848,7 +872,10 @@ public void setGeolocation(final Geolocation geolocation) { geolocation_ = geolocation; } - public static class Geolocation { + /** + * Support class for Geolocation. + */ + public static class Geolocation implements Serializable { private final double accuracy_; private final double latitude_; private final double longitude_; diff --git a/src/main/java/org/htmlunit/WebConnection.java b/src/main/java/org/htmlunit/WebConnection.java index 758d96744f6..956d3f41f93 100644 --- a/src/main/java/org/htmlunit/WebConnection.java +++ b/src/main/java/org/htmlunit/WebConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/WebConsole.java b/src/main/java/org/htmlunit/WebConsole.java index 8d3de6d1b90..1656f3bf7bf 100644 --- a/src/main/java/org/htmlunit/WebConsole.java +++ b/src/main/java/org/htmlunit/WebConsole.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/WebRequest.java b/src/main/java/org/htmlunit/WebRequest.java index 2ef4fd3857b..137225f8c17 100644 --- a/src/main/java/org/htmlunit/WebRequest.java +++ b/src/main/java/org/htmlunit/WebRequest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,8 +54,12 @@ * @author Lai Quang Duong * @author Kristof Neirynck */ +@SuppressWarnings("PMD.TooManyFields") public class WebRequest implements Serializable { + /** + * Enum to configure request creation. + */ public enum HttpHint { /** Force to include the charset. */ IncludeCharsetInContentTypeHeader, @@ -456,7 +460,7 @@ public String getRequestBody() { * Other request types result in {@link RuntimeException}. * Should not be used in combination with {@link #setRequestParameters(List) request parameters}. * @param requestBody the body content to be submitted if this is a {@code POST}, {@code PUT} - * or {@code PATCH} request + * or {@code PATCH} request * @throws RuntimeException if the request parameters have already been set * or this is not a {@code POST}, {@code PUT} or {@code PATCH} request. */ @@ -556,17 +560,6 @@ public void setRefererHeader(final URL url) { } } - /** - * Sets the referer HTTP header - only if the provided url is valid. - * @param url the url for the referer HTTP header - * - * @deprecated as of version 4.5.0; use {@link #setRefererHeader(URL)} instead - */ - @Deprecated - public void setRefererlHeader(final URL url) { - setRefererHeader(url); - } - /** * Sets the specified name/value pair in the additional HTTP headers. * @param name the name of the additional HTTP header @@ -655,6 +648,10 @@ public void setDefaultResponseContentCharset(final Charset defaultResponseConten this.defaultResponseContentCharset_ = Objects.requireNonNull(defaultResponseContentCharset); } + /** + * @param hint the hint to check for + * @return true if the hint is enabled + */ public boolean hasHint(final HttpHint hint) { if (httpHints_ == null) { return false; @@ -662,6 +659,10 @@ public boolean hasHint(final HttpHint hint) { return httpHints_.contains(hint); } + /** + * Enables the hint. + * @param hint the hint to add + */ public void addHint(final HttpHint hint) { if (httpHints_ == null) { httpHints_ = EnumSet.noneOf(HttpHint.class); diff --git a/src/main/java/org/htmlunit/WebResponse.java b/src/main/java/org/htmlunit/WebResponse.java index c54359fd360..4661bde6bb1 100644 --- a/src/main/java/org/htmlunit/WebResponse.java +++ b/src/main/java/org/htmlunit/WebResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -174,25 +174,6 @@ public Charset getHeaderContentCharset() { return EncodingSniffer.extractEncodingFromContentType(contentType); } - /** - * Returns the content charset specified explicitly in the header or in the content, - * or {@code null} if none was specified. - * @return the content charset specified explicitly in the header or in the content, - * or {@code null} if none was specified - * - * @deprecated as of version 4.0.0; use {@link #getContentCharset()} instead - */ - @Deprecated - public Charset getContentCharsetOrNull() { - try (InputStream is = getContentAsStream()) { - return EncodingSniffer.sniffEncoding(getResponseHeaders(), is); - } - catch (final IOException e) { - LOG.warn("Error trying to sniff encoding.", e); - return null; - } - } - /** * Returns the content charset for this response, even if no charset was specified explicitly. *

@@ -257,9 +238,9 @@ public Charset getContentCharset() { * For example, HTML meta-tag sniffing can be fooled by text that looks-like-a-meta-tag inside * JavaScript code (false positive) or if the meta-tag is after the first 1024 bytes (false negative). * @return {@code true} if the charset of the previous call to {@link #getContentCharset()} was - * "tentative". + * "tentative". * @see - * https://html.spec.whatwg.org/multipage/parsing.html#concept-encoding-confidence + * https://html.spec.whatwg.org/multipage/parsing.html#concept-encoding-confidence */ public boolean wasContentCharsetTentative() { return wasContentCharsetTentative_; @@ -268,7 +249,7 @@ public boolean wasContentCharsetTentative() { /** * Returns the response content as a string, using the charset/encoding specified in the server response. * @return the response content as a string, using the charset/encoding specified in the server response - * or null if the content retrieval was failing + * or null if the content retrieval was failing */ public String getContentAsString() { return getContentAsString(getContentCharset()); @@ -362,15 +343,6 @@ public void cleanUp() { } } - /** - * Mark this response for using UTF-8 as default charset. - * @deprecated as of version 4.0.0; use {@link WebRequest#setDefaultResponseContentCharset(Charset)} instead - */ - @Deprecated - public void defaultCharsetUtf8() { - getWebRequest().setDefaultResponseContentCharset(UTF_8); - } - /** * @return true if the 2xx */ diff --git a/src/main/java/org/htmlunit/WebResponseData.java b/src/main/java/org/htmlunit/WebResponseData.java index bd9b11f9d5f..6f55e37a4ab 100644 --- a/src/main/java/org/htmlunit/WebResponseData.java +++ b/src/main/java/org/htmlunit/WebResponseData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -113,7 +113,7 @@ private InputStream getStream(final ByteOrderMark... bomHeaders) throws IOExcept LOG.error("Reading gzip encodec content failed.", e); stream.close(); stream = IOUtils.toInputStream( - "\n" + "\n" + "Problem loading page\n" + "\n" + "

Content Encoding Error

\n" @@ -136,7 +136,7 @@ private InputStream getStream(final ByteOrderMark... bomHeaders) throws IOExcept LOG.error("Reading Brotli encodec content failed.", e); stream.close(); stream = IOUtils.toInputStream( - "\n" + "\n" + "Problem loading page\n" + "\n" + "

Content Encoding Error

\n" diff --git a/src/main/java/org/htmlunit/WebResponseFromCache.java b/src/main/java/org/htmlunit/WebResponseFromCache.java index 1354fbaf09f..287d62fe213 100644 --- a/src/main/java/org/htmlunit/WebResponseFromCache.java +++ b/src/main/java/org/htmlunit/WebResponseFromCache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/WebWindow.java b/src/main/java/org/htmlunit/WebWindow.java index b6b44ecb0b0..09612fd7ce4 100644 --- a/src/main/java/org/htmlunit/WebWindow.java +++ b/src/main/java/org/htmlunit/WebWindow.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,7 +71,7 @@ public interface WebWindow extends Serializable { * is a top level window, then return this window. * * @return the top level window that contains this window or this - * window if there is no parent. + * window if there is no parent. */ WebWindow getTopWindow(); @@ -187,15 +187,15 @@ public interface WebWindow extends Serializable { Screen getScreen(); /** - * INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
- * + * INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
+ * * Returns computed style of the element. Computed style represents the final computed values * of all CSS properties for the element. This method's return value is of the same type as * that of element.style, but the value returned by this method is read-only. * * @param element the element * @param pseudoElement a string specifying the pseudo-element to match (may be {@code null}); - * e.g. ':before' + * e.g. ':before' * @return the computed style */ ComputedCssStyleDeclaration getComputedStyle(DomElement element, String pseudoElement); diff --git a/src/main/java/org/htmlunit/WebWindowAdapter.java b/src/main/java/org/htmlunit/WebWindowAdapter.java index c6f71d85dba..e23da1d128d 100644 --- a/src/main/java/org/htmlunit/WebWindowAdapter.java +++ b/src/main/java/org/htmlunit/WebWindowAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/WebWindowEvent.java b/src/main/java/org/htmlunit/WebWindowEvent.java index b1e440081a5..bbe17d7b1dc 100644 --- a/src/main/java/org/htmlunit/WebWindowEvent.java +++ b/src/main/java/org/htmlunit/WebWindowEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -169,7 +169,9 @@ public String toString() { return builder.toString(); } - /** @return the event type */ + /** + * @return the event type + */ public int getEventType() { return type_; } diff --git a/src/main/java/org/htmlunit/WebWindowImpl.java b/src/main/java/org/htmlunit/WebWindowImpl.java index 9d3f4fcb536..0fa11202ca0 100644 --- a/src/main/java/org/htmlunit/WebWindowImpl.java +++ b/src/main/java/org/htmlunit/WebWindowImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,10 @@ package org.htmlunit; import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_COMPUTED_STYLE_PSEUDO_ACCEPT_WITHOUT_COLON; -import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_136; +import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_138; import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_147; import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_91; +import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_93; import java.io.IOException; import java.io.ObjectInputStream; @@ -88,8 +89,12 @@ public WebWindowImpl(final WebClient webClient) { outerHeight_ = innerHeight_ + 91; outerWidth_ = innerWidth_ + 12; } - else if (webClient.getBrowserVersion().hasFeature(JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_136)) { - outerHeight_ = innerHeight_ + 136; + else if (webClient.getBrowserVersion().hasFeature(JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_93)) { + outerHeight_ = innerHeight_ + 93; + outerWidth_ = innerWidth_ + 16; + } + else if (webClient.getBrowserVersion().hasFeature(JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_138)) { + outerHeight_ = innerHeight_ + 138; outerWidth_ = innerWidth_ + 24; } else if (webClient.getBrowserVersion().hasFeature(JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_147)) { diff --git a/src/main/java/org/htmlunit/WebWindowListener.java b/src/main/java/org/htmlunit/WebWindowListener.java index 9c2752ef638..e111fc50c70 100644 --- a/src/main/java/org/htmlunit/WebWindowListener.java +++ b/src/main/java/org/htmlunit/WebWindowListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,10 @@ * process. This implies, the initial window is already open at the time you attach this listener. * Therefore you will receive no open event for this. *

+ *

+ * Caution: Frames and also iFrames are handled as separate windows. Therefore the listener is also + * called for each and every containing (i)Frame when e.g. closing a {@link TopLevelWindow}. + *

* * @author Mike Bowler * @author Ronald Brill @@ -37,7 +41,7 @@ public interface WebWindowListener { * This usually takes place AFTER the event was processed

* * @param event the event (the oldPage and newPage properties will be {@code null} - * because the event is generated after the window is opened but before the content is loaded) + * because the event is generated after the window is opened but before the content is loaded) */ void webWindowOpened(WebWindowEvent event); diff --git a/src/main/java/org/htmlunit/WebWindowNotFoundException.java b/src/main/java/org/htmlunit/WebWindowNotFoundException.java index 8c40836c47e..a0624ad929e 100644 --- a/src/main/java/org/htmlunit/WebWindowNotFoundException.java +++ b/src/main/java/org/htmlunit/WebWindowNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/attachment/Attachment.java b/src/main/java/org/htmlunit/attachment/Attachment.java index 2aeab16c191..3c2c0682897 100644 --- a/src/main/java/org/htmlunit/attachment/Attachment.java +++ b/src/main/java/org/htmlunit/attachment/Attachment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/attachment/AttachmentHandler.java b/src/main/java/org/htmlunit/attachment/AttachmentHandler.java index 6835646fcce..fa0e5138fe4 100644 --- a/src/main/java/org/htmlunit/attachment/AttachmentHandler.java +++ b/src/main/java/org/htmlunit/attachment/AttachmentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/attachment/CollectingAttachmentHandler.java b/src/main/java/org/htmlunit/attachment/CollectingAttachmentHandler.java index 8d63e7f30e1..3bd87518d39 100644 --- a/src/main/java/org/htmlunit/attachment/CollectingAttachmentHandler.java +++ b/src/main/java/org/htmlunit/attachment/CollectingAttachmentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/attachment/DownloadingAttachmentHandler.java b/src/main/java/org/htmlunit/attachment/DownloadingAttachmentHandler.java index 80ab43ffd5f..92d80ffe9ec 100644 --- a/src/main/java/org/htmlunit/attachment/DownloadingAttachmentHandler.java +++ b/src/main/java/org/htmlunit/attachment/DownloadingAttachmentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/attachment/package-info.java b/src/main/java/org/htmlunit/attachment/package-info.java index a17bceabe77..a487aac832e 100644 --- a/src/main/java/org/htmlunit/attachment/package-info.java +++ b/src/main/java/org/htmlunit/attachment/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/css/AbstractCssStyleDeclaration.java b/src/main/java/org/htmlunit/css/AbstractCssStyleDeclaration.java index 893ed286ca2..c0baff12da7 100644 --- a/src/main/java/org/htmlunit/css/AbstractCssStyleDeclaration.java +++ b/src/main/java/org/htmlunit/css/AbstractCssStyleDeclaration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -137,7 +137,7 @@ public String getStyleAttribute(final Definition definition1, final Definition d return element1.getValue(); } if (element1 != null) { - if (element1.compareTo(element2) > 0) { + if (StyleElement.compareToByImportanceAndSpecificity(element1, element2) > 0) { return element1.getValue(); } } @@ -437,6 +437,14 @@ public String getBackgroundRepeat() { return value; } + /** + * Gets the {@code blockSize} style attribute. + * @return the style attribute + */ + public String getBlockSize() { + return getStyleAttribute(Definition.BLOCK_SIZE, true); + } + /** * Gets the {@code borderBottomColor} style attribute. * @return the style attribute diff --git a/src/main/java/org/htmlunit/css/BrowserConfiguration.java b/src/main/java/org/htmlunit/css/BrowserConfiguration.java index a360971c379..2aa740da734 100644 --- a/src/main/java/org/htmlunit/css/BrowserConfiguration.java +++ b/src/main/java/org/htmlunit/css/BrowserConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/css/ComputedCssStyleDeclaration.java b/src/main/java/org/htmlunit/css/ComputedCssStyleDeclaration.java index 9ee4b96f342..702b704a269 100644 --- a/src/main/java/org/htmlunit/css/ComputedCssStyleDeclaration.java +++ b/src/main/java/org/htmlunit/css/ComputedCssStyleDeclaration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,10 @@ import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTHEIGHT_INPUT_18; import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTHEIGHT_RADIO_CHECKBOX_10; import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTHEIGHT_RADIO_CHECKBOX_14; +import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTHEIGHT_RB_17; +import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTHEIGHT_RT_9; +import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTHEIGHT_RUBY_17; +import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTWIDTH_INPUT_TEXT_154; import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTWIDTH_INPUT_TEXT_173; import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTWIDTH_RADIO_CHECKBOX_10; import static org.htmlunit.BrowserVersionFeatures.JS_CLIENTWIDTH_RADIO_CHECKBOX_14; @@ -43,6 +47,7 @@ import org.htmlunit.BrowserVersion; import org.htmlunit.BrowserVersionFeatures; import org.htmlunit.Page; +import org.htmlunit.SgmlPage; import org.htmlunit.WebWindow; import org.htmlunit.css.CssPixelValueConverter.CssValue; import org.htmlunit.css.StyleAttributes.Definition; @@ -86,6 +91,12 @@ import org.htmlunit.html.HtmlFileInput; import org.htmlunit.html.HtmlFooter; import org.htmlunit.html.HtmlHeader; +import org.htmlunit.html.HtmlHeading1; +import org.htmlunit.html.HtmlHeading2; +import org.htmlunit.html.HtmlHeading3; +import org.htmlunit.html.HtmlHeading4; +import org.htmlunit.html.HtmlHeading5; +import org.htmlunit.html.HtmlHeading6; import org.htmlunit.html.HtmlHiddenInput; import org.htmlunit.html.HtmlImage; import org.htmlunit.html.HtmlInlineFrame; @@ -103,6 +114,7 @@ import org.htmlunit.html.HtmlNoLayer; import org.htmlunit.html.HtmlNoScript; import org.htmlunit.html.HtmlOutput; +import org.htmlunit.html.HtmlPage; import org.htmlunit.html.HtmlPasswordInput; import org.htmlunit.html.HtmlPlainText; import org.htmlunit.html.HtmlRadioButtonInput; @@ -135,7 +147,6 @@ import org.htmlunit.html.HtmlUnknownElement; import org.htmlunit.html.HtmlVariable; import org.htmlunit.html.HtmlWordBreak; -import org.htmlunit.javascript.host.html.HTMLElement; import org.htmlunit.platform.Platform; /** @@ -201,7 +212,7 @@ public class ComputedCssStyleDeclaration extends AbstractCssStyleDeclaration { * The computed, cached height of the element to which this computed style belongs (no padding, borders, etc.), * not taking child elements into account. */ - private Integer height2_; + private Integer emptyHeight_; /** The computed, cached horizontal padding (left + right) of the element to which this computed style belongs. */ private Integer paddingHorizontal_; @@ -234,7 +245,7 @@ public class ComputedCssStyleDeclaration extends AbstractCssStyleDeclaration { public ComputedCssStyleDeclaration(final ElementCssStyleDeclaration styleDeclaration) { super(); elementStyleDeclaration_ = styleDeclaration; - getDomElement().setDefaults(this); + elementStyleDeclaration_.getDomElement().setDefaults(this); } /** @@ -499,7 +510,7 @@ public Map getStyleMap() { /** * @return the {@link DomElement} the backing {@link ElementCssStyleDeclaration} - * is associated with + * is associated with */ public DomElement getDomElement() { return elementStyleDeclaration_.getDomElement(); @@ -518,6 +529,10 @@ public String getBackgroundAttachment() { */ @Override public String getBackgroundColor() { + if (!getDomElement().isAttachedToPage()) { + return EMPTY_FINAL; + } + final String value = super.getBackgroundColor(); if (StringUtils.isEmpty(value)) { return Definition.BACKGROUND_COLOR.getDefaultComputedValue(getBrowserVersion()); @@ -550,6 +565,38 @@ public String getBackgroundRepeat() { return defaultIfEmpty(super.getBackgroundRepeat(), Definition.BACKGROUND_REPEAT); } + /** + * {@inheritDoc} + */ + @Override + public String getBlockSize() { + if (NONE.equals(getDisplay())) { + return defaultIfEmpty(super.getBlockSize(), Definition.BLOCK_SIZE); + } + + final DomElement domElem = getDomElement(); + if (!domElem.isAttachedToPage()) { + return defaultIfEmpty(super.getBlockSize(), Definition.BLOCK_SIZE); + } + + return CssPixelValueConverter.pixelString(domElem, new CssPixelValueConverter.CssValue(0, 0) { + @Override + public String get(final ComputedCssStyleDeclaration style) { + final String value = style.getStyleAttribute(Definition.HEIGHT, true); + if (StringUtils.isEmpty(value)) { + final String content = domElem.getVisibleText(); + // do this only for small content + // at least for empty div's this is more correct + if (null == content) { + return getDefaultValue() + "px"; + } + return getEmptyHeight(domElem) + "px"; + } + return value; + } + }); + } + /** * {@inheritDoc} */ @@ -724,11 +771,7 @@ public String getFontFamily() { */ @Override public String getFontSize() { - String value = getStyleAttribute(Definition.FONT_SIZE, true); - if (!value.isEmpty()) { - value = CssPixelValueConverter.pixelValue(value) + "px"; - } - return value; + return getStyleAttribute(Definition.FONT_SIZE, true); } /** @@ -752,16 +795,20 @@ public String getHeight() { if (!elem.isAttachedToPage()) { return ""; } - final int windowHeight = elem.getPage().getEnclosingWindow().getInnerHeight(); - return CssPixelValueConverter - .pixelString(elem, new CssPixelValueConverter.CssValue(0, windowHeight) { - @Override - public String get(final ComputedCssStyleDeclaration style) { - // TODO don't reach out to the js peer - final String offsetHeight = ((HTMLElement) elem.getScriptableObject()).getOffsetHeight() + "px"; - return defaultIfEmpty(style.getStyleAttribute(Definition.HEIGHT, true), offsetHeight, AUTO); - } - }); + + final ComputedCssStyleDeclaration style = elem.getPage().getEnclosingWindow().getComputedStyle(elem, null); + final String styleValue = style.getStyleAttribute(Definition.HEIGHT, true); + + if (styleValue == null || styleValue.isEmpty() || AUTO.equals(styleValue) || styleValue.endsWith("%")) { + final String calculatedHeight = style.getCalculatedHeight(false, false) + "px"; + return calculatedHeight; + } + + if (styleValue.endsWith("px")) { + return styleValue; + } + + return CssPixelValueConverter.pixelValue(styleValue) + "px"; } /** @@ -769,16 +816,24 @@ public String get(final ComputedCssStyleDeclaration style) { */ @Override public String getLeft() { + if (NONE.equals(getDisplay())) { + return AUTO; + } + + final DomElement elem = getDomElement(); + if (!elem.isAttachedToPage()) { + return ""; + } + final String superLeft = super.getLeft(); if (!superLeft.endsWith("%")) { return defaultIfEmpty(superLeft, AUTO, null); } - final DomElement element = getDomElement(); - return CssPixelValueConverter.pixelString(element, new CssPixelValueConverter.CssValue(0, 0) { + return CssPixelValueConverter.pixelString(elem, new CssPixelValueConverter.CssValue(0, 0) { @Override public String get(final ComputedCssStyleDeclaration style) { - if (style.getDomElement() == element) { + if (style.getDomElement() == elem) { return style.getStyleAttribute(Definition.LEFT, true); } return style.getStyleAttribute(Definition.WIDTH, true); @@ -973,19 +1028,24 @@ public String getTextIndent() { */ @Override public String getTop() { - final DomElement element = getDomElement(); - if (!element.isAttachedToPage()) { + if (NONE.equals(getDisplay())) { + return AUTO; + } + + final DomElement elem = getDomElement(); + if (!elem.isAttachedToPage()) { return ""; } + final String superTop = super.getTop(); if (!superTop.endsWith("%")) { return defaultIfEmpty(superTop, Definition.TOP); } - return CssPixelValueConverter.pixelString(element, new CssPixelValueConverter.CssValue(0, 0) { + return CssPixelValueConverter.pixelString(elem, new CssPixelValueConverter.CssValue(0, 0) { @Override public String get(final ComputedCssStyleDeclaration style) { - if (style.getDomElement() == element) { + if (style.getDomElement() == elem) { return style.getStyleAttribute(Definition.TOP, true); } return style.getStyleAttribute(Definition.HEIGHT, true); @@ -1156,6 +1216,10 @@ public String getWordSpacing() { */ @Override public String getZIndex() { + if (!getDomElement().isAttachedToPage()) { + return EMPTY_FINAL; + } + final String response = super.getZIndex(); if (response.isEmpty()) { return AUTO; @@ -1220,7 +1284,7 @@ else if ((ABSOLUTE.equals(p) || FIXED.equals(p)) && !AUTO.equals(r)) { parentWidth = getDomElement().getPage().getEnclosingWindow().getInnerWidth(); } else if (parent instanceof Page) { - parentWidth = (((Page) parent).getEnclosingWindow()).getInnerWidth(); + parentWidth = ((Page) parent).getEnclosingWindow().getInnerWidth(); } else { final ComputedCssStyleDeclaration parentStyle = @@ -1415,12 +1479,12 @@ public int getCalculatedHeight(final boolean includeBorder, final boolean includ if (!element.isAttachedToPage()) { return 0; } - int height = getCalculatedHeight(); + int height = getCalculatedHeight(element); if (!"border-box".equals(getStyleAttribute(Definition.BOX_SIZING, true))) { if (includeBorder) { height += getBorderVertical(); } - else if (isScrollable(true, true) && !(element instanceof HtmlBody)) { + else if (isScrollable(element, true, true) && !(element instanceof HtmlBody)) { height -= 17; } @@ -1435,14 +1499,12 @@ else if (isScrollable(true, true) && !(element instanceof HtmlBody)) { * Returns the element's calculated height, taking both relevant CSS and the element's children into account. * @return the element's calculated height, taking both relevant CSS and the element's children into account */ - private int getCalculatedHeight() { + private int getCalculatedHeight(final DomElement element) { final Integer cachedHeight = getCachedHeight(); if (cachedHeight != null) { return cachedHeight.intValue(); } - final DomElement element = getDomElement(); - if (element instanceof HtmlImage) { return updateCachedHeight(((HtmlImage) element).getHeightOrDefault()); } @@ -1456,7 +1518,7 @@ private int getCalculatedHeight() { } } - return updateCachedHeight(getEmptyHeight()); + return updateCachedHeight(getEmptyHeight(element)); } /** @@ -1476,7 +1538,7 @@ public int getCalculatedWidth(final boolean includeBorder, final boolean include if (includeBorder) { width += getBorderHorizontal(); } - else if (isScrollable(false, true) && !(element instanceof HtmlBody)) { + else if (isScrollable(element, false, true) && !(element instanceof HtmlBody)) { width -= 17; } @@ -1555,7 +1617,10 @@ else if (element instanceof HtmlTextInput || element instanceof HtmlPasswordInpu if (browserVersion.hasFeature(JS_CLIENTWIDTH_INPUT_TEXT_173)) { return 173; } - width = 154; // FF + if (browserVersion.hasFeature(JS_CLIENTWIDTH_INPUT_TEXT_154)) { + return 154; + } + width = 161; // FF } else if (element instanceof HtmlRadioButtonInput || element instanceof HtmlCheckBoxInput) { final BrowserVersion browserVersion = getDomElement().getPage().getWebClient().getBrowserVersion(); @@ -1624,7 +1689,8 @@ else if (child instanceof DomText) { final DomNode parent = child.getParentNode(); if (parent instanceof HtmlElement) { final ComputedCssStyleDeclaration style = webWindow.getComputedStyle((DomElement) parent, null); - final int height = browserVersion.getFontHeight(style.getFontSize()); + final int height = browserVersion.getFontHeight( + style.getStyleAttribute(Definition.FONT_SIZE, true)); width += child.getVisibleText().length() * (int) (height / 1.8f); } else { @@ -1636,33 +1702,34 @@ else if (child instanceof DomText) { } /** - * Returns the element's calculated height taking relevant CSS into account, but not the element's child - * elements. - * * @return the element's calculated height taking relevant CSS into account, but not the element's child * elements */ - private int getEmptyHeight() { - final Integer cachedHeight2 = getCachedHeight2(); - if (cachedHeight2 != null) { - return cachedHeight2.intValue(); + private int getEmptyHeight(final DomElement element) { + final Integer cachedEmptyHeight = getCachedEmptyHeight(); + if (cachedEmptyHeight != null) { + return cachedEmptyHeight.intValue(); } - final DomElement element = getDomElement(); if (!element.mayBeDisplayed()) { - return updateCachedHeight2(0); + return updateCachedEmptyHeight(0); } final String display = getDisplay(); if (NONE.equals(display)) { - return updateCachedHeight2(0); + return updateCachedEmptyHeight(0); } - final WebWindow webWindow = element.getPage().getEnclosingWindow(); + final SgmlPage page = element.getPage(); + final WebWindow webWindow = page.getEnclosingWindow(); final int windowHeight = webWindow.getInnerHeight(); if (element instanceof HtmlBody) { - return updateCachedHeight2(windowHeight); + if (page instanceof HtmlPage && ((HtmlPage) page).isQuirksMode()) { + return updateCachedEmptyHeight(windowHeight); + } + + return updateCachedEmptyHeight(0); } final boolean isInline = INLINE.equals(display) && !(element instanceof HtmlInlineFrame); @@ -1702,10 +1769,7 @@ private int getEmptyHeight() { || element instanceof HtmlNoLayer || element instanceof HtmlNoScript || element instanceof HtmlPlainText - || element instanceof HtmlRuby - || element instanceof HtmlRb || element instanceof HtmlRp - || element instanceof HtmlRt || element instanceof HtmlRtc || element instanceof HtmlS || element instanceof HtmlSample @@ -1773,11 +1837,105 @@ else if (element instanceof HtmlInlineFrame) { defaultHeight = 0; } } + else if (element instanceof HtmlRb) { + final BrowserVersion browser = webWindow.getWebClient().getBrowserVersion(); + if (browser.hasFeature(JS_CLIENTHEIGHT_RB_17)) { + defaultHeight = 17; + } + else { + defaultHeight = 0; + } + } + else if (element instanceof HtmlRt) { + final BrowserVersion browser = webWindow.getWebClient().getBrowserVersion(); + if (browser.hasFeature(JS_CLIENTHEIGHT_RT_9)) { + defaultHeight = 9; + } + else { + defaultHeight = 0; + } + } + else if (element instanceof HtmlRuby) { + final BrowserVersion browser = webWindow.getWebClient().getBrowserVersion(); + if (browser.hasFeature(JS_CLIENTHEIGHT_RUBY_17)) { + defaultHeight = 17; + } + else { + defaultHeight = 0; + } + } else { - final String fontSize = getFontSize(); + final String fontSize; + + boolean isHeading = false; + if (element instanceof HtmlHeading1) { + isHeading = true; + final String value = getStyleAttribute(Definition.FONT_SIZE, false); + if (value.isEmpty()) { + fontSize = "32px"; + } + else { + fontSize = getStyleAttribute(Definition.FONT_SIZE, true); + } + } + else if (element instanceof HtmlHeading2) { + isHeading = true; + final String value = getStyleAttribute(Definition.FONT_SIZE, false); + if (value.isEmpty()) { + fontSize = "24px"; + } + else { + fontSize = getStyleAttribute(Definition.FONT_SIZE, true); + } + } + else if (element instanceof HtmlHeading3) { + isHeading = true; + final String value = getStyleAttribute(Definition.FONT_SIZE, false); + if (value.isEmpty()) { + fontSize = "19px"; + } + else { + fontSize = getStyleAttribute(Definition.FONT_SIZE, true); + } + } + else if (element instanceof HtmlHeading4) { + isHeading = true; + final String value = getStyleAttribute(Definition.FONT_SIZE, false); + if (value.isEmpty()) { + fontSize = "16px"; + } + else { + fontSize = getStyleAttribute(Definition.FONT_SIZE, true); + } + } + else if (element instanceof HtmlHeading5) { + isHeading = true; + final String value = getStyleAttribute(Definition.FONT_SIZE, false); + if (value.isEmpty()) { + fontSize = "13px"; + } + else { + fontSize = getStyleAttribute(Definition.FONT_SIZE, true); + } + } + else if (element instanceof HtmlHeading6) { + isHeading = true; + final String value = getStyleAttribute(Definition.FONT_SIZE, false); + if (value.isEmpty()) { + fontSize = "11px"; + } + else { + fontSize = getStyleAttribute(Definition.FONT_SIZE, true); + } + } + else { + fontSize = getStyleAttribute(Definition.FONT_SIZE, true); + } + defaultHeight = webWindow.getWebClient().getBrowserVersion().getFontHeight(fontSize); - if (element instanceof HtmlDivision + if (isHeading + || element instanceof HtmlDivision || element instanceof HtmlSpan) { String width = getStyleAttribute(Definition.WIDTH, false); @@ -1811,6 +1969,13 @@ else if (element instanceof HtmlInlineFrame) { defaultHeight *= StringUtils.countMatches(content, '\n') + 1; } } + + final String styleHeight = getStyleAttribute(Definition.HEIGHT, true); + if (styleHeight.endsWith("%")) { + if (page instanceof HtmlPage && !((HtmlPage) page).isQuirksMode()) { + return defaultHeight; + } + } } } @@ -1835,7 +2000,7 @@ else if (element instanceof HtmlInlineFrame) { height = defaultHeight; } - return updateCachedHeight2(height); + return updateCachedEmptyHeight(height); } /** @@ -1905,15 +2070,14 @@ else if (ABSOLUTE.equals(position) || FIXED.equals(position)) { * @return {@code true} if the element is scrollable along the specified axis */ public boolean isScrollable(final boolean horizontal) { - return isScrollable(horizontal, false); + return isScrollable(getDomElement(), horizontal, false); } /** * @param ignoreSize whether to consider the content/calculated width/height */ - private boolean isScrollable(final boolean horizontal, final boolean ignoreSize) { + private boolean isScrollable(final DomElement element, final boolean horizontal, final boolean ignoreSize) { final boolean scrollable; - final DomElement element = getDomElement(); String overflow; if (horizontal) { @@ -1939,7 +2103,7 @@ private boolean isScrollable(final boolean horizontal, final boolean ignoreSize) } scrollable = (element instanceof HtmlBody || SCROLL.equals(overflow) || AUTO.equals(overflow)) - && (ignoreSize || getContentHeight() > getEmptyHeight()); + && (ignoreSize || getContentHeight() > getEmptyHeight(element)); } return scrollable; } @@ -2086,20 +2250,20 @@ public int updateCachedHeight(final int height) { /** * INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. - * @return the cached height2 + * @return the cached emptyHeight */ - public Integer getCachedHeight2() { - return height2_; + public Integer getCachedEmptyHeight() { + return emptyHeight_; } /** * INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. - * @param height the new value - * @return the param height2 + * @param emptyHeight the new value + * @return the param emptyHeight */ - public int updateCachedHeight2(final int height) { - height2_ = Integer.valueOf(height); - return height; + public int updateCachedEmptyHeight(final int emptyHeight) { + emptyHeight_ = Integer.valueOf(emptyHeight); + return emptyHeight; } /** diff --git a/src/main/java/org/htmlunit/css/CssColors.java b/src/main/java/org/htmlunit/css/CssColors.java index e24c57652a5..1e5ae5094c6 100644 --- a/src/main/java/org/htmlunit/css/CssColors.java +++ b/src/main/java/org/htmlunit/css/CssColors.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,9 @@ */ package org.htmlunit.css; -import java.util.HashMap; import java.util.Locale; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; /** * Helper to work with colors. @@ -25,7 +25,7 @@ */ public final class CssColors { - private static final Map CSS_COLORS = new HashMap<>(); + private static final Map CSS_COLORS = new ConcurrentHashMap<>(); static { CSS_COLORS.put("aqua", "rgb(0, 255, 255)"); @@ -63,7 +63,7 @@ public static boolean isColorKeyword(final String token) { * Gets the RGB equivalent of a CSS color if the provided color is recognized. * @param color the color * @return the provided color if this is not a recognized color keyword, the RGB value - * in the form "rgb(x, y, z)" otherwise + * in the form "rgb(x, y, z)" otherwise */ public static String toRGBColor(final String color) { final String rgbValue = CSS_COLORS.get(color.toLowerCase(Locale.ROOT)); diff --git a/src/main/java/org/htmlunit/css/CssMediaList.java b/src/main/java/org/htmlunit/css/CssMediaList.java index 8a8e1bdbde3..88ff7a8d6e9 100644 --- a/src/main/java/org/htmlunit/css/CssMediaList.java +++ b/src/main/java/org/htmlunit/css/CssMediaList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/css/CssPixelValueConverter.java b/src/main/java/org/htmlunit/css/CssPixelValueConverter.java index 1d101ac8b72..688ad4d23ff 100644 --- a/src/main/java/org/htmlunit/css/CssPixelValueConverter.java +++ b/src/main/java/org/htmlunit/css/CssPixelValueConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/css/CssStyleSheet.java b/src/main/java/org/htmlunit/css/CssStyleSheet.java index 93a0924455b..1bf974a747f 100644 --- a/src/main/java/org/htmlunit/css/CssStyleSheet.java +++ b/src/main/java/org/htmlunit/css/CssStyleSheet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -312,8 +312,8 @@ public static CssStyleSheet loadStylesheet(final HtmlElement element, final Html // Use link. request = link.getWebRequest(); + final String type = link.getTypeAttribute(); if (client.getBrowserVersion().hasFeature(HTMLLINK_CHECK_TYPE_FOR_STYLESHEET)) { - final String type = link.getTypeAttribute(); if (StringUtils.isNotBlank(type) && !MimeType.TEXT_CSS.equals(type)) { return new CssStyleSheet(element, "", uri); } @@ -330,7 +330,10 @@ public static CssStyleSheet loadStylesheet(final HtmlElement element, final Html // our cache is a bit strange; // loadWebResponse check the cache for the web response // AND also fixes the request url for the following cache lookups - response = link.getWebResponse(true, request); + response = link.getWebResponse(true, request, true, type); + if (response == null) { + return new CssStyleSheet(element, "", uri); + } } // now we can look into the cache with the fixed request for @@ -1044,25 +1047,6 @@ private static String toString(final InputSource source) { } } - /** - * Validates the list of selectors. - * @param selectorList the selectors - * @param documentMode see {@link Document#getDocumentMode()} - * @param domNode the dom node the query should work on - * @throws CSSException if a selector is invalid - * - * @deprecated as of version 4.5.0; use {@link #validateSelectors(SelectorList, DomNode)} instead - */ - @Deprecated - public static void validateSelectors(final SelectorList selectorList, final int documentMode, - final DomNode domNode) throws CSSException { - for (final Selector selector : selectorList) { - if (!isValidSelector(selector, domNode)) { - throw new CSSException("Invalid selector: " + selector, null); - } - } - } - /** * Validates the list of selectors. * @param selectorList the selectors @@ -1224,7 +1208,8 @@ public static boolean isActive(final MediaListImpl mediaList, final WebWindow we return true; } - for (int i = 0; i < mediaList.getLength(); i++) { + final int length = mediaList.getLength(); + for (int i = 0; i < length; i++) { final MediaQuery mediaQuery = mediaList.mediaQuery(i); boolean isActive = isActive(mediaQuery, webWindow); if (mediaQuery.isNot()) { diff --git a/src/main/java/org/htmlunit/css/ElementCssStyleDeclaration.java b/src/main/java/org/htmlunit/css/ElementCssStyleDeclaration.java index 609fa4857eb..f98bab0d4b1 100644 --- a/src/main/java/org/htmlunit/css/ElementCssStyleDeclaration.java +++ b/src/main/java/org/htmlunit/css/ElementCssStyleDeclaration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -188,6 +188,9 @@ public Map getStyleMap() { return domElement_.getStyleMap(); } + /** + * @return the {@link DomElement} associated with this + */ public DomElement getDomElement() { return domElement_; } diff --git a/src/main/java/org/htmlunit/css/StyleAttributes.java b/src/main/java/org/htmlunit/css/StyleAttributes.java index 17f4c11e482..bf4e83a95a9 100644 --- a/src/main/java/org/htmlunit/css/StyleAttributes.java +++ b/src/main/java/org/htmlunit/css/StyleAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,9 +32,9 @@ import java.io.Serializable; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import org.htmlunit.BrowserVersion; @@ -48,7 +48,7 @@ */ @SuppressWarnings("PMD.AvoidDuplicateLiterals") public final class StyleAttributes implements Serializable { - private static final Map STYLES = new HashMap<>(); + private static final Map STYLES = new ConcurrentHashMap<>(); static { for (final Definition definition : Definition.values()) { @@ -338,10 +338,10 @@ public enum Definition { BASELINE_SOURCE_("baseline-source", "baseline-source", ff("auto")), /** The style property {@code blockSize}. */ - BLOCK_SIZE("blockSize", "block-size", chromeAndEdge("324px"), ff("328px")), + BLOCK_SIZE("blockSize", "block-size", chromeAndEdgeAndFirefox("auto")), /** The style property {@code block-size}. */ - BLOCK_SIZE_("block-size", "block-size", ff("328px")), + BLOCK_SIZE_("block-size", "block-size", ff("auto")), /** The style property {@code border}. */ BORDER("border", "border", chromeAndEdge("0px none rgb(0, 0, 0)"), ff("0px rgb(0, 0, 0)")), @@ -695,10 +695,10 @@ public enum Definition { BORDER_RIGHT_WIDTH_("border-right-width", "border-right-width", ff("0px")), /** The style property {@code borderSpacing}. */ - BORDER_SPACING("borderSpacing", "border-spacing", chromeAndEdge("0px 0px"), ff("0px 0px")), + BORDER_SPACING("borderSpacing", "border-spacing", chromeAndEdge("0px 0px"), ffEsr("0px 0px"), ffLatest("0px")), /** The style property {@code border-spacing}. */ - BORDER_SPACING_("border-spacing", "border-spacing", ff("0px 0px")), + BORDER_SPACING_("border-spacing", "border-spacing", ffEsr("0px 0px"), ffLatest("0px")), /** The style property {@code borderStartEndRadius}. */ BORDER_START_END_RADIUS("borderStartEndRadius", "border-start-end-radius", chromeAndEdge("0px"), ff("0px")), @@ -1049,6 +1049,9 @@ public enum Definition { /** The style property {@code dominant-baseline}. */ DOMINANT_BASELINE_("dominant-baseline", "dominant-baseline", ff("auto")), + /** The style property {@code dynamicRangeLimit}. */ + DYNAMIC_RANGE_LIMIT("dynamicRangeLimit", "dynamic-range-limit", chromeAndEdge("no-limit")), + /** The style property {@code emptyCells}. */ EMPTY_CELLS("emptyCells", "empty-cells", ff("show"), chromeAndEdge("show")), @@ -1426,7 +1429,10 @@ public enum Definition { HYPHENATE_CHARACTER_("hyphenate-character", "hyphenate-character", ff("auto")), /** The style property {@code hyphenateLimitChars}. */ - HYPHENATE_LIMIT_CHAR("hyphenateLimitChars", "hyphenate-limit-char", chromeAndEdgeAuto()), + HYPHENATE_LIMIT_CHAR("hyphenateLimitChars", "hyphenate-limit-chars", chromeAndEdgeAuto(), ffLatest("auto")), + + /** The style property {@code hyphenate-limit-chars}. */ + HYPHENATE_LIMIT_CHAR_("hyphenate-limit-chars", "hyphenate-limit-chars", ffLatest("auto")), /** The style property {@code hyphens}. */ HYPHENS("hyphens", "hyphens", ff("manual"), chromeAndEdge("manual")), @@ -1461,10 +1467,10 @@ public enum Definition { INITIAL_VALUE("initialValue", "initial-value", chromeAndEdgeEmpty()), /** The style property {@code inlineSize}. */ - INLINE_SIZE("inlineSize", "inline-size", ff("1244px"), chrome("1240px"), edge("1232px")), + INLINE_SIZE("inlineSize", "inline-size", ffEsr("1244px"), ffLatest("1240px"), chrome("1240px"), edge("1232px")), /** The style property {@code inline-size}. */ - INLINE_SIZE_("inline-size", "inline-size", ff("1244px")), + INLINE_SIZE_("inline-size", "inline-size", ffEsr("1244px"), ffLatest("1240px")), /** The style property {@code inset}. */ INSET("inset", "inset", chromeAndEdgeAuto(), ff("auto")), @@ -1505,6 +1511,9 @@ public enum Definition { /** The style property {@code inset-inline-start}. */ INSET_INLINE_START_("inset-inline-start", "inset-inline-start", ff("auto")), + /** The style property {@code interactivity}. */ + INTERACTIVITY("interactivity", "interpolate-size", chromeAndEdge("auto")), + /** The style property {@code interpolateSize}. */ INTERPOLATE_SIZE("interpolateSize", "interpolate-size", chromeAndEdge("numeric-only")), @@ -2084,10 +2093,10 @@ public enum Definition { MOZ_PERSPECTIVE__("-moz-perspective", "-moz-perspective", ffLatest("none")), /** The style property {@code MozPerspectiveOrigin}. */ - MOZ_PERSPECTIVE_ORIGIN("MozPerspectiveOrigin", "-moz-perspective-origin", ffLatest("622px 164px")), + MOZ_PERSPECTIVE_ORIGIN("MozPerspectiveOrigin", "-moz-perspective-origin", ffLatest("620px 9px")), /** The style property {@code -moz-perspective-origin}. */ - MOZ_PERSPECTIVE_ORIGIN__("-moz-perspective-origin", "-moz-perspective-origin", ffLatest("622px 164px")), + MOZ_PERSPECTIVE_ORIGIN__("-moz-perspective-origin", "-moz-perspective-origin", ffLatest("620px 9px")), /** The style property {@code MozTabSize}. */ MOZ_TAB_SIZE("MozTabSize", "-moz-tab-size", ff("8")), @@ -2118,10 +2127,12 @@ public enum Definition { MOZ_TRANSFORM__("-moz-transform", "-moz-transform", ffNone()), /** The style property {@code MozTransformOrigin}. */ - MOZ_TRANSFORM_ORIGIN("MozTransformOrigin", "-moz-transform-origin", ff("622px 164px")), + MOZ_TRANSFORM_ORIGIN("MozTransformOrigin", "-moz-transform-origin", + ffEsr("622px 9px"), ffLatest("620px 9px")), /** The style property {@code -moz-transform-origin}. */ - MOZ_TRANSFORM_ORIGIN__("-moz-transform-origin", "-moz-transform-origin", ff("622px 164px")), + MOZ_TRANSFORM_ORIGIN__("-moz-transform-origin", "-moz-transform-origin", + ffEsr("622px 9px"), ffLatest("620px 9px")), /** The style property {@code MozTransformStyle}. */ MOZ_TRANSFORM_STYLE("MozTransformStyle", "-moz-transform-style", ffLatest("flat")), @@ -2130,10 +2141,10 @@ public enum Definition { MOZ_TRANSFORM_STYLE__("-moz-transform-style", "-moz-transform-style", ffLatest("flat")), /** The style property {@code MozUserInput}. */ - MOZ_USER_INPUT("MozUserInput", "-moz-user-input", ff("auto")), + MOZ_USER_INPUT("MozUserInput", "-moz-user-input", ffEsr("auto")), /** The style property {@code -moz-user-input}. */ - MOZ_USER_INPUT__("-moz-user-input", "-moz-user-input", ff("auto")), + MOZ_USER_INPUT__("-moz-user-input", "-moz-user-input", ffEsr("auto")), /** The style property {@code MozUserModify}. */ MOZ_USER_MODIFY("MozUserModify", "-moz-user-modify", ffEsr("read-only")), @@ -2255,7 +2266,7 @@ public enum Definition { OVERFLOW_ANCHOR_("overflow-anchor", "overflow-anchor", ff("auto")), /** The style property {@code overflowBlock}. */ - OVERFLOW_BLOCK("overflowBlock", "overflow-block", ff("visible")), + OVERFLOW_BLOCK("overflowBlock", "overflow-block", chromeAndEdgeAndFirefox("visible")), /** The style property {@code overflow-block}. */ OVERFLOW_BLOCK_("overflow-block", "overflow-block", ff("visible")), @@ -2267,7 +2278,7 @@ public enum Definition { OVERFLOW_CLIP_MARGIN_("overflow-clip-margin", "overflow-clip-margin", ff("0px")), /** The style property {@code overflowInline}. */ - OVERFLOW_INLINE("overflowInline", "overflow-inline", ff("visible")), + OVERFLOW_INLINE("overflowInline", "overflow-inline", chromeAndEdgeAndFirefox("visible")), /** The style property {@code overflow-inline}. */ OVERFLOW_INLINE_("overflow-inline", "overflow-inline", ff("visible")), @@ -2431,10 +2442,11 @@ public enum Definition { /** The style property {@code perspectiveOrigin}. */ PERSPECTIVE_ORIGIN("perspectiveOrigin", "perspective-origin", - ff("622px 164px"), chrome("620px 162px"), edge("616px 162px")), + ffEsr("622px 9px"), ffLatest("620px 9px"), chrome("620px 9px"), edge("616px 9px")), /** The style property {@code perspective-origin}. */ - PERSPECTIVE_ORIGIN_("perspective-origin", "perspective-origin", ff("622px 164px")), + PERSPECTIVE_ORIGIN_("perspective-origin", "perspective-origin", + ffEsr("622px 9px"), ffLatest("620px 9px")), /** The style property {@code placeContent}. */ PLACE_CONTENT("placeContent", "place-content", chromeAndEdgeNormal(), ffNormal()), @@ -2485,7 +2497,8 @@ public enum Definition { PREFIX("prefix", "prefix", chromeAndEdgeEmpty()), /** The style property {@code printColorAdjust}. */ - PRINT_COLOR_ADJUST("printColorAdjust", "print-color-adjust", ff("economy")), + PRINT_COLOR_ADJUST("printColorAdjust", "print-color-adjust", ff("economy"), + chromeAndEdge("economy")), /** The style property {@code print-color-adjust}. */ PRINT_COLOR_ADJUST_("print-color-adjust", "print-color-adjust", ff("economy")), @@ -2542,6 +2555,9 @@ public enum Definition { /** The style property {@code scroll-behavior}. */ SCROLL_BEHAVIOR_("scroll-behavior", "scroll-behavior", ff("auto")), + /** The style property {@code scrollInitialTarget}. */ + SCROLL_INITIAL_TARGET("scrollInitialTarget", "scroll-initial-target", chromeAndEdgeNone()), + /** The style property {@code scrollMargin}. */ SCROLL_MARGIN("scrollMargin", "scroll-margin", chromeAndEdge("0px"), ff("0px")), @@ -2614,6 +2630,9 @@ public enum Definition { /** The style property {@code scroll-margin-top}. */ SCROLL_MARGIN_TOP_("scroll-margin-top", "scroll-margin-top", ff("0px")), + /** The style property {@code scrollMarkerGroup}. */ + SCROLL_MARKER_GROUP("scrollMarkerGroup", "scroll-marker-group", chromeAndEdgeNone()), + /** The style property {@code scrollPadding}. */ SCROLL_PADDING("scrollPadding", "scroll-padding", chromeAndEdgeAuto(), ff("auto")), @@ -2869,6 +2888,15 @@ public enum Definition { /** The style property {@code text-anchor}. */ TEXT_ANCHOR_("text-anchor", "text-anchor", ff("start")), + /** The style property {@code textBox}. */ + TEXT_BOX("textBox", "text-box", chromeAndEdgeNormal()), + + /** The style property {@code textBoxEdge}. */ + TEXT_BOX_EDGE("textBoxEdge", "text-box-edge", chromeAndEdgeAuto()), + + /** The style property {@code textBoxTrim}. */ + TEXT_BOX_TRIM("textBoxTrim", "text-box-trim", chromeAndEdgeNone()), + /** The style property {@code textCombineUpright}. */ TEXT_COMBINE_UPRIGHT("textCombineUpright", "text-combine-upright", chromeAndEdgeNone(), ffNone()), @@ -3048,10 +3076,10 @@ public enum Definition { /** The style property {@code transformOrigin}. */ TRANSFORM_ORIGIN("transformOrigin", "transform-origin", - ff("622px 164px"), chrome("620px 162px"), edge("616px 162px")), + ffEsr("622px 9px"), ffLatest("620px 9px"), chrome("620px 9px"), edge("616px 9px")), /** The style property {@code transform-origin}. */ - TRANSFORM_ORIGIN_("transform-origin", "transform-origin", ff("622px 164px")), + TRANSFORM_ORIGIN_("transform-origin", "transform-origin", ffEsr("622px 9px"), ffLatest("620px 9px")), /** The style property {@code transformStyle}. */ TRANSFORM_STYLE("transformStyle", "transform-style", ff("flat"), chromeAndEdge("flat")), @@ -3692,7 +3720,7 @@ public enum Definition { WEBKIT_LOCALE("webkitLocale", "webkit-locale", chromeAndEdgeAuto()), /** The style property {@code webkitLogicalHeight}. */ - WEBKIT_LOGICAL_HEIGHT("webkitLogicalHeight", "webkit-logical-height", chromeAndEdge("324px")), + WEBKIT_LOGICAL_HEIGHT("webkitLogicalHeight", "webkit-logical-height", chromeAndEdge("18px")), /** The style property {@code webkitLogicalWidth}. */ WEBKIT_LOGICAL_WIDTH("webkitLogicalWidth", "webkit-logical-width", chrome("1240px"), edge("1232px")), @@ -3865,15 +3893,15 @@ public enum Definition { /** The style property {@code webkitPerspectiveOrigin}. */ WEBKIT_PERSPECTIVE_ORIGIN("webkitPerspectiveOrigin", "webkit-perspective-origin", - ff("622px 164px"), chrome("620px 162px"), edge("616px 162px")), + ffEsr("622px 9px"), ffLatest("620px 9px"), chrome("620px 9px"), edge("616px 9px")), /** The style property {@code WebkitPerspectiveOrigin}. */ WEBKIT_PERSPECTIVE_ORIGIN_("WebkitPerspectiveOrigin", "webkit-perspective-origin", - ff("622px 164px")), + ffEsr("622px 9px"), ffLatest("620px 9px")), /** The style property {@code -webkit-perspective-origin}. */ WEBKIT_PERSPECTIVE_ORIGIN__("-webkit-perspective-origin", "webkit-perspective-origin", - ff("622px 164px")), + ffEsr("622px 9px"), ffLatest("620px 9px")), /** The style property {@code webkitPerspectiveOriginX}. */ WEBKIT_PERSPECTIVE_ORIGIN_X("webkitPerspectiveOriginX", "webkit-perspective-origin-x", chromeAndEdgeEmpty()), @@ -3999,15 +4027,15 @@ public enum Definition { /** The style property {@code webkitTransformOrigin}. */ WEBKIT_TRANSFORM_ORIGIN("webkitTransformOrigin", "webkit-transform-origin", - ff("622px 164px"), chrome("620px 162px"), edge("616px 162px")), + ffEsr("622px 9px"), ffLatest("620px 9px"), chrome("620px 9px"), edge("616px 9px")), /** The style property {@code WebkitTransformOrigin}. */ WEBKIT_TRANSFORM_ORIGIN_("WebkitTransformOrigin", "webkit-transform-origin", - ff("622px 164px")), + ffEsr("622px 9px"), ffLatest("620px 9px")), /** The style property {@code -webkit-transform-origin}. */ WEBKIT_TRANSFORM_ORIGIN__("-webkit-transform-origin", "webkit-transform-origin", - ff("622px 164px")), + ffEsr("622px 9px"), ffLatest("620px 9px")), /** The style property {@code webkitTransformOriginX}. */ WEBKIT_TRANSFORM_ORIGIN_X("webkitTransformOriginX", "webkit-transform-origin-x", chromeAndEdgeEmpty()), diff --git a/src/main/java/org/htmlunit/css/StyleElement.java b/src/main/java/org/htmlunit/css/StyleElement.java index 954b9810a82..2e4f2a2714e 100644 --- a/src/main/java/org/htmlunit/css/StyleElement.java +++ b/src/main/java/org/htmlunit/css/StyleElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ * @author Ronald Brill * @author Frank Danek */ -public class StyleElement implements Comparable, Serializable { +public class StyleElement implements Serializable { /** CSS important property constant. */ public static final String PRIORITY_IMPORTANT = "important"; @@ -133,28 +133,41 @@ public String toString() { } /** - * {@inheritDoc} + * This takes only the importance, the specificity and the index into account. + * The name and value properties are ignored. + * + * @param first the {@link StyleElement} to compare + * @param second the {@link StyleElement} to compare with + * @return a negative integer, zero, or a positive integer as this object + * is less than, equal to, or greater than the specified object. */ - @Override - public int compareTo(final StyleElement e) { - if (e == null) { + public static int compareToByImportanceAndSpecificity(final StyleElement first, final StyleElement second) { + if (first == null) { + return second == null ? 0 : -1; + } + + if (second == null) { return 1; } - if (isImportant()) { - if (!e.isImportant()) { + if (first == second) { + return 0; + } + + if (first.isImportant()) { + if (!second.isImportant()) { return 1; } } else { - if (e.isImportant()) { + if (second.isImportant()) { return -1; } } - final int comp = getSpecificity().compareTo(e.getSpecificity()); + final int comp = first.getSpecificity().compareTo(second.getSpecificity()); if (comp == 0) { - return Long.compare(getIndex(), e.getIndex()); + return Long.compare(first.getIndex(), second.getIndex()); } return comp; } diff --git a/src/main/java/org/htmlunit/css/WrappedCssStyleDeclaration.java b/src/main/java/org/htmlunit/css/WrappedCssStyleDeclaration.java index 8fd8eacdc74..6654f6acab9 100644 --- a/src/main/java/org/htmlunit/css/WrappedCssStyleDeclaration.java +++ b/src/main/java/org/htmlunit/css/WrappedCssStyleDeclaration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/css/package-info.java b/src/main/java/org/htmlunit/css/package-info.java index 4b6c583bfd1..0d5400bc9e4 100644 --- a/src/main/java/org/htmlunit/css/package-info.java +++ b/src/main/java/org/htmlunit/css/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/AbstractDomNodeList.java b/src/main/java/org/htmlunit/html/AbstractDomNodeList.java index 72c354e9a12..c5a1434f11b 100644 --- a/src/main/java/org/htmlunit/html/AbstractDomNodeList.java +++ b/src/main/java/org/htmlunit/html/AbstractDomNodeList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/BaseFrameElement.java b/src/main/java/org/htmlunit/html/BaseFrameElement.java index b1ed2a0f326..7d1ffd0aa31 100644 --- a/src/main/java/org/htmlunit/html/BaseFrameElement.java +++ b/src/main/java/org/htmlunit/html/BaseFrameElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/CharacterDataChangeEvent.java b/src/main/java/org/htmlunit/html/CharacterDataChangeEvent.java index b87d090fab6..ad975321c44 100644 --- a/src/main/java/org/htmlunit/html/CharacterDataChangeEvent.java +++ b/src/main/java/org/htmlunit/html/CharacterDataChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/CharacterDataChangeListener.java b/src/main/java/org/htmlunit/html/CharacterDataChangeListener.java index a81b44dc1dd..d37c4ce833f 100644 --- a/src/main/java/org/htmlunit/html/CharacterDataChangeListener.java +++ b/src/main/java/org/htmlunit/html/CharacterDataChangeListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,10 @@ * Implementations of this interface receive notifications of changes to the Character Data. * * @author Ahmed Ashour + * @author Ronald Brill * @see CharacterDataChangeEvent */ +@FunctionalInterface public interface CharacterDataChangeListener extends Serializable { /** diff --git a/src/main/java/org/htmlunit/html/DefaultElementFactory.java b/src/main/java/org/htmlunit/html/DefaultElementFactory.java index 236d0cb112a..7e76ed5eb57 100644 --- a/src/main/java/org/htmlunit/html/DefaultElementFactory.java +++ b/src/main/java/org/htmlunit/html/DefaultElementFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/DisabledElement.java b/src/main/java/org/htmlunit/html/DisabledElement.java index 1719d45eb93..abf6d54971d 100644 --- a/src/main/java/org/htmlunit/html/DisabledElement.java +++ b/src/main/java/org/htmlunit/html/DisabledElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/DoTypeProcessor.java b/src/main/java/org/htmlunit/html/DoTypeProcessor.java index 41bc133a75c..c32c36b3222 100644 --- a/src/main/java/org/htmlunit/html/DoTypeProcessor.java +++ b/src/main/java/org/htmlunit/html/DoTypeProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ class DoTypeProcessor implements Serializable { SPECIAL_KEYS_MAP_.put(DOM_VK_SUBTRACT, '-'); for (int i = DOM_VK_NUMPAD0; i <= DOM_VK_NUMPAD9; i++) { - SPECIAL_KEYS_MAP_.put(i, (char) ('0' + (i - DOM_VK_NUMPAD0))); + SPECIAL_KEYS_MAP_.put(i, (char) ('0' + i - DOM_VK_NUMPAD0)); } } diff --git a/src/main/java/org/htmlunit/html/DomAttr.java b/src/main/java/org/htmlunit/html/DomAttr.java index b4a3d6c78f4..19affc2d36d 100644 --- a/src/main/java/org/htmlunit/html/DomAttr.java +++ b/src/main/java/org/htmlunit/html/DomAttr.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -108,7 +108,13 @@ public void setNodeValue(final String value) { */ @Override public void setValue(final String value) { - value_ = value; + if (value != null + && value.isEmpty()) { + value_ = DomElement.ATTRIBUTE_VALUE_EMPTY; + } + else { + value_ = value; + } specified_ = true; } diff --git a/src/main/java/org/htmlunit/html/DomCDataSection.java b/src/main/java/org/htmlunit/html/DomCDataSection.java index eac1f7f6875..71df9b4b757 100644 --- a/src/main/java/org/htmlunit/html/DomCDataSection.java +++ b/src/main/java/org/htmlunit/html/DomCDataSection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/DomChangeEvent.java b/src/main/java/org/htmlunit/html/DomChangeEvent.java index 25a12b2e99b..b595ea3d4ae 100644 --- a/src/main/java/org/htmlunit/html/DomChangeEvent.java +++ b/src/main/java/org/htmlunit/html/DomChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/DomChangeListener.java b/src/main/java/org/htmlunit/html/DomChangeListener.java index 352a075e8e8..56522bed5d9 100644 --- a/src/main/java/org/htmlunit/html/DomChangeListener.java +++ b/src/main/java/org/htmlunit/html/DomChangeListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/DomCharacterData.java b/src/main/java/org/htmlunit/html/DomCharacterData.java index 635af0a0e8a..79e316a31fd 100644 --- a/src/main/java/org/htmlunit/html/DomCharacterData.java +++ b/src/main/java/org/htmlunit/html/DomCharacterData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -105,9 +105,9 @@ public void appendData(final String newData) { /** * Deletes characters from character data. * @param offset the position of the first character to be deleted (can't be - * less than zero) + * less than zero) * @param count the number of characters to be deleted, if less than zero - * leaves the first offset chars + * leaves the first offset chars */ @Override public void deleteData(final int offset, final int count) { diff --git a/src/main/java/org/htmlunit/html/DomComment.java b/src/main/java/org/htmlunit/html/DomComment.java index a77e117abaa..29fc8ba90cd 100644 --- a/src/main/java/org/htmlunit/html/DomComment.java +++ b/src/main/java/org/htmlunit/html/DomComment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/DomDocumentFragment.java b/src/main/java/org/htmlunit/html/DomDocumentFragment.java index 382f82f019c..0a52964b75f 100644 --- a/src/main/java/org/htmlunit/html/DomDocumentFragment.java +++ b/src/main/java/org/htmlunit/html/DomDocumentFragment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/DomDocumentType.java b/src/main/java/org/htmlunit/html/DomDocumentType.java index 18d34769d70..638ac0c4c89 100644 --- a/src/main/java/org/htmlunit/html/DomDocumentType.java +++ b/src/main/java/org/htmlunit/html/DomDocumentType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/DomElement.java b/src/main/java/org/htmlunit/html/DomElement.java index 16cedb8ebca..1081a5c767f 100644 --- a/src/main/java/org/htmlunit/html/DomElement.java +++ b/src/main/java/org/htmlunit/html/DomElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.Comparator; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; @@ -110,6 +111,13 @@ public class DomElement extends DomNamespaceNode implements Element { private String styleString_; private LinkedHashMap styleMap_; + private static final Comparator STYLE_ELEMENT_COMPARATOR = new Comparator() { + @Override + public int compare(final StyleElement first, final StyleElement second) { + return StyleElement.compareToByImportanceAndSpecificity(first, second); + } + }; + /** * Whether the Mouse is currently over this element or not. */ @@ -122,7 +130,7 @@ public class DomElement extends DomNamespaceNode implements Element { * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes a map ready initialized with the attributes for this element, or - * {@code null}. The map will be stored as is, not copied. + * {@code null}. The map will be stored as is, not copied. */ public DomElement(final String namespaceURI, final String qualifiedName, final SgmlPage page, final Map attributes) { @@ -187,7 +195,7 @@ public final boolean hasAttributes() { * * @param attributeName the name of the attribute * @return true if an attribute with the given name is specified on this element or has a - * default value, false otherwise. + * default value, false otherwise. */ @Override public boolean hasAttribute(final String attributeName) { @@ -469,7 +477,7 @@ public final Attr removeAttributeNode(final Attr attribute) { * @param namespaceURI the URI that identifies an XML namespace * @param localName the name within the namespace * @return true if an attribute with the given name is specified on this element or has a - * default value, false otherwise. + * default value, false otherwise. */ @Override public final boolean hasAttributeNS(final String namespaceURI, final String localName) { @@ -604,7 +612,7 @@ public void writeStyleToElement(final Map styleMap) { final StringBuilder builder = new StringBuilder(); final List styleElements = new ArrayList<>(styleMap.values()); - Collections.sort(styleElements); + Collections.sort(styleElements, STYLE_ELEMENT_COMPARATOR); for (final StyleElement e : styleElements) { if (builder.length() != 0) { builder.append(' '); @@ -663,7 +671,10 @@ public List getStaticElementsByTagName(final String t for (final Iterator iterator = this.new DescendantHtmlElementsIterator(); iterator.hasNext();) { final HtmlElement elem = iterator.next(); if (elem.getLocalName().equalsIgnoreCase(tagName)) { - res.add((E) elem); + final String prefix = elem.getPrefix(); + if (prefix == null || prefix.isEmpty()) { + res.add((E) elem); + } } } return res; @@ -787,10 +798,12 @@ public DomElement getLastElementChild() { * Returns the current number of element nodes that are children of this element. * @return the current number of element nodes that are children of this element. */ - @SuppressWarnings("PMD.UnusedLocalVariable") public int getChildElementCount() { int counter = 0; - for (final DomElement elem : getChildElements()) { + + final Iterator iterator = getChildElements().iterator(); + while (iterator.hasNext()) { + iterator.next(); counter++; } return counter; @@ -809,7 +822,8 @@ public final Iterable getChildElements() { private static class ChildElementsIterable implements Iterable { private final Iterator iterator_; - /** Constructor. + /** + * Constructor. * @param domNode the parent */ protected ChildElementsIterable(final DomNode domNode) { @@ -829,7 +843,8 @@ protected static class ChildElementsIterator implements Iterator { private DomElement nextElement_; - /** Constructor. + /** + * Constructor. * @param domNode the parent */ protected ChildElementsIterator(final DomNode domNode) { @@ -844,13 +859,17 @@ protected ChildElementsIterator(final DomNode domNode) { } } - /** @return is there a next one ? */ + /** + * @return is there a next one ? + */ @Override public boolean hasNext() { return nextElement_ != null; } - /** @return the next one */ + /** + * @return the next one + */ @Override public DomElement next() { if (nextElement_ != null) { @@ -1166,7 +1185,7 @@ public

P click(final Event event, * @param ctrlKey {@code true} if CTRL is pressed * * @return true if doClickFireEvent method has to be called later on (to signal, - * that the value was changed) + * that the value was changed) * @throws IOException if an IO error occurs */ protected boolean doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey) throws IOException { @@ -1184,11 +1203,9 @@ protected boolean doClickStateUpdate(final boolean shiftKey, final boolean ctrlK } /** - * @see #doClickStateUpdate(boolean, boolean) - * Usually the click is propagated to the parent. Overwrite if you - * like to disable this. - * + * Usually the click is propagated to the parent. Overwrite if you like to disable this. * @return true or false + * @see #doClickStateUpdate(boolean, boolean) */ protected boolean propagateClickStateUpdateToParent() { return true; diff --git a/src/main/java/org/htmlunit/html/DomNamespaceNode.java b/src/main/java/org/htmlunit/html/DomNamespaceNode.java index ebc04fb2fdc..5370245b195 100644 --- a/src/main/java/org/htmlunit/html/DomNamespaceNode.java +++ b/src/main/java/org/htmlunit/html/DomNamespaceNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/DomNode.java b/src/main/java/org/htmlunit/html/DomNode.java index 7cd051f2081..bf6b80f8724 100644 --- a/src/main/java/org/htmlunit/html/DomNode.java +++ b/src/main/java/org/htmlunit/html/DomNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +48,6 @@ import org.htmlunit.html.serializer.HtmlSerializerVisibleText; import org.htmlunit.html.xpath.XPathHelper; import org.htmlunit.javascript.HtmlUnitScriptable; -import org.htmlunit.javascript.JavaScriptEngine; import org.htmlunit.javascript.host.event.Event; import org.htmlunit.xpath.xml.utils.PrefixResolver; import org.w3c.dom.DOMException; @@ -208,7 +207,7 @@ public int getStartColumnNumber() { /** * Returns the line number in the source page where the DOM node ends. * @return 0 if no information on the line number is available (for instance for nodes dynamically added), - * -1 if the end tag has not yet been parsed (during page loading) + * -1 if the end tag has not yet been parsed (during page loading) */ public int getEndLineNumber() { return endLineNumber_; @@ -217,7 +216,7 @@ public int getEndLineNumber() { /** * Returns the column number in the source page where the DOM node ends. * @return 0 if no information on the line number is available (for instance for nodes dynamically added), - * -1 if the end tag has not yet been parsed (during page loading) + * -1 if the end tag has not yet been parsed (during page loading) */ public int getEndColumnNumber() { return endColumnNumber_; @@ -908,11 +907,11 @@ public T getScriptableObject() { @Override public DomNode appendChild(final Node node) { if (node == this) { - throw JavaScriptEngine.throwAsScriptRuntimeEx(new Exception("Can not add not to itself " + this)); + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "Can not add not to itself " + this); } final DomNode domNode = (DomNode) node; if (domNode.isAncestorOf(this)) { - throw JavaScriptEngine.throwAsScriptRuntimeEx(new Exception("Can not add (grand)parent to itself " + this)); + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "Can not add (grand)parent to itself " + this); } if (domNode instanceof DomDocumentFragment) { @@ -1121,7 +1120,8 @@ public void removeAllChildren() { * @throws SAXException in case of error */ public void parseHtmlSnippet(final String source) throws SAXException, IOException { - getPage().getWebClient().getPageCreator().getHtmlParser().parseFragment(this, source); + final WebClient webClient = getPage().getWebClient(); + webClient.getPageCreator().getHtmlParser().parseFragment(webClient, this, this, source, false); } /** @@ -1174,7 +1174,7 @@ else if (previousSibling_ != null && previousSibling_.nextSibling_ == this) { private void fireRemoval(final DomNode exParent) { final SgmlPage page = getPage(); - if (page != null && page instanceof HtmlPage) { + if (page instanceof HtmlPage) { // some actions executed on removal need an intact parent relationship (e.g. for the // DocumentPositionComparator) so we have to restore it temporarily parent_ = exParent; @@ -1245,11 +1245,11 @@ public void quietlyRemoveAndMoveChildrenTo(final DomNode destination) { * * @param newChild the new child node that is being inserted below this node * @throws DOMException HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does - * not allow children of the type of the newChild node, or if the node to insert is one of - * this node's ancestors or this node itself, or if this node is of type Document and the - * DOM application attempts to insert a second DocumentType or Element node. - * WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the - * one that created this node. + * not allow children of the type of the newChild node, or if the node to insert is one of + * this node's ancestors or this node itself, or if this node is of type Document and the + * DOM application attempts to insert a second DocumentType or Element node. + * WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the + * one that created this node. */ protected void checkChildHierarchy(final Node newChild) throws DOMException { Node parentNode = this; @@ -1392,7 +1392,7 @@ public final Iterable getDomElementDescendants() { * @param the type of nodes over which to iterate * * @deprecated as of version 4.7.0; use {@link DescendantDomNodesIterator}, - * {@link DescendantDomElementsIterator}, or {@link DescendantHtmlElementsIterator} instead. + * {@link DescendantDomElementsIterator}, or {@link DescendantHtmlElementsIterator} instead. */ @Deprecated protected class DescendantElementsIterator implements Iterator { @@ -1435,7 +1435,9 @@ public void remove() { current.remove(); } - /** @return the next node, if there is one */ + /** + * @return the next node, if there is one + */ @SuppressWarnings("unchecked") public T nextNode() { currentNode_ = nextNode_; @@ -1538,7 +1540,9 @@ public void remove() { current.remove(); } - /** @return the next node, if there is one */ + /** + * @return the next node, if there is one + */ @SuppressWarnings("unchecked") public DomNode nextNode() { currentNode_ = nextNode_; @@ -1639,7 +1643,9 @@ public void remove() { current.remove(); } - /** @return the next node, if there is one */ + /** + * @return the next node, if there is one + */ @SuppressWarnings("unchecked") public DomElement nextNode() { currentNode_ = nextNode_; @@ -1740,7 +1746,9 @@ public void remove() { current.remove(); } - /** @return the next node, if there is one */ + /** + * @return the next node, if there is one + */ @SuppressWarnings("unchecked") public HtmlElement nextNode() { currentNode_ = nextNode_; @@ -2228,7 +2236,7 @@ public boolean handles(final Event event) { * Returns the previous sibling element node of this element. * null if this element has no element sibling nodes that come before this one in the document tree. * @return the previous sibling element node of this element. - * null if this element has no element sibling nodes that come before this one in the document tree + * null if this element has no element sibling nodes that come before this one in the document tree */ public DomElement getPreviousElementSibling() { DomNode node = getPreviousSibling(); @@ -2242,7 +2250,7 @@ public DomElement getPreviousElementSibling() { * Returns the next sibling element node of this element. * null if this element has no element sibling nodes that come after this one in the document tree. * @return the next sibling element node of this element. - * null if this element has no element sibling nodes that come after this one in the document tree + * null if this element has no element sibling nodes that come after this one in the document tree */ public DomElement getNextElementSibling() { DomNode node = getNextSibling(); @@ -2289,9 +2297,6 @@ public DomElement closest(final String selectorString) { * An unmodifiable empty {@link NamedNodeMap} implementation. */ private static final class ReadOnlyEmptyNamedNodeMapImpl implements NamedNodeMap, Serializable { - private ReadOnlyEmptyNamedNodeMapImpl() { - super(); - } /** * {@inheritDoc} diff --git a/src/main/java/org/htmlunit/html/DomNodeIterator.java b/src/main/java/org/htmlunit/html/DomNodeIterator.java index 1f8169719c5..7ee396527d3 100644 --- a/src/main/java/org/htmlunit/html/DomNodeIterator.java +++ b/src/main/java/org/htmlunit/html/DomNodeIterator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ */ package org.htmlunit.html; +import java.io.Serializable; + import org.w3c.dom.Node; import org.w3c.dom.traversal.NodeFilter; import org.w3c.dom.traversal.NodeIterator; @@ -24,7 +26,7 @@ * @author Ahmed Ashour * @author Ronald Brill */ -public class DomNodeIterator implements NodeIterator { +public class DomNodeIterator implements NodeIterator, Serializable { private final DomNode root_; private final int whatToShow_; @@ -38,7 +40,7 @@ public class DomNodeIterator implements NodeIterator { * * @param root The root node at which to begin the {@link NodeIterator}'s traversal * @param whatToShow an optional int representing a bitmask created by combining - * the constant properties of {@link NodeFilter} + * the constant properties of {@link NodeFilter} * @param expandEntityReferences If false, the contents of * EntityReference nodes are not present in the logical view. * @param filter an object implementing the {@link NodeFilter} interface @@ -143,15 +145,7 @@ private DomNode traverse(final boolean next) { } else { if (beforeNode) { - final DomNode left = getSibling(node, true); - if (left == null) { - final Node parent = node.getParentNode(); - if (parent == null) { - node = null; - } - } - - DomNode follow = left; + DomNode follow = getSibling(node, true); if (follow != null) { while (follow.hasChildNodes()) { final DomNode toFollow = getChild(follow, false); diff --git a/src/main/java/org/htmlunit/html/DomNodeList.java b/src/main/java/org/htmlunit/html/DomNodeList.java index 2c00592413c..3080c25e5ec 100644 --- a/src/main/java/org/htmlunit/html/DomNodeList.java +++ b/src/main/java/org/htmlunit/html/DomNodeList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/DomProcessingInstruction.java b/src/main/java/org/htmlunit/html/DomProcessingInstruction.java index 26d3c01f574..b3a5af3d030 100644 --- a/src/main/java/org/htmlunit/html/DomProcessingInstruction.java +++ b/src/main/java/org/htmlunit/html/DomProcessingInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/DomText.java b/src/main/java/org/htmlunit/html/DomText.java index 9db0277f5dc..aa3da9da5e4 100644 --- a/src/main/java/org/htmlunit/html/DomText.java +++ b/src/main/java/org/htmlunit/html/DomText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/ElementFactory.java b/src/main/java/org/htmlunit/html/ElementFactory.java index 303bdd3f79c..e6ba4ce68ff 100644 --- a/src/main/java/org/htmlunit/html/ElementFactory.java +++ b/src/main/java/org/htmlunit/html/ElementFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/ElementFromPointHandler.java b/src/main/java/org/htmlunit/html/ElementFromPointHandler.java index 154db0a2099..02e055c4d09 100644 --- a/src/main/java/org/htmlunit/html/ElementFromPointHandler.java +++ b/src/main/java/org/htmlunit/html/ElementFromPointHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/FormFieldWithNameHistory.java b/src/main/java/org/htmlunit/html/FormFieldWithNameHistory.java index 2bb60e27daf..fccd64a38e3 100644 --- a/src/main/java/org/htmlunit/html/FormFieldWithNameHistory.java +++ b/src/main/java/org/htmlunit/html/FormFieldWithNameHistory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/FrameWindow.java b/src/main/java/org/htmlunit/html/FrameWindow.java index e67f96fdcc7..2427f9aee7e 100644 --- a/src/main/java/org/htmlunit/html/FrameWindow.java +++ b/src/main/java/org/htmlunit/html/FrameWindow.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/Html.java b/src/main/java/org/htmlunit/html/Html.java index 1cd5264a182..d12ed2e2454 100644 --- a/src/main/java/org/htmlunit/html/Html.java +++ b/src/main/java/org/htmlunit/html/Html.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,9 @@ */ public final class Html { + /** The html5 doctype. */ + public static final String DOCTYPE_HTML = ""; + /** XHTML namespace. */ public static final String XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; diff --git a/src/main/java/org/htmlunit/html/HtmlAbbreviated.java b/src/main/java/org/htmlunit/html/HtmlAbbreviated.java index cd39db4e339..da78125251e 100644 --- a/src/main/java/org/htmlunit/html/HtmlAbbreviated.java +++ b/src/main/java/org/htmlunit/html/HtmlAbbreviated.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlAcronym.java b/src/main/java/org/htmlunit/html/HtmlAcronym.java index 7f2d21b377e..52ee3ad1554 100644 --- a/src/main/java/org/htmlunit/html/HtmlAcronym.java +++ b/src/main/java/org/htmlunit/html/HtmlAcronym.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlAddress.java b/src/main/java/org/htmlunit/html/HtmlAddress.java index 4c5fba1f928..f8c760e46d4 100644 --- a/src/main/java/org/htmlunit/html/HtmlAddress.java +++ b/src/main/java/org/htmlunit/html/HtmlAddress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlAnchor.java b/src/main/java/org/htmlunit/html/HtmlAnchor.java index 056887de0cd..ba42f1b9857 100644 --- a/src/main/java/org/htmlunit/html/HtmlAnchor.java +++ b/src/main/java/org/htmlunit/html/HtmlAnchor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -195,7 +195,7 @@ protected void doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey, target = page.getResolvedTarget(getTargetAttribute()); } page.getWebClient().download(page.getEnclosingWindow(), target, webRequest, - true, false, (ATTRIBUTE_NOT_DEFINED != downloadAttribute) ? downloadAttribute : null, "Link click"); + true, (ATTRIBUTE_NOT_DEFINED != downloadAttribute) ? downloadAttribute : null, "Link click"); } private boolean relContainsNoreferrer() { diff --git a/src/main/java/org/htmlunit/html/HtmlArea.java b/src/main/java/org/htmlunit/html/HtmlArea.java index 103f523d069..129b22d02d2 100644 --- a/src/main/java/org/htmlunit/html/HtmlArea.java +++ b/src/main/java/org/htmlunit/html/HtmlArea.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlArticle.java b/src/main/java/org/htmlunit/html/HtmlArticle.java index 4cf20fbb923..41634809154 100644 --- a/src/main/java/org/htmlunit/html/HtmlArticle.java +++ b/src/main/java/org/htmlunit/html/HtmlArticle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlAside.java b/src/main/java/org/htmlunit/html/HtmlAside.java index caa7a641cd6..6940cd01dd6 100644 --- a/src/main/java/org/htmlunit/html/HtmlAside.java +++ b/src/main/java/org/htmlunit/html/HtmlAside.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlAttributeChangeEvent.java b/src/main/java/org/htmlunit/html/HtmlAttributeChangeEvent.java index 32ae7b62c56..ccbcb896d53 100644 --- a/src/main/java/org/htmlunit/html/HtmlAttributeChangeEvent.java +++ b/src/main/java/org/htmlunit/html/HtmlAttributeChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlAttributeChangeListener.java b/src/main/java/org/htmlunit/html/HtmlAttributeChangeListener.java index 23c9603de49..fd5adf4b638 100644 --- a/src/main/java/org/htmlunit/html/HtmlAttributeChangeListener.java +++ b/src/main/java/org/htmlunit/html/HtmlAttributeChangeListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlAudio.java b/src/main/java/org/htmlunit/html/HtmlAudio.java index 18cb378beca..289e66b4434 100644 --- a/src/main/java/org/htmlunit/html/HtmlAudio.java +++ b/src/main/java/org/htmlunit/html/HtmlAudio.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlBackgroundSound.java b/src/main/java/org/htmlunit/html/HtmlBackgroundSound.java index c39b14e9983..460633e86bf 100644 --- a/src/main/java/org/htmlunit/html/HtmlBackgroundSound.java +++ b/src/main/java/org/htmlunit/html/HtmlBackgroundSound.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlBase.java b/src/main/java/org/htmlunit/html/HtmlBase.java index d5d61df1409..3056fae6771 100644 --- a/src/main/java/org/htmlunit/html/HtmlBase.java +++ b/src/main/java/org/htmlunit/html/HtmlBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlBaseFont.java b/src/main/java/org/htmlunit/html/HtmlBaseFont.java index b0e66fd9158..77224e41f08 100644 --- a/src/main/java/org/htmlunit/html/HtmlBaseFont.java +++ b/src/main/java/org/htmlunit/html/HtmlBaseFont.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlBidirectionalIsolation.java b/src/main/java/org/htmlunit/html/HtmlBidirectionalIsolation.java index c9b8ca11716..9b5c4d68eea 100644 --- a/src/main/java/org/htmlunit/html/HtmlBidirectionalIsolation.java +++ b/src/main/java/org/htmlunit/html/HtmlBidirectionalIsolation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlBidirectionalOverride.java b/src/main/java/org/htmlunit/html/HtmlBidirectionalOverride.java index d10392fc5f7..7442adc95eb 100644 --- a/src/main/java/org/htmlunit/html/HtmlBidirectionalOverride.java +++ b/src/main/java/org/htmlunit/html/HtmlBidirectionalOverride.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlBig.java b/src/main/java/org/htmlunit/html/HtmlBig.java index 14275f70c17..0775020322b 100644 --- a/src/main/java/org/htmlunit/html/HtmlBig.java +++ b/src/main/java/org/htmlunit/html/HtmlBig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlBlockQuote.java b/src/main/java/org/htmlunit/html/HtmlBlockQuote.java index cc46acedc6b..a68b95825c1 100644 --- a/src/main/java/org/htmlunit/html/HtmlBlockQuote.java +++ b/src/main/java/org/htmlunit/html/HtmlBlockQuote.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlBody.java b/src/main/java/org/htmlunit/html/HtmlBody.java index 7599394a57e..762e03530ee 100644 --- a/src/main/java/org/htmlunit/html/HtmlBody.java +++ b/src/main/java/org/htmlunit/html/HtmlBody.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlBold.java b/src/main/java/org/htmlunit/html/HtmlBold.java index 1fc36341217..2aceb9a1471 100644 --- a/src/main/java/org/htmlunit/html/HtmlBold.java +++ b/src/main/java/org/htmlunit/html/HtmlBold.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlBreak.java b/src/main/java/org/htmlunit/html/HtmlBreak.java index 890c3bc2591..95faabb88c1 100644 --- a/src/main/java/org/htmlunit/html/HtmlBreak.java +++ b/src/main/java/org/htmlunit/html/HtmlBreak.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlButton.java b/src/main/java/org/htmlunit/html/HtmlButton.java index 8acce57fe2f..0b060974104 100644 --- a/src/main/java/org/htmlunit/html/HtmlButton.java +++ b/src/main/java/org/htmlunit/html/HtmlButton.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlButtonInput.java b/src/main/java/org/htmlunit/html/HtmlButtonInput.java index daf6e7dc54c..401aaed4964 100644 --- a/src/main/java/org/htmlunit/html/HtmlButtonInput.java +++ b/src/main/java/org/htmlunit/html/HtmlButtonInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlCanvas.java b/src/main/java/org/htmlunit/html/HtmlCanvas.java index 7c7b53a7b31..7ec012d4702 100644 --- a/src/main/java/org/htmlunit/html/HtmlCanvas.java +++ b/src/main/java/org/htmlunit/html/HtmlCanvas.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlCaption.java b/src/main/java/org/htmlunit/html/HtmlCaption.java index 2d1e5a4f391..5d24f5eb7c7 100644 --- a/src/main/java/org/htmlunit/html/HtmlCaption.java +++ b/src/main/java/org/htmlunit/html/HtmlCaption.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlCenter.java b/src/main/java/org/htmlunit/html/HtmlCenter.java index 7dc3ee22ae9..e7493cb46ee 100644 --- a/src/main/java/org/htmlunit/html/HtmlCenter.java +++ b/src/main/java/org/htmlunit/html/HtmlCenter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlCheckBoxInput.java b/src/main/java/org/htmlunit/html/HtmlCheckBoxInput.java index a0ad891fe45..2309c933e94 100644 --- a/src/main/java/org/htmlunit/html/HtmlCheckBoxInput.java +++ b/src/main/java/org/htmlunit/html/HtmlCheckBoxInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlCitation.java b/src/main/java/org/htmlunit/html/HtmlCitation.java index f4017caba11..ed8bc0b5710 100644 --- a/src/main/java/org/htmlunit/html/HtmlCitation.java +++ b/src/main/java/org/htmlunit/html/HtmlCitation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlCode.java b/src/main/java/org/htmlunit/html/HtmlCode.java index 69b45eeb58e..762245c0698 100644 --- a/src/main/java/org/htmlunit/html/HtmlCode.java +++ b/src/main/java/org/htmlunit/html/HtmlCode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlColorInput.java b/src/main/java/org/htmlunit/html/HtmlColorInput.java index 4f45c319a8c..1184303ea32 100644 --- a/src/main/java/org/htmlunit/html/HtmlColorInput.java +++ b/src/main/java/org/htmlunit/html/HtmlColorInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlData.java b/src/main/java/org/htmlunit/html/HtmlData.java index e00312a03e0..c6dd99fff5f 100644 --- a/src/main/java/org/htmlunit/html/HtmlData.java +++ b/src/main/java/org/htmlunit/html/HtmlData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDataList.java b/src/main/java/org/htmlunit/html/HtmlDataList.java index cbed89585d2..b6b40bc49ac 100644 --- a/src/main/java/org/htmlunit/html/HtmlDataList.java +++ b/src/main/java/org/htmlunit/html/HtmlDataList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDateInput.java b/src/main/java/org/htmlunit/html/HtmlDateInput.java index 8e4acc1a0c9..e7bac09c29b 100644 --- a/src/main/java/org/htmlunit/html/HtmlDateInput.java +++ b/src/main/java/org/htmlunit/html/HtmlDateInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDateTimeLocalInput.java b/src/main/java/org/htmlunit/html/HtmlDateTimeLocalInput.java index 4855ce8ce8a..6924a61c506 100644 --- a/src/main/java/org/htmlunit/html/HtmlDateTimeLocalInput.java +++ b/src/main/java/org/htmlunit/html/HtmlDateTimeLocalInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDefinition.java b/src/main/java/org/htmlunit/html/HtmlDefinition.java index e76775d0ede..025922ec14f 100644 --- a/src/main/java/org/htmlunit/html/HtmlDefinition.java +++ b/src/main/java/org/htmlunit/html/HtmlDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDefinitionDescription.java b/src/main/java/org/htmlunit/html/HtmlDefinitionDescription.java index 9d3c9342a57..12fbd63545d 100644 --- a/src/main/java/org/htmlunit/html/HtmlDefinitionDescription.java +++ b/src/main/java/org/htmlunit/html/HtmlDefinitionDescription.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDefinitionList.java b/src/main/java/org/htmlunit/html/HtmlDefinitionList.java index 10266abde0a..2d24cfa6039 100644 --- a/src/main/java/org/htmlunit/html/HtmlDefinitionList.java +++ b/src/main/java/org/htmlunit/html/HtmlDefinitionList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDefinitionTerm.java b/src/main/java/org/htmlunit/html/HtmlDefinitionTerm.java index 206284e1146..64511c1c4d7 100644 --- a/src/main/java/org/htmlunit/html/HtmlDefinitionTerm.java +++ b/src/main/java/org/htmlunit/html/HtmlDefinitionTerm.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDeletedText.java b/src/main/java/org/htmlunit/html/HtmlDeletedText.java index e58e8feb394..9cc465b4c15 100644 --- a/src/main/java/org/htmlunit/html/HtmlDeletedText.java +++ b/src/main/java/org/htmlunit/html/HtmlDeletedText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDetails.java b/src/main/java/org/htmlunit/html/HtmlDetails.java index 2da7d55735e..d624a4282d3 100644 --- a/src/main/java/org/htmlunit/html/HtmlDetails.java +++ b/src/main/java/org/htmlunit/html/HtmlDetails.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDialog.java b/src/main/java/org/htmlunit/html/HtmlDialog.java index 22fce114683..3f9ef9a63b1 100644 --- a/src/main/java/org/htmlunit/html/HtmlDialog.java +++ b/src/main/java/org/htmlunit/html/HtmlDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDirectory.java b/src/main/java/org/htmlunit/html/HtmlDirectory.java index 63a65c8cdb2..f65d92fc925 100644 --- a/src/main/java/org/htmlunit/html/HtmlDirectory.java +++ b/src/main/java/org/htmlunit/html/HtmlDirectory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDivision.java b/src/main/java/org/htmlunit/html/HtmlDivision.java index ff4390a3838..716fbe2fb8a 100644 --- a/src/main/java/org/htmlunit/html/HtmlDivision.java +++ b/src/main/java/org/htmlunit/html/HtmlDivision.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlDomTreeWalker.java b/src/main/java/org/htmlunit/html/HtmlDomTreeWalker.java index 766c98a9ec8..0f6a9a7625e 100644 --- a/src/main/java/org/htmlunit/html/HtmlDomTreeWalker.java +++ b/src/main/java/org/htmlunit/html/HtmlDomTreeWalker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ */ package org.htmlunit.html; +import java.io.Serializable; + import org.w3c.dom.DOMException; import org.w3c.dom.Node; import org.w3c.dom.traversal.NodeFilter; @@ -24,13 +26,13 @@ * therefore we have this impl as backend. * * @see - * DOM-Level-2-Traversal-Range + * DOM-Level-2-Traversal-Range * @author Mike Dirolf * @author Frank Danek * @author Ahmed Ashour * @author Ronald Brill */ -public class HtmlDomTreeWalker { +public class HtmlDomTreeWalker implements Serializable { private final DomNode root_; private DomNode currentNode_; diff --git a/src/main/java/org/htmlunit/html/HtmlElement.java b/src/main/java/org/htmlunit/html/HtmlElement.java index db4f3011fe6..68034b78210 100644 --- a/src/main/java/org/htmlunit/html/HtmlElement.java +++ b/src/main/java/org/htmlunit/html/HtmlElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,9 @@ import static org.htmlunit.BrowserVersionFeatures.HTMLELEMENT_REMOVE_ACTIVE_TRIGGERS_BLUR_EVENT; import static org.htmlunit.BrowserVersionFeatures.KEYBOARD_EVENT_SPECIAL_KEYPRESS; +import static org.htmlunit.css.CssStyleSheet.ABSOLUTE; +import static org.htmlunit.css.CssStyleSheet.FIXED; +import static org.htmlunit.css.CssStyleSheet.STATIC; import java.io.IOException; import java.util.ArrayList; @@ -31,6 +34,8 @@ import org.htmlunit.SgmlPage; import org.htmlunit.WebAssert; import org.htmlunit.WebClient; +import org.htmlunit.WebWindow; +import org.htmlunit.css.ComputedCssStyleDeclaration; import org.htmlunit.html.impl.SelectableTextInput; import org.htmlunit.javascript.HtmlUnitScriptable; import org.htmlunit.javascript.host.dom.Document; @@ -162,7 +167,7 @@ public String value() { * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes a map ready initialized with the attributes for this element, or - * {@code null}. The map will be stored as is, not copied. + * {@code null}. The map will be stored as is, not copied. */ protected HtmlElement(final String qualifiedName, final SgmlPage page, final Map attributes) { @@ -176,7 +181,7 @@ protected HtmlElement(final String qualifiedName, final SgmlPage page, * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes a map ready initialized with the attributes for this element, or - * {@code null}. The map will be stored as is, not copied. + * {@code null}. The map will be stored as is, not copied. */ protected HtmlElement(final String namespaceURI, final String qualifiedName, final SgmlPage page, final Map attributes) { @@ -191,17 +196,17 @@ protected void setAttributeNS(final String namespaceURI, final String qualifiedN final String attributeValue, final boolean notifyAttributeChangeListeners, final boolean notifyMutationObservers) { + final HtmlPage htmlPage = getHtmlPageOrNull(); + // TODO: Clean up; this is a hack for HtmlElement living within an XmlPage. - if (null == getHtmlPageOrNull()) { + if (null == htmlPage) { super.setAttributeNS(namespaceURI, qualifiedName, attributeValue, notifyAttributeChangeListeners, notifyMutationObservers); return; } final String oldAttributeValue = getAttribute(qualifiedName); - final HtmlPage htmlPage = (HtmlPage) getPage(); final boolean mappedElement = isAttachedToPage() - && htmlPage != null && (DomElement.NAME_ATTRIBUTE.equals(qualifiedName) || DomElement.ID_ATTRIBUTE.equals(qualifiedName)); if (mappedElement) { // cast is save here because isMappedElement checks for HtmlPage @@ -287,12 +292,19 @@ private void fireAttributeChangeImpl(final HtmlAttributeChangeEvent event, */ @Override public Attr setAttributeNode(final Attr attribute) { + final HtmlPage htmlPage = getHtmlPageOrNull(); + + // TODO: Clean up; this is a hack for HtmlElement living within an XmlPage. + if (null == htmlPage) { + return super.setAttributeNode(attribute); + } + final String qualifiedName = attribute.getName(); final String oldAttributeValue = getAttribute(qualifiedName); - final HtmlPage htmlPage = (HtmlPage) getPage(); + final boolean mappedElement = isAttachedToPage() - && htmlPage != null - && (DomElement.NAME_ATTRIBUTE.equals(qualifiedName) || DomElement.ID_ATTRIBUTE.equals(qualifiedName)); + && (DomElement.NAME_ATTRIBUTE.equals(qualifiedName) + || DomElement.ID_ATTRIBUTE.equals(qualifiedName)); if (mappedElement) { htmlPage.removeMappedElement(this, false, false); } @@ -325,23 +337,28 @@ public void removeAttribute(final String attributeName) { } final HtmlPage htmlPage = getHtmlPageOrNull(); - final boolean mapped = htmlPage != null - && (DomElement.NAME_ATTRIBUTE.equals(attributeName) || DomElement.ID_ATTRIBUTE.equals(attributeName)); + + // TODO: Clean up; this is a hack for HtmlElement living within an XmlPage. + if (null == htmlPage) { + super.removeAttribute(attributeName); + return; + } + + final boolean mapped = DomElement.NAME_ATTRIBUTE.equals(attributeName) + || DomElement.ID_ATTRIBUTE.equals(attributeName); if (mapped) { htmlPage.removeMappedElement(this, false, false); } super.removeAttribute(attributeName); - if (htmlPage != null) { - if (mapped) { - htmlPage.addMappedElement(this, false); - } - - final HtmlAttributeChangeEvent event = new HtmlAttributeChangeEvent(this, attributeName, value); - fireHtmlAttributeRemoved(event); - htmlPage.fireHtmlAttributeRemoved(event); + if (mapped) { + htmlPage.addMappedElement(this, false); } + + final HtmlAttributeChangeEvent event = new HtmlAttributeChangeEvent(this, attributeName, value); + fireHtmlAttributeRemoved(event); + htmlPage.fireHtmlAttributeRemoved(event); } /** @@ -605,10 +622,12 @@ private Page type(final char c, final boolean lastType) final HtmlForm form = getEnclosingForm(); if (form != null && c == '\n' && isSubmittableByEnter()) { - final HtmlSubmitInput submit = form.getFirstByXPath(".//input[@type='submit']"); - if (submit != null) { - return submit.click(); + for (final DomElement descendant : form.getDomElementDescendants()) { + if (descendant instanceof HtmlSubmitInput) { + return descendant.click(); + } } + form.submit((SubmittableElement) this); webClient.getJavaScriptEngine().processPostponedActions(); } @@ -660,7 +679,8 @@ public Page type(final Keyboard keyboard) throws IOException { } } - for (int i = 0; i < keys.size(); i++) { + final int size = keys.size(); + for (int i = 0; i < size; i++) { final Object[] entry = keys.get(i); if (entry.length == 1) { type((char) entry[0], i == keys.size() - 1); @@ -1275,7 +1295,7 @@ public DisplayStyle getDefaultStyleDisplay() { * Helper for src retrieval and normalization. * * @return the value of the attribute {@code src} with all line breaks removed - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ protected final String getSrcAttributeNormalized() { // at the moment StringUtils.replaceChars returns the org string @@ -1421,6 +1441,186 @@ public void setRequired(final boolean required) { } } + /** + * INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
+ * + * @param returnNullIfFixed if position is 'fixed' return null + * @return the offset parent {@link HtmlElement} + */ + public HtmlElement getOffsetParentInternal(final boolean returnNullIfFixed) { + if (getParentNode() == null) { + return null; + } + + final WebWindow webWindow = getPage().getEnclosingWindow(); + final ComputedCssStyleDeclaration style = webWindow.getComputedStyle(this, null); + final String position = style.getPositionWithInheritance(); + + if (returnNullIfFixed && FIXED.equals(position)) { + return null; + } + + final boolean staticPos = STATIC.equals(position); + + DomNode currentElement = this; + while (currentElement != null) { + + final DomNode parentNode = currentElement.getParentNode(); + if (parentNode instanceof HtmlBody + || (staticPos && parentNode instanceof HtmlTableDataCell) + || (staticPos && parentNode instanceof HtmlTable)) { + return (HtmlElement) parentNode; + } + + if (parentNode instanceof HtmlElement) { + final ComputedCssStyleDeclaration parentStyle = + webWindow.getComputedStyle((HtmlElement) parentNode, null); + final String parentPosition = parentStyle.getPositionWithInheritance(); + if (!STATIC.equals(parentPosition)) { + return (HtmlElement) parentNode; + } + } + + currentElement = currentElement.getParentNode(); + } + + return null; + } + + /** + * @return this element's top offset, which is the calculated left position of this + * element relative to the offsetParent. + */ + public int getOffsetTop() { + if (this instanceof HtmlBody) { + return 0; + } + + int top = 0; + + // Add the offset for this node. + final WebWindow webWindow = getPage().getEnclosingWindow(); + ComputedCssStyleDeclaration style = webWindow.getComputedStyle(this, null); + top += style.getTop(true, false, false); + + // If this node is absolutely positioned, we're done. + final String position = style.getPositionWithInheritance(); + if (ABSOLUTE.equals(position) || FIXED.equals(position)) { + return top; + } + + final HtmlElement offsetParent = getOffsetParentInternal(false); + + // Add the offset for the ancestor nodes. + DomNode parentNode = getParentNode(); + while (parentNode != null && parentNode != offsetParent) { + if (parentNode instanceof HtmlElement) { + style = webWindow.getComputedStyle((HtmlElement) parentNode, null); + top += style.getTop(false, true, true); + } + parentNode = parentNode.getParentNode(); + } + + if (offsetParent != null) { + style = webWindow.getComputedStyle(this, null); + final boolean thisElementHasTopMargin = style.getMarginTopValue() != 0; + + style = webWindow.getComputedStyle(offsetParent, null); + if (!thisElementHasTopMargin) { + top += style.getMarginTopValue(); + } + top += style.getPaddingTopValue(); + } + + return top; + } + + /** + * @return this element's left offset, which is the calculated left position of this + * element relative to the offsetParent. + */ + public int getOffsetLeft() { + if (this instanceof HtmlBody) { + return 0; + } + + int left = 0; + + // Add the offset for this node. + final WebWindow webWindow = getPage().getEnclosingWindow(); + ComputedCssStyleDeclaration style = webWindow.getComputedStyle(this, null); + left += style.getLeft(true, false, false); + + // If this node is absolutely positioned, we're done. + final String position = style.getPositionWithInheritance(); + if (ABSOLUTE.equals(position) || FIXED.equals(position)) { + return left; + } + + final HtmlElement offsetParent = getOffsetParentInternal(false); + + DomNode parentNode = getParentNode(); + while (parentNode != null && parentNode != offsetParent) { + if (parentNode instanceof HtmlElement) { + style = webWindow.getComputedStyle((HtmlElement) parentNode, null); + left += style.getLeft(true, true, true); + } + parentNode = parentNode.getParentNode(); + } + + if (offsetParent != null) { + style = webWindow.getComputedStyle(offsetParent, null); + left += style.getMarginLeftValue(); + left += style.getPaddingLeftValue(); + } + + return left; + } + + /** + * Returns this element's X position. + * @return this element's X position + */ + public int getPosX() { + int cumulativeOffset = 0; + final WebWindow webWindow = getPage().getEnclosingWindow(); + + HtmlElement element = this; + while (element != null) { + cumulativeOffset += element.getOffsetLeft(); + if (element != this) { + final ComputedCssStyleDeclaration style = + webWindow.getComputedStyle(element, null); + cumulativeOffset += style.getBorderLeftValue(); + } + element = element.getOffsetParentInternal(false); + } + + return cumulativeOffset; + } + + /** + * Returns this element's Y position. + * @return this element's Y position + */ + public int getPosY() { + int cumulativeOffset = 0; + final WebWindow webWindow = getPage().getEnclosingWindow(); + + HtmlElement element = this; + while (element != null) { + cumulativeOffset += element.getOffsetTop(); + if (element != this) { + final ComputedCssStyleDeclaration style = + webWindow.getComputedStyle(element, null); + cumulativeOffset += style.getBorderTopValue(); + } + element = element.getOffsetParentInternal(false); + } + + return cumulativeOffset; + } + /** * {@inheritDoc} */ diff --git a/src/main/java/org/htmlunit/html/HtmlEmailInput.java b/src/main/java/org/htmlunit/html/HtmlEmailInput.java index 8b923b7b920..fb391a50ad0 100644 --- a/src/main/java/org/htmlunit/html/HtmlEmailInput.java +++ b/src/main/java/org/htmlunit/html/HtmlEmailInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlEmbed.java b/src/main/java/org/htmlunit/html/HtmlEmbed.java index 8f169a736f6..266f942cd50 100644 --- a/src/main/java/org/htmlunit/html/HtmlEmbed.java +++ b/src/main/java/org/htmlunit/html/HtmlEmbed.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlEmphasis.java b/src/main/java/org/htmlunit/html/HtmlEmphasis.java index a3d3f495daa..a0ebfd2175b 100644 --- a/src/main/java/org/htmlunit/html/HtmlEmphasis.java +++ b/src/main/java/org/htmlunit/html/HtmlEmphasis.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlExample.java b/src/main/java/org/htmlunit/html/HtmlExample.java index 553a3edf2dd..40207710fed 100644 --- a/src/main/java/org/htmlunit/html/HtmlExample.java +++ b/src/main/java/org/htmlunit/html/HtmlExample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlFieldSet.java b/src/main/java/org/htmlunit/html/HtmlFieldSet.java index 25fb285fd16..bfe0cc3fdee 100644 --- a/src/main/java/org/htmlunit/html/HtmlFieldSet.java +++ b/src/main/java/org/htmlunit/html/HtmlFieldSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlFigure.java b/src/main/java/org/htmlunit/html/HtmlFigure.java index a45ee383e79..e2aa3446d08 100644 --- a/src/main/java/org/htmlunit/html/HtmlFigure.java +++ b/src/main/java/org/htmlunit/html/HtmlFigure.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlFigureCaption.java b/src/main/java/org/htmlunit/html/HtmlFigureCaption.java index 9577c7868a7..8e0485fb7bc 100644 --- a/src/main/java/org/htmlunit/html/HtmlFigureCaption.java +++ b/src/main/java/org/htmlunit/html/HtmlFigureCaption.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlFileInput.java b/src/main/java/org/htmlunit/html/HtmlFileInput.java index cb53def554a..5f95299fd61 100644 --- a/src/main/java/org/htmlunit/html/HtmlFileInput.java +++ b/src/main/java/org/htmlunit/html/HtmlFileInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -137,7 +137,7 @@ public void setContentType(final String contentType) { /** * Gets the content type that should be sent together with the uploaded file. * @return the content type, or {@code null} if this has not been explicitly set - * and should be guessed from file content + * and should be guessed from file content */ public String getContentType() { return contentType_; diff --git a/src/main/java/org/htmlunit/html/HtmlFont.java b/src/main/java/org/htmlunit/html/HtmlFont.java index 4b2852afcda..cd9df518051 100644 --- a/src/main/java/org/htmlunit/html/HtmlFont.java +++ b/src/main/java/org/htmlunit/html/HtmlFont.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlFooter.java b/src/main/java/org/htmlunit/html/HtmlFooter.java index dc9382b9469..f9236d3b898 100644 --- a/src/main/java/org/htmlunit/html/HtmlFooter.java +++ b/src/main/java/org/htmlunit/html/HtmlFooter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlForm.java b/src/main/java/org/htmlunit/html/HtmlForm.java index 9ad6cafa176..dd7797388f3 100644 --- a/src/main/java/org/htmlunit/html/HtmlForm.java +++ b/src/main/java/org/htmlunit/html/HtmlForm.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -191,7 +191,7 @@ && getAttributeDirect(ATTRIBUTE_NOVALIDATE) != ATTRIBUTE_NOT_DEFINED) { final WebWindow webWindow = htmlPage.getEnclosingWindow(); // Calling form.submit() twice forces double download. - webClient.download(webWindow, target, request, false, false, null, "JS form.submit()"); + webClient.download(webWindow, target, request, false, null, "JS form.submit()"); } /** @@ -541,36 +541,18 @@ private List getFormElementsByAttribute( final String attributeName, final String attributeValue) { - final List list = new ArrayList<>(); - final String lowerCaseTagName = elementName.toLowerCase(Locale.ROOT); - - for (final HtmlElement element : getElements()) { - if (element.getTagName().equals(lowerCaseTagName)) { - final String attValue = element.getAttribute(attributeName); - if (attValue.equals(attributeValue)) { - list.add((E) element); - } - } - } - return list; - } - - /** - * @return returns a list of all form controls contained in the <form> element or referenced by formId - * but ignoring elements that are contained in a nested form - * @deprecated as of version 4.4.0; use {@link #getFormElements()}, {@link #getElementsJS()} instead - */ - @Deprecated - public List getElements() { - return getElements(htmlElement -> SUBMITTABLE_TAG_NAMES.contains(htmlElement.getTagName())); + return (List) getElements(htmlElement -> + htmlElement.getTagName().equals(elementName) + && htmlElement.getAttribute(attributeName).equals(attributeValue)); } /** * @return A List containing all form controls in the form. - * The form controls in the returned collection are in the same order - * in which they appear in the form by following a preorder, - * depth-first traversal of the tree. This is called tree order. Only the following elements are returned: - * button, fieldset, input, object, output, select, textarea. + * The form controls in the returned collection are in the same order + * in which they appear in the form by following a preorder, + * depth-first traversal of the tree. This is called tree order. + * Only the following elements are returned: + * button, fieldset, input, object, output, select, textarea. */ public List getFormElements() { return getElements(htmlElement -> { @@ -590,12 +572,13 @@ public List getFormElements() { * see https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/elements * * @return A List containing all non-image controls in the form. - * The form controls in the returned collection are in the same order - * in which they appear in the form by following a preorder, - * depth-first traversal of the tree. This is called tree order. Only the following elements are returned: - * button, fieldset, - * input (with the exception that any whose type is "image" are omitted for historical reasons), - * object, output, select, textarea. + * The form controls in the returned collection are in the same order + * in which they appear in the form by following a preorder, + * depth-first traversal of the tree. This is called tree order. + * Only the following elements are returned: + * button, fieldset, + * input (with the exception that any whose type is "image" are omitted for historical reasons), + * object, output, select, textarea. */ public List getElementsJS() { return getElements(htmlElement -> { diff --git a/src/main/java/org/htmlunit/html/HtmlFrame.java b/src/main/java/org/htmlunit/html/HtmlFrame.java index a5701f5f7e0..1759bc89df9 100644 --- a/src/main/java/org/htmlunit/html/HtmlFrame.java +++ b/src/main/java/org/htmlunit/html/HtmlFrame.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlFrameSet.java b/src/main/java/org/htmlunit/html/HtmlFrameSet.java index dc6cc5c868a..72373a95208 100644 --- a/src/main/java/org/htmlunit/html/HtmlFrameSet.java +++ b/src/main/java/org/htmlunit/html/HtmlFrameSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlHead.java b/src/main/java/org/htmlunit/html/HtmlHead.java index 5f47a1d0d8a..1644ec3a378 100644 --- a/src/main/java/org/htmlunit/html/HtmlHead.java +++ b/src/main/java/org/htmlunit/html/HtmlHead.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlHeader.java b/src/main/java/org/htmlunit/html/HtmlHeader.java index f172f2dd246..f28bddfa71d 100644 --- a/src/main/java/org/htmlunit/html/HtmlHeader.java +++ b/src/main/java/org/htmlunit/html/HtmlHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlHeading1.java b/src/main/java/org/htmlunit/html/HtmlHeading1.java index 15ca56c501c..e5eeefb519a 100644 --- a/src/main/java/org/htmlunit/html/HtmlHeading1.java +++ b/src/main/java/org/htmlunit/html/HtmlHeading1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlHeading2.java b/src/main/java/org/htmlunit/html/HtmlHeading2.java index 657bf0c6f2f..e3524b607f6 100644 --- a/src/main/java/org/htmlunit/html/HtmlHeading2.java +++ b/src/main/java/org/htmlunit/html/HtmlHeading2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlHeading3.java b/src/main/java/org/htmlunit/html/HtmlHeading3.java index 20d41808dbf..fdcf4f0ab16 100644 --- a/src/main/java/org/htmlunit/html/HtmlHeading3.java +++ b/src/main/java/org/htmlunit/html/HtmlHeading3.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlHeading4.java b/src/main/java/org/htmlunit/html/HtmlHeading4.java index e28c9f7ad38..9755347b3fb 100644 --- a/src/main/java/org/htmlunit/html/HtmlHeading4.java +++ b/src/main/java/org/htmlunit/html/HtmlHeading4.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlHeading5.java b/src/main/java/org/htmlunit/html/HtmlHeading5.java index bb931137d00..14d26988ca8 100644 --- a/src/main/java/org/htmlunit/html/HtmlHeading5.java +++ b/src/main/java/org/htmlunit/html/HtmlHeading5.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlHeading6.java b/src/main/java/org/htmlunit/html/HtmlHeading6.java index fe87a181fc8..bf585172957 100644 --- a/src/main/java/org/htmlunit/html/HtmlHeading6.java +++ b/src/main/java/org/htmlunit/html/HtmlHeading6.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlHiddenInput.java b/src/main/java/org/htmlunit/html/HtmlHiddenInput.java index 823545fea96..ed3cc0e36c7 100644 --- a/src/main/java/org/htmlunit/html/HtmlHiddenInput.java +++ b/src/main/java/org/htmlunit/html/HtmlHiddenInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlHorizontalRule.java b/src/main/java/org/htmlunit/html/HtmlHorizontalRule.java index 53955050627..2495a7cd555 100644 --- a/src/main/java/org/htmlunit/html/HtmlHorizontalRule.java +++ b/src/main/java/org/htmlunit/html/HtmlHorizontalRule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlHtml.java b/src/main/java/org/htmlunit/html/HtmlHtml.java index f07f67f6b0a..56a9f6cb416 100644 --- a/src/main/java/org/htmlunit/html/HtmlHtml.java +++ b/src/main/java/org/htmlunit/html/HtmlHtml.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlImage.java b/src/main/java/org/htmlunit/html/HtmlImage.java index d7443adedb9..ec90e4aa4f4 100644 --- a/src/main/java/org/htmlunit/html/HtmlImage.java +++ b/src/main/java/org/htmlunit/html/HtmlImage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,12 +41,12 @@ import org.htmlunit.WebClient; import org.htmlunit.WebRequest; import org.htmlunit.WebResponse; +import org.htmlunit.http.HttpStatus; import org.htmlunit.javascript.AbstractJavaScriptEngine; import org.htmlunit.javascript.PostponedAction; import org.htmlunit.javascript.host.dom.Document; import org.htmlunit.javascript.host.event.Event; import org.htmlunit.javascript.host.event.MouseEvent; -import org.htmlunit.javascript.host.html.HTMLElement; import org.htmlunit.platform.Platform; import org.htmlunit.platform.geom.IntDimension2D; import org.htmlunit.platform.image.ImageData; @@ -278,7 +278,9 @@ public void doOnLoad() { downloadImageIfNeeded(); // if the download was a success if (imageWebResponse_.isSuccess()) { - loadSuccessful = true; // Trigger the onload handler + if (imageWebResponse_.getStatusCode() != HttpStatus.NO_CONTENT_204) { + loadSuccessful = true; // Trigger the onload handler + } } } catch (final IOException e) { @@ -873,12 +875,11 @@ public String getLocalName() { public ScriptResult fireEvent(final Event event) { if (event instanceof MouseEvent) { final MouseEvent mouseEvent = (MouseEvent) event; - final HTMLElement scriptableObject = getScriptableObject(); if (lastClickX_ >= 0) { - mouseEvent.setClientX(scriptableObject.getPosX() + lastClickX_); + mouseEvent.setClientX(getPosX() + lastClickX_); } if (lastClickY_ >= 0) { - mouseEvent.setClientY(scriptableObject.getPosX() + lastClickY_); + mouseEvent.setClientY(getPosX() + lastClickY_); } } diff --git a/src/main/java/org/htmlunit/html/HtmlImageInput.java b/src/main/java/org/htmlunit/html/HtmlImageInput.java index e834e04fe1c..e9c7b0f9139 100644 --- a/src/main/java/org/htmlunit/html/HtmlImageInput.java +++ b/src/main/java/org/htmlunit/html/HtmlImageInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,8 +14,6 @@ */ package org.htmlunit.html; -import static org.htmlunit.BrowserVersionFeatures.HTMLIMAGE_NAME_VALUE_PARAMS; - import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -87,10 +85,6 @@ public NameValuePair[] getSubmitNameValuePairs() { if (wasPositionSpecified_) { final NameValuePair valueX = new NameValuePair(prefix + 'x', Integer.toString(xPosition_)); final NameValuePair valueY = new NameValuePair(prefix + 'y', Integer.toString(yPosition_)); - if (!prefix.isEmpty() && hasFeature(HTMLIMAGE_NAME_VALUE_PARAMS) && !getRawValue().isEmpty()) { - return new NameValuePair[] {valueX, valueY, - new NameValuePair(getNameAttribute(), getRawValue()) }; - } return new NameValuePair[] {valueX, valueY}; } return new NameValuePair[]{new NameValuePair(getNameAttribute(), getRawValue())}; diff --git a/src/main/java/org/htmlunit/html/HtmlInlineFrame.java b/src/main/java/org/htmlunit/html/HtmlInlineFrame.java index f51fd949fe1..d700d07815f 100644 --- a/src/main/java/org/htmlunit/html/HtmlInlineFrame.java +++ b/src/main/java/org/htmlunit/html/HtmlInlineFrame.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlInlineQuotation.java b/src/main/java/org/htmlunit/html/HtmlInlineQuotation.java index a36ccc92715..3197d7a7df9 100644 --- a/src/main/java/org/htmlunit/html/HtmlInlineQuotation.java +++ b/src/main/java/org/htmlunit/html/HtmlInlineQuotation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ public class HtmlInlineQuotation extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code cite} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCiteAttribute() { return getAttributeDirect("cite"); diff --git a/src/main/java/org/htmlunit/html/HtmlInput.java b/src/main/java/org/htmlunit/html/HtmlInput.java index eb992273e2f..5cabcfdb7fc 100644 --- a/src/main/java/org/htmlunit/html/HtmlInput.java +++ b/src/main/java/org/htmlunit/html/HtmlInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ import java.util.HashSet; import java.util.Locale; import java.util.Map; -import java.util.regex.Pattern; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; @@ -36,11 +35,13 @@ import org.htmlunit.ScriptResult; import org.htmlunit.SgmlPage; import org.htmlunit.WebClient; +import org.htmlunit.corejs.javascript.Context; +import org.htmlunit.corejs.javascript.regexp.RegExpEngineAccess; import org.htmlunit.javascript.AbstractJavaScriptEngine; +import org.htmlunit.javascript.HtmlUnitContextFactory; import org.htmlunit.javascript.host.event.Event; import org.htmlunit.javascript.host.event.MouseEvent; import org.htmlunit.javascript.host.html.HTMLInputElement; -import org.htmlunit.javascript.regexp.RegExpJsToJavaConverter; import org.htmlunit.util.NameValuePair; import org.xml.sax.helpers.AttributesImpl; @@ -222,7 +223,7 @@ public final boolean isDisabled() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code readonly} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getReadOnlyAttribute() { return getAttributeDirect("readonly"); @@ -234,7 +235,7 @@ public final String getReadOnlyAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code size} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getSizeAttribute() { return getAttributeDirect("size"); @@ -246,7 +247,7 @@ public final String getSizeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code maxlength} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getMaxLengthAttribute() { return getAttribute("maxLength"); @@ -276,7 +277,7 @@ protected int getMaxLength() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code minlength} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getMinLengthAttribute() { return getAttribute("minLength"); @@ -306,7 +307,7 @@ protected int getMinLength() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code src} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public String getSrcAttribute() { return getSrcAttributeNormalized(); @@ -352,7 +353,7 @@ public void setSrcAttribute(final String src) { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code alt} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAltAttribute() { return getAttributeDirect("alt"); @@ -364,7 +365,7 @@ public final String getAltAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code usemap} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getUseMapAttribute() { return getAttributeDirect("usemap"); @@ -376,7 +377,7 @@ public final String getUseMapAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code tabindex} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getTabIndexAttribute() { return getAttributeDirect("tabindex"); @@ -388,7 +389,7 @@ public final String getTabIndexAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code accesskey} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAccessKeyAttribute() { return getAttributeDirect("accesskey"); @@ -400,7 +401,7 @@ public final String getAccessKeyAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code onfocus} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getOnFocusAttribute() { return getAttributeDirect("onfocus"); @@ -412,7 +413,7 @@ public final String getOnFocusAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code onblur} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getOnBlurAttribute() { return getAttributeDirect("onblur"); @@ -424,7 +425,7 @@ public final String getOnBlurAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code onselect} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getOnSelectAttribute() { return getAttributeDirect("onselect"); @@ -436,7 +437,7 @@ public final String getOnSelectAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code onchange} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getOnChangeAttribute() { return getAttributeDirect("onchange"); @@ -448,7 +449,7 @@ public final String getOnChangeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code accept} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAcceptAttribute() { return getAttribute(HttpHeader.ACCEPT_LC); @@ -460,7 +461,7 @@ public final String getAcceptAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code align} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAlignAttribute() { return getAttributeDirect("align"); @@ -1011,10 +1012,12 @@ private boolean isPatternValid() { return true; } - final RegExpJsToJavaConverter converter = new RegExpJsToJavaConverter(); - final String javaPattern = converter.convert(pattern); - try { - return Pattern.matches(javaPattern, value); + try (Context cx = HtmlUnitContextFactory.getGlobal().enterContext()) { + RegExpEngineAccess.compile(cx, pattern, ""); + final RegExpEngineAccess.CompiledRegExp compiled + = RegExpEngineAccess.compile(cx, "^(?:" + pattern + ")$", ""); + + return RegExpEngineAccess.matches(cx, value, compiled); } catch (final Exception ignored) { // ignore if regex invalid diff --git a/src/main/java/org/htmlunit/html/HtmlInsertedText.java b/src/main/java/org/htmlunit/html/HtmlInsertedText.java index 6b92860479f..3f65a4d2e3e 100644 --- a/src/main/java/org/htmlunit/html/HtmlInsertedText.java +++ b/src/main/java/org/htmlunit/html/HtmlInsertedText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ public class HtmlInsertedText extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code cite} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCiteAttribute() { return getAttributeDirect("cite"); @@ -63,7 +63,7 @@ public final String getCiteAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code datetime} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getDateTimeAttribute() { return getAttributeDirect("datetime"); diff --git a/src/main/java/org/htmlunit/html/HtmlItalic.java b/src/main/java/org/htmlunit/html/HtmlItalic.java index e1be355e17f..f26eda91658 100644 --- a/src/main/java/org/htmlunit/html/HtmlItalic.java +++ b/src/main/java/org/htmlunit/html/HtmlItalic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlKeyboard.java b/src/main/java/org/htmlunit/html/HtmlKeyboard.java index 9d5cd89d9fc..f8cc10c8fa7 100644 --- a/src/main/java/org/htmlunit/html/HtmlKeyboard.java +++ b/src/main/java/org/htmlunit/html/HtmlKeyboard.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlLabel.java b/src/main/java/org/htmlunit/html/HtmlLabel.java index 407ab8c38d7..7ab63990ef7 100644 --- a/src/main/java/org/htmlunit/html/HtmlLabel.java +++ b/src/main/java/org/htmlunit/html/HtmlLabel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -56,7 +56,7 @@ public class HtmlLabel extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code for} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getForAttribute() { return getAttributeDirect("for"); @@ -68,7 +68,7 @@ public final String getForAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code accesskey} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAccessKeyAttribute() { return getAttributeDirect("accesskey"); @@ -80,7 +80,7 @@ public final String getAccessKeyAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code onfocus} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getOnFocusAttribute() { return getAttributeDirect("onfocus"); @@ -92,7 +92,7 @@ public final String getOnFocusAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code onblur} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getOnBlurAttribute() { return getAttributeDirect("onblur"); diff --git a/src/main/java/org/htmlunit/html/HtmlLayer.java b/src/main/java/org/htmlunit/html/HtmlLayer.java index 41686da7229..4dc10388c39 100644 --- a/src/main/java/org/htmlunit/html/HtmlLayer.java +++ b/src/main/java/org/htmlunit/html/HtmlLayer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlLegend.java b/src/main/java/org/htmlunit/html/HtmlLegend.java index ba70d7340d1..4eaa2c826ff 100644 --- a/src/main/java/org/htmlunit/html/HtmlLegend.java +++ b/src/main/java/org/htmlunit/html/HtmlLegend.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ public class HtmlLegend extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code accesskey} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAccessKeyAttribute() { return getAttributeDirect("accesskey"); @@ -63,7 +63,7 @@ public final String getAccessKeyAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code align} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAlignAttribute() { return getAttributeDirect("align"); diff --git a/src/main/java/org/htmlunit/html/HtmlLink.java b/src/main/java/org/htmlunit/html/HtmlLink.java index 745e1eea767..481afdc3e38 100644 --- a/src/main/java/org/htmlunit/html/HtmlLink.java +++ b/src/main/java/org/htmlunit/html/HtmlLink.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ */ package org.htmlunit.html; +import static org.htmlunit.BrowserVersionFeatures.HTMLLINK_CHECK_RESPONSE_TYPE_FOR_STYLESHEET; + import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; @@ -33,6 +35,7 @@ import org.htmlunit.javascript.host.event.Event; import org.htmlunit.javascript.host.html.HTMLLinkElement; import org.htmlunit.util.ArrayUtils; +import org.htmlunit.util.MimeType; import org.htmlunit.util.StringUtils; import org.htmlunit.xml.XmlPage; @@ -78,7 +81,7 @@ public class HtmlLink extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code charset} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharsetAttribute() { return getAttributeDirect("charset"); @@ -90,7 +93,7 @@ public final String getCharsetAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code href} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getHrefAttribute() { return getAttributeDirect("href"); @@ -102,7 +105,7 @@ public final String getHrefAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code hreflang} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getHrefLangAttribute() { return getAttributeDirect("hreflang"); @@ -114,7 +117,7 @@ public final String getHrefLangAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code type} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getTypeAttribute() { return getAttributeDirect(TYPE_ATTRIBUTE); @@ -126,7 +129,7 @@ public final String getTypeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code rel} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getRelAttribute() { return getAttributeDirect("rel"); @@ -138,7 +141,7 @@ public final String getRelAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code rev} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getRevAttribute() { return getAttributeDirect("rev"); @@ -150,7 +153,7 @@ public final String getRevAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code media} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getMediaAttribute() { return getAttributeDirect("media"); @@ -162,7 +165,7 @@ public final String getMediaAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code target} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getTargetAttribute() { return getAttributeDirect("target"); @@ -175,11 +178,11 @@ public final String getTargetAttribute() { * * @param downloadIfNeeded indicates if a request should be performed this hasn't been done previously * @return {@code null} if no download should be performed and when this wasn't already done; the response - * received when performing a request for the content referenced by this tag otherwise + * received when performing a request for the content referenced by this tag otherwise * @throws IOException if an error occurs while downloading the content */ public WebResponse getWebResponse(final boolean downloadIfNeeded) throws IOException { - return getWebResponse(downloadIfNeeded, null); + return getWebResponse(downloadIfNeeded, null, false, null); } /** @@ -190,11 +193,14 @@ public WebResponse getWebResponse(final boolean downloadIfNeeded) throws IOExcep * * @param downloadIfNeeded indicates if a request should be performed this hasn't been done previously * @param request the request; if null getWebRequest() is called to create one + * @param isStylesheetRequest true if this should return a stylesheet + * @param type the type definined for the stylesheet link * @return {@code null} if no download should be performed and when this wasn't already done; the response - * received when performing a request for the content referenced by this tag otherwise + * received when performing a request for the content referenced by this tag otherwise * @throws IOException if an error occurs while downloading the content */ - public WebResponse getWebResponse(final boolean downloadIfNeeded, WebRequest request) throws IOException { + public WebResponse getWebResponse(final boolean downloadIfNeeded, WebRequest request, + final boolean isStylesheetRequest, final String type) throws IOException { final WebClient webclient = getPage().getWebClient(); if (null == request) { request = getWebRequest(); @@ -204,11 +210,26 @@ public WebResponse getWebResponse(final boolean downloadIfNeeded, WebRequest req try { final WebResponse response = webclient.loadWebResponse(request); if (response.isSuccess()) { + if (isStylesheetRequest + && webclient.getBrowserVersion() + .hasFeature(HTMLLINK_CHECK_RESPONSE_TYPE_FOR_STYLESHEET)) { + + if (org.apache.commons.lang3.StringUtils.isNotBlank(type) + && !MimeType.TEXT_CSS.equals(type)) { + return null; + } + + final String respType = response.getContentType(); + if (org.apache.commons.lang3.StringUtils.isNotBlank(respType) + && !MimeType.TEXT_CSS.equals(respType)) { + executeEvent(Event.TYPE_ERROR); + return response; + } + } executeEvent(Event.TYPE_LOAD); + return response; } - else { - executeEvent(Event.TYPE_ERROR); - } + executeEvent(Event.TYPE_ERROR); return response; } catch (final IOException e) { diff --git a/src/main/java/org/htmlunit/html/HtmlListItem.java b/src/main/java/org/htmlunit/html/HtmlListItem.java index bb643fff7e1..05ce4b5f967 100644 --- a/src/main/java/org/htmlunit/html/HtmlListItem.java +++ b/src/main/java/org/htmlunit/html/HtmlListItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class HtmlListItem extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code type} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getTypeAttribute() { return getAttributeDirect(TYPE_ATTRIBUTE); @@ -62,7 +62,7 @@ public final String getTypeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code value} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getValueAttribute() { return getAttributeDirect(VALUE_ATTRIBUTE); diff --git a/src/main/java/org/htmlunit/html/HtmlListing.java b/src/main/java/org/htmlunit/html/HtmlListing.java index 309d376ac2a..e8f6e4b093f 100644 --- a/src/main/java/org/htmlunit/html/HtmlListing.java +++ b/src/main/java/org/htmlunit/html/HtmlListing.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlMain.java b/src/main/java/org/htmlunit/html/HtmlMain.java index de756f3ddca..3e9c53cf715 100644 --- a/src/main/java/org/htmlunit/html/HtmlMain.java +++ b/src/main/java/org/htmlunit/html/HtmlMain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlMap.java b/src/main/java/org/htmlunit/html/HtmlMap.java index 2ea525afe4f..bb248b3b4ef 100644 --- a/src/main/java/org/htmlunit/html/HtmlMap.java +++ b/src/main/java/org/htmlunit/html/HtmlMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,7 +52,7 @@ public class HtmlMap extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code name} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getNameAttribute() { return getAttributeDirect(NAME_ATTRIBUTE); diff --git a/src/main/java/org/htmlunit/html/HtmlMark.java b/src/main/java/org/htmlunit/html/HtmlMark.java index 4d76d35840b..6a4d86c25e9 100644 --- a/src/main/java/org/htmlunit/html/HtmlMark.java +++ b/src/main/java/org/htmlunit/html/HtmlMark.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlMarquee.java b/src/main/java/org/htmlunit/html/HtmlMarquee.java index 0ec18376bed..8a4204f0043 100644 --- a/src/main/java/org/htmlunit/html/HtmlMarquee.java +++ b/src/main/java/org/htmlunit/html/HtmlMarquee.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlMedia.java b/src/main/java/org/htmlunit/html/HtmlMedia.java index 030e83ece17..3adf013ca07 100644 --- a/src/main/java/org/htmlunit/html/HtmlMedia.java +++ b/src/main/java/org/htmlunit/html/HtmlMedia.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlMenu.java b/src/main/java/org/htmlunit/html/HtmlMenu.java index 1775ddfb677..4a920511bb6 100644 --- a/src/main/java/org/htmlunit/html/HtmlMenu.java +++ b/src/main/java/org/htmlunit/html/HtmlMenu.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class HtmlMenu extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code compact} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCompactAttribute() { return getAttributeDirect("compact"); diff --git a/src/main/java/org/htmlunit/html/HtmlMeta.java b/src/main/java/org/htmlunit/html/HtmlMeta.java index b03c7401dfb..cb73a6ce15b 100644 --- a/src/main/java/org/htmlunit/html/HtmlMeta.java +++ b/src/main/java/org/htmlunit/html/HtmlMeta.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ public boolean mayBeDisplayed() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code http-equiv} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getHttpEquivAttribute() { return getAttribute("http-equiv"); @@ -80,7 +80,7 @@ public final String getHttpEquivAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code name} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getNameAttribute() { return getAttributeDirect(NAME_ATTRIBUTE); @@ -92,7 +92,7 @@ public final String getNameAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code content} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getContentAttribute() { return getAttributeDirect("content"); @@ -104,7 +104,7 @@ public final String getContentAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code scheme} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getSchemeAttribute() { return getAttributeDirect("scheme"); diff --git a/src/main/java/org/htmlunit/html/HtmlMeter.java b/src/main/java/org/htmlunit/html/HtmlMeter.java index 6cbd436cd2c..7976e61b480 100644 --- a/src/main/java/org/htmlunit/html/HtmlMeter.java +++ b/src/main/java/org/htmlunit/html/HtmlMeter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlMonthInput.java b/src/main/java/org/htmlunit/html/HtmlMonthInput.java index 5959a2c914e..ba5c9c11809 100644 --- a/src/main/java/org/htmlunit/html/HtmlMonthInput.java +++ b/src/main/java/org/htmlunit/html/HtmlMonthInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlNav.java b/src/main/java/org/htmlunit/html/HtmlNav.java index fb9800bc90f..063ec78ab88 100644 --- a/src/main/java/org/htmlunit/html/HtmlNav.java +++ b/src/main/java/org/htmlunit/html/HtmlNav.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlNoBreak.java b/src/main/java/org/htmlunit/html/HtmlNoBreak.java index cef7209e71c..041de331a48 100644 --- a/src/main/java/org/htmlunit/html/HtmlNoBreak.java +++ b/src/main/java/org/htmlunit/html/HtmlNoBreak.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlNoEmbed.java b/src/main/java/org/htmlunit/html/HtmlNoEmbed.java index 829e30a4b22..180ae26c769 100644 --- a/src/main/java/org/htmlunit/html/HtmlNoEmbed.java +++ b/src/main/java/org/htmlunit/html/HtmlNoEmbed.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlNoFrames.java b/src/main/java/org/htmlunit/html/HtmlNoFrames.java index 29107d7d51e..928fe6b59f2 100644 --- a/src/main/java/org/htmlunit/html/HtmlNoFrames.java +++ b/src/main/java/org/htmlunit/html/HtmlNoFrames.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlNoLayer.java b/src/main/java/org/htmlunit/html/HtmlNoLayer.java index 6fde254a22c..a59c4223b2f 100644 --- a/src/main/java/org/htmlunit/html/HtmlNoLayer.java +++ b/src/main/java/org/htmlunit/html/HtmlNoLayer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlNoScript.java b/src/main/java/org/htmlunit/html/HtmlNoScript.java index 84e44880254..87cc03590e7 100644 --- a/src/main/java/org/htmlunit/html/HtmlNoScript.java +++ b/src/main/java/org/htmlunit/html/HtmlNoScript.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlNumberInput.java b/src/main/java/org/htmlunit/html/HtmlNumberInput.java index 40a65c08724..4292478ac0d 100644 --- a/src/main/java/org/htmlunit/html/HtmlNumberInput.java +++ b/src/main/java/org/htmlunit/html/HtmlNumberInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlObject.java b/src/main/java/org/htmlunit/html/HtmlObject.java index db6654b4786..e1464ff9003 100644 --- a/src/main/java/org/htmlunit/html/HtmlObject.java +++ b/src/main/java/org/htmlunit/html/HtmlObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,8 +14,6 @@ */ package org.htmlunit.html; -import static org.htmlunit.BrowserVersionFeatures.JS_HTML_OBJECT_VALIDITYSTATE_ISVALID_IGNORES_CUSTOM_ERROR; - import java.util.Map; import org.apache.commons.lang3.StringUtils; @@ -62,7 +60,7 @@ public class HtmlObject extends HtmlElement implements ValidatableElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code declare} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getDeclareAttribute() { return getAttributeDirect("declare"); @@ -74,7 +72,7 @@ public final String getDeclareAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code classid} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getClassIdAttribute() { return getAttributeDirect("classid"); @@ -86,7 +84,7 @@ public final String getClassIdAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute "codebase" - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCodebaseAttribute() { return getAttributeDirect("codebase"); @@ -98,7 +96,7 @@ public final String getCodebaseAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code data} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getDataAttribute() { return getAttributeDirect("data"); @@ -110,7 +108,7 @@ public final String getDataAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code type} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getTypeAttribute() { return getAttributeDirect(TYPE_ATTRIBUTE); @@ -122,7 +120,7 @@ public final String getTypeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute "codetype" - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCodeTypeAttribute() { return getAttributeDirect("codetype"); @@ -134,7 +132,7 @@ public final String getCodeTypeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code archive} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getArchiveAttribute() { return getAttributeDirect("archive"); @@ -146,7 +144,7 @@ public final String getArchiveAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code standby} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getStandbyAttribute() { return getAttributeDirect("standby"); @@ -158,7 +156,7 @@ public final String getStandbyAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code height} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getHeightAttribute() { return getAttributeDirect("height"); @@ -170,7 +168,7 @@ public final String getHeightAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code width} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getWidthAttribute() { return getAttributeDirect("width"); @@ -182,7 +180,7 @@ public final String getWidthAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code usemap} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getUseMapAttribute() { return getAttributeDirect("usemap"); @@ -194,7 +192,7 @@ public final String getUseMapAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code name} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getNameAttribute() { return getAttributeDirect(NAME_ATTRIBUTE); @@ -206,7 +204,7 @@ public final String getNameAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code tabindex} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getTabIndexAttribute() { return getAttributeDirect("tabindex"); @@ -218,7 +216,7 @@ public final String getTabIndexAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code align} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAlignAttribute() { return getAttributeDirect("align"); @@ -230,7 +228,7 @@ public final String getAlignAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code border} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getBorderAttribute() { return getAttributeDirect("border"); @@ -242,7 +240,7 @@ public final String getBorderAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code hspace} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getHspaceAttribute() { return getAttributeDirect("hspace"); @@ -254,7 +252,7 @@ public final String getHspaceAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code vspace} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getVspaceAttribute() { return getAttributeDirect("vspace"); @@ -314,10 +312,6 @@ public void setCustomValidity(final String message) { @Override public boolean isCustomErrorValidityState() { - if (hasFeature(JS_HTML_OBJECT_VALIDITYSTATE_ISVALID_IGNORES_CUSTOM_ERROR)) { - return false; - } - return !StringUtils.isEmpty(customValidity_); } diff --git a/src/main/java/org/htmlunit/html/HtmlOption.java b/src/main/java/org/htmlunit/html/HtmlOption.java index ac406c0838f..c0dda178ab6 100644 --- a/src/main/java/org/htmlunit/html/HtmlOption.java +++ b/src/main/java/org/htmlunit/html/HtmlOption.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -151,7 +151,7 @@ public void reset() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code selected} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getSelectedAttribute() { return getAttributeDirect("selected"); @@ -224,7 +224,7 @@ public final void setLabelAttribute(final String newLabel) { * HTML 4.01 * documentation for details on the use of this attribute. * @see - * initial value if value attribute is not set + * initial value if value attribute is not set * @return the value of the attribute {@code value} */ public final String getValueAttribute() { diff --git a/src/main/java/org/htmlunit/html/HtmlOptionGroup.java b/src/main/java/org/htmlunit/html/HtmlOptionGroup.java index 8a7a9e841f4..a37dd3ba01c 100644 --- a/src/main/java/org/htmlunit/html/HtmlOptionGroup.java +++ b/src/main/java/org/htmlunit/html/HtmlOptionGroup.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlOrderedList.java b/src/main/java/org/htmlunit/html/HtmlOrderedList.java index 13525fc357f..25e20d1c087 100644 --- a/src/main/java/org/htmlunit/html/HtmlOrderedList.java +++ b/src/main/java/org/htmlunit/html/HtmlOrderedList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class HtmlOrderedList extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code type} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getTypeAttribute() { return getAttributeDirect(TYPE_ATTRIBUTE); @@ -62,7 +62,7 @@ public final String getTypeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code compact} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCompactAttribute() { return getAttributeDirect("compact"); @@ -74,7 +74,7 @@ public final String getCompactAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code start} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getStartAttribute() { return getAttributeDirect("start"); diff --git a/src/main/java/org/htmlunit/html/HtmlOutput.java b/src/main/java/org/htmlunit/html/HtmlOutput.java index 5b9e37e4f09..b2d12b10e70 100644 --- a/src/main/java/org/htmlunit/html/HtmlOutput.java +++ b/src/main/java/org/htmlunit/html/HtmlOutput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlPage.java b/src/main/java/org/htmlunit/html/HtmlPage.java index 0fad9a9cf1e..a3a8547a386 100644 --- a/src/main/java/org/htmlunit/html/HtmlPage.java +++ b/src/main/java/org/htmlunit/html/HtmlPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ package org.htmlunit.html; import static org.htmlunit.BrowserVersionFeatures.EVENT_FOCUS_ON_LOAD; -import static org.htmlunit.BrowserVersionFeatures.JS_EVENT_LOAD_SUPPRESSED_BY_CONTENT_SECURIRY_POLICY; import static org.htmlunit.html.DomElement.ATTRIBUTE_NOT_DEFINED; import java.io.File; @@ -67,7 +66,6 @@ import org.htmlunit.corejs.javascript.Scriptable; import org.htmlunit.css.ComputedCssStyleDeclaration; import org.htmlunit.css.CssStyleSheet; -import org.htmlunit.html.FrameWindow.PageDenied; import org.htmlunit.html.impl.SimpleRange; import org.htmlunit.html.parser.HTMLParserDOMBuilder; import org.htmlunit.http.HttpStatus; @@ -141,6 +139,7 @@ * @author Lai Quang Duong * @author Sven Strickroth */ +@SuppressWarnings("PMD.TooManyFields") public class HtmlPage extends SgmlPage { private static final Log LOG = LogFactory.getLog(HtmlPage.class); @@ -232,8 +231,8 @@ public boolean hasCaseSensitiveTagNames() { * Initialize this page. * @throws IOException if an IO problem occurs * @throws FailingHttpStatusCodeException if the server returns a failing status code AND the property - * {@link org.htmlunit.WebClientOptions#setThrowExceptionOnFailingStatusCode(boolean)} is set - * to true. + * {@link org.htmlunit.WebClientOptions#setThrowExceptionOnFailingStatusCode(boolean)} is set + * to true. */ @Override public void initialize() throws IOException, FailingHttpStatusCodeException { @@ -295,7 +294,7 @@ public void initialize() throws IOException, FailingHttpStatusCodeException { executeEventHandlersIfNeeded(Event.TYPE_LOAD); } - for (final BaseFrameElement frameElement : frameElements_) { + for (final BaseFrameElement frameElement : new ArrayList<>(frameElements_)) { if (frameElement instanceof HtmlFrame) { final Page page = frameElement.getEnclosedWindow().getEnclosedPage(); if (page != null && page.isHtmlPage()) { @@ -785,8 +784,8 @@ public List getTabbableElementIds() { * Additionally, the value of tabindex must be within 0 and 32767. Any * values outside this range will be ignored.

* - * The following elements support the tabindex attribute: A, AREA, BUTTON, - * INPUT, OBJECT, SELECT, and TEXTAREA.

+ * The following elements support the tabindex attribute: + * A, AREA, BUTTON, INPUT, OBJECT, SELECT, and TEXTAREA. * * @return all the tabbable elements in proper tab order */ @@ -908,7 +907,7 @@ public List getHtmlElementsByAccessKey(final char accessKey) { * (see {@link org.htmlunit.WebClient#isJavaScriptEnabled()}.

* @param sourceCode the JavaScript code to execute * @return a ScriptResult which will contain both the current page (which may be different than - * the previous page) and a JavaScript result object + * the previous page) and a JavaScript result object */ public ScriptResult executeJavaScript(final String sourceCode) { return executeJavaScript(sourceCode, "injected script", 1); @@ -925,14 +924,14 @@ public ScriptResult executeJavaScript(final String sourceCode) { *

Please note: Although this method is public, it is not intended for * general execution of JavaScript. Users of HtmlUnit should interact with the pages * as a user would by clicking on buttons or links and having the JavaScript event - * handlers execute as needed.. + * handlers execute as needed. *

* * @param sourceCode the JavaScript code to execute * @param sourceName the name for this chunk of code (will be displayed in error messages) * @param startLine the line at which the script source starts * @return a ScriptResult which will contain both the current page (which may be different than - * the previous page and a JavaScript result object. + * the previous page and a JavaScript result object. */ public ScriptResult executeJavaScript(String sourceCode, final String sourceName, final int startLine) { if (!getWebClient().isJavaScriptEnabled()) { @@ -1288,12 +1287,6 @@ else if (Event.TYPE_READY_STATE_CHANGE.equals(eventType)) { event = new BeforeUnloadEvent(frame, eventType); } else { - // ff does not trigger the onload event in this case - if (PageDenied.BY_CONTENT_SECURIRY_POLICY == fw.getPageDenied() - && hasFeature(JS_EVENT_LOAD_SUPPRESSED_BY_CONTENT_SECURIRY_POLICY)) { - return true; - } - event = new Event(frame, eventType); } // This fires the "load" event for the element which, like all non-window @@ -1531,7 +1524,7 @@ public FrameWindow getFrameByName(final String name) throws ElementNotFoundExcep * * @param accessKey the key that will be pressed * @return the element that has the focus after pressing this access key or null if no element - * has the focus. + * has the focus. * @throws IOException if an IO error occurs during the processing of this access key (this * would only happen if the access key triggered a button which in turn caused a page load) */ @@ -1896,7 +1889,7 @@ private void calculateBase() { * {@link WebClientOptions#setThrowExceptionOnFailingStatusCode(boolean)} is set to {@code true} */ void loadFrames() throws FailingHttpStatusCodeException { - for (final BaseFrameElement frameElement : frameElements_) { + for (final BaseFrameElement frameElement : new ArrayList<>(frameElements_)) { // test if the frame should really be loaded: // if a script has already changed its content, it should be skipped // use == and not equals(...) to identify initial content (versus URL set to "about:blank") @@ -2649,7 +2642,7 @@ public void putStyleIntoCache(final DomElement element, final String normalizedP * INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
* * @return a list of all styles from this page (<style> and <link rel=stylesheet>). - * This returns an empty list if css support is disabled in the web client options. + * This returns an empty list if css support is disabled in the web client options. */ public List getStyleSheets() { final List styles = new ArrayList<>(); @@ -2783,7 +2776,8 @@ private void nodeChanged(final DomNode changedNode, final String attribName) { } // Apparently it wasn't a stylesheet that changed; be semi-smart about what we evict and when. - final boolean clearParents = ATTRIBUTES_AFFECTING_PARENT.contains(attribName); + // null means that a node was added/removed; we always have to take care of this for the parents + final boolean clearParents = attribName == null || ATTRIBUTES_AFFECTING_PARENT.contains(attribName); if (computedStylesCache_ != null) { computedStylesCache_.nodeChanged(changedNode, clearParents); } @@ -2881,7 +2875,7 @@ private void readObject(final ObjectInputStream in) throws IOException, ClassNot } private static final class MappedElementIndexEntry implements Serializable { - private ArrayList elements_; + private final ArrayList elements_; private boolean sorted_; MappedElementIndexEntry() { diff --git a/src/main/java/org/htmlunit/html/HtmlParagraph.java b/src/main/java/org/htmlunit/html/HtmlParagraph.java index f013ec46e68..c8e4cd21f4b 100644 --- a/src/main/java/org/htmlunit/html/HtmlParagraph.java +++ b/src/main/java/org/htmlunit/html/HtmlParagraph.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ public class HtmlParagraph extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code align} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAlignAttribute() { return getAttributeDirect("align"); diff --git a/src/main/java/org/htmlunit/html/HtmlParameter.java b/src/main/java/org/htmlunit/html/HtmlParameter.java index ba4a07cd453..c44aedaa1c3 100644 --- a/src/main/java/org/htmlunit/html/HtmlParameter.java +++ b/src/main/java/org/htmlunit/html/HtmlParameter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class HtmlParameter extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code id} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getIdAttribute() { return getAttributeDirect(ID_ATTRIBUTE); @@ -62,7 +62,7 @@ public final String getIdAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code name} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getNameAttribute() { return getAttributeDirect(NAME_ATTRIBUTE); @@ -74,7 +74,7 @@ public final String getNameAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code value} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getValueAttribute() { return getAttributeDirect(VALUE_ATTRIBUTE); @@ -86,7 +86,7 @@ public final String getValueAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code valuetype} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getValueTypeAttribute() { return getAttributeDirect("valuetype"); @@ -98,7 +98,7 @@ public final String getValueTypeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code type} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getTypeAttribute() { return getAttributeDirect(TYPE_ATTRIBUTE); diff --git a/src/main/java/org/htmlunit/html/HtmlPasswordInput.java b/src/main/java/org/htmlunit/html/HtmlPasswordInput.java index d395d8ed4db..4e07ac633b3 100644 --- a/src/main/java/org/htmlunit/html/HtmlPasswordInput.java +++ b/src/main/java/org/htmlunit/html/HtmlPasswordInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlPicture.java b/src/main/java/org/htmlunit/html/HtmlPicture.java index 8858222c183..46b0b81ad48 100644 --- a/src/main/java/org/htmlunit/html/HtmlPicture.java +++ b/src/main/java/org/htmlunit/html/HtmlPicture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlPlainText.java b/src/main/java/org/htmlunit/html/HtmlPlainText.java index 52b7d84c5e8..00e53fe4b2d 100644 --- a/src/main/java/org/htmlunit/html/HtmlPlainText.java +++ b/src/main/java/org/htmlunit/html/HtmlPlainText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlPreformattedText.java b/src/main/java/org/htmlunit/html/HtmlPreformattedText.java index 04727e5b3d0..265711cdbc2 100644 --- a/src/main/java/org/htmlunit/html/HtmlPreformattedText.java +++ b/src/main/java/org/htmlunit/html/HtmlPreformattedText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class HtmlPreformattedText extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code width} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getWidthAttribute() { return getAttributeDirect("width"); diff --git a/src/main/java/org/htmlunit/html/HtmlProgress.java b/src/main/java/org/htmlunit/html/HtmlProgress.java index b88c8d7e0b3..3a8f288954a 100644 --- a/src/main/java/org/htmlunit/html/HtmlProgress.java +++ b/src/main/java/org/htmlunit/html/HtmlProgress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlRadioButtonInput.java b/src/main/java/org/htmlunit/html/HtmlRadioButtonInput.java index 675f6d520af..d0eeb72b17d 100644 --- a/src/main/java/org/htmlunit/html/HtmlRadioButtonInput.java +++ b/src/main/java/org/htmlunit/html/HtmlRadioButtonInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -96,7 +96,7 @@ void setCheckedInternal(final boolean isChecked) { * * @param isChecked true if this element is to be selected * @return the page that occupies this window after setting checked status - * It may be the same window or it may be a freshly loaded one. + * It may be the same window or it may be a freshly loaded one. */ @Override public Page setChecked(final boolean isChecked) { diff --git a/src/main/java/org/htmlunit/html/HtmlRangeInput.java b/src/main/java/org/htmlunit/html/HtmlRangeInput.java index cf3ef870c39..015a41e9072 100644 --- a/src/main/java/org/htmlunit/html/HtmlRangeInput.java +++ b/src/main/java/org/htmlunit/html/HtmlRangeInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlRb.java b/src/main/java/org/htmlunit/html/HtmlRb.java index 0af0e72da41..beef3a1dc2d 100644 --- a/src/main/java/org/htmlunit/html/HtmlRb.java +++ b/src/main/java/org/htmlunit/html/HtmlRb.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlResetInput.java b/src/main/java/org/htmlunit/html/HtmlResetInput.java index 62efd60400f..d7623a39f0c 100644 --- a/src/main/java/org/htmlunit/html/HtmlResetInput.java +++ b/src/main/java/org/htmlunit/html/HtmlResetInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlRp.java b/src/main/java/org/htmlunit/html/HtmlRp.java index 84999fa3d67..1cca0de3803 100644 --- a/src/main/java/org/htmlunit/html/HtmlRp.java +++ b/src/main/java/org/htmlunit/html/HtmlRp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlRt.java b/src/main/java/org/htmlunit/html/HtmlRt.java index 0cca5bb1849..e0166bc3f97 100644 --- a/src/main/java/org/htmlunit/html/HtmlRt.java +++ b/src/main/java/org/htmlunit/html/HtmlRt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlRtc.java b/src/main/java/org/htmlunit/html/HtmlRtc.java index d6ea798cad7..d2db0cb48b7 100644 --- a/src/main/java/org/htmlunit/html/HtmlRtc.java +++ b/src/main/java/org/htmlunit/html/HtmlRtc.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlRuby.java b/src/main/java/org/htmlunit/html/HtmlRuby.java index fde8ec95a39..a04cf48ce6a 100644 --- a/src/main/java/org/htmlunit/html/HtmlRuby.java +++ b/src/main/java/org/htmlunit/html/HtmlRuby.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlS.java b/src/main/java/org/htmlunit/html/HtmlS.java index e10704f066f..cfab3e2963b 100644 --- a/src/main/java/org/htmlunit/html/HtmlS.java +++ b/src/main/java/org/htmlunit/html/HtmlS.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSample.java b/src/main/java/org/htmlunit/html/HtmlSample.java index c25bd0dc5e1..34b5df1747f 100644 --- a/src/main/java/org/htmlunit/html/HtmlSample.java +++ b/src/main/java/org/htmlunit/html/HtmlSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlScript.java b/src/main/java/org/htmlunit/html/HtmlScript.java index a96070ad3c8..4a5fdc5c32d 100644 --- a/src/main/java/org/htmlunit/html/HtmlScript.java +++ b/src/main/java/org/htmlunit/html/HtmlScript.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,7 +72,7 @@ public class HtmlScript extends HtmlElement implements ScriptElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code charset} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharsetAttribute() { return getAttributeDirect("charset"); @@ -92,7 +92,7 @@ public final String getScriptCharset() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code type} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getTypeAttribute() { return getAttributeDirect(TYPE_ATTRIBUTE); @@ -104,7 +104,7 @@ public final String getTypeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code language} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getLanguageAttribute() { return getAttributeDirect("language"); @@ -116,7 +116,7 @@ public final String getLanguageAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code src} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getSrcAttribute() { return getSrcAttributeNormalized(); @@ -152,7 +152,7 @@ public final String getHtmlForAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code defer} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getDeferAttribute() { return getAttributeDirect("defer"); diff --git a/src/main/java/org/htmlunit/html/HtmlSearchInput.java b/src/main/java/org/htmlunit/html/HtmlSearchInput.java index fedb500378b..0d5d2bdc02a 100644 --- a/src/main/java/org/htmlunit/html/HtmlSearchInput.java +++ b/src/main/java/org/htmlunit/html/HtmlSearchInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSection.java b/src/main/java/org/htmlunit/html/HtmlSection.java index 209bade2631..5f8b011b382 100644 --- a/src/main/java/org/htmlunit/html/HtmlSection.java +++ b/src/main/java/org/htmlunit/html/HtmlSection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSelect.java b/src/main/java/org/htmlunit/html/HtmlSelect.java index 43106915cb4..5c3b99a774c 100644 --- a/src/main/java/org/htmlunit/html/HtmlSelect.java +++ b/src/main/java/org/htmlunit/html/HtmlSelect.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -201,7 +201,8 @@ public void setOptionSize(final int newLength) { */ public void removeOption(final int index) { final ChildElementsIterator iterator = new ChildElementsIterator(this); - for (int i = 0; iterator.hasNext();) { + int i = 0; + while (iterator.hasNext()) { final DomElement element = iterator.next(); if (element instanceof HtmlOption) { if (i == index) { @@ -221,7 +222,8 @@ public void removeOption(final int index) { */ public void replaceOption(final int index, final HtmlOption newOption) { final ChildElementsIterator iterator = new ChildElementsIterator(this); - for (int i = 0; iterator.hasNext();) { + int i = 0; + while (iterator.hasNext()) { final DomElement element = iterator.next(); if (element instanceof HtmlOption) { if (i == index) { @@ -273,7 +275,7 @@ public DomNode appendChild(final Node node) { * @param optionValue the value of the option that is to change * @param

the page type * @return the page contained in the current window as returned - * by {@link org.htmlunit.WebClient#getCurrentWindow()} + * by {@link org.htmlunit.WebClient#getCurrentWindow()} */ public

P setSelectedAttribute(final String optionValue, final boolean isSelected) { return setSelectedAttribute(optionValue, isSelected, true); @@ -292,7 +294,7 @@ public

P setSelectedAttribute(final String optionValue, final b * @param invokeOnFocus whether to set focus or not. * @param

the page type * @return the page contained in the current window as returned - * by {@link org.htmlunit.WebClient#getCurrentWindow()} + * by {@link org.htmlunit.WebClient#getCurrentWindow()} */ @SuppressWarnings("unchecked") public

P setSelectedAttribute(final String optionValue, @@ -319,7 +321,7 @@ public

P setSelectedAttribute(final String optionValue, * @param selectedOption the value of the option that is to change * @param

the page type * @return the page contained in the current window as returned - * by {@link org.htmlunit.WebClient#getCurrentWindow()} + * by {@link org.htmlunit.WebClient#getCurrentWindow()} */ public

P setSelectedAttribute(final HtmlOption selectedOption, final boolean isSelected) { return setSelectedAttribute(selectedOption, isSelected, true, true, false, true); @@ -341,7 +343,7 @@ public

P setSelectedAttribute(final HtmlOption selectedOption, * @param isClick is mouse clicked * @param

the page type * @return the page contained in the current window as returned - * by {@link org.htmlunit.WebClient#getCurrentWindow()} + * by {@link org.htmlunit.WebClient#getCurrentWindow()} */ @SuppressWarnings("unchecked") public

P setSelectedAttribute(final HtmlOption selectedOption, final boolean isSelected, diff --git a/src/main/java/org/htmlunit/html/HtmlSelectableTextInput.java b/src/main/java/org/htmlunit/html/HtmlSelectableTextInput.java index f6aeb79ac85..411df97eef4 100644 --- a/src/main/java/org/htmlunit/html/HtmlSelectableTextInput.java +++ b/src/main/java/org/htmlunit/html/HtmlSelectableTextInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSlot.java b/src/main/java/org/htmlunit/html/HtmlSlot.java index f2e59524748..0ebc751d2fe 100644 --- a/src/main/java/org/htmlunit/html/HtmlSlot.java +++ b/src/main/java/org/htmlunit/html/HtmlSlot.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSmall.java b/src/main/java/org/htmlunit/html/HtmlSmall.java index d7b8bb502e3..a8e2f616292 100644 --- a/src/main/java/org/htmlunit/html/HtmlSmall.java +++ b/src/main/java/org/htmlunit/html/HtmlSmall.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSource.java b/src/main/java/org/htmlunit/html/HtmlSource.java index 00ca3280eee..e554dc406f6 100644 --- a/src/main/java/org/htmlunit/html/HtmlSource.java +++ b/src/main/java/org/htmlunit/html/HtmlSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSpan.java b/src/main/java/org/htmlunit/html/HtmlSpan.java index f31e6496839..abf2243c018 100644 --- a/src/main/java/org/htmlunit/html/HtmlSpan.java +++ b/src/main/java/org/htmlunit/html/HtmlSpan.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlStrike.java b/src/main/java/org/htmlunit/html/HtmlStrike.java index 3c71ce763d0..6e1156424a2 100644 --- a/src/main/java/org/htmlunit/html/HtmlStrike.java +++ b/src/main/java/org/htmlunit/html/HtmlStrike.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlStrong.java b/src/main/java/org/htmlunit/html/HtmlStrong.java index a4de4d07819..7266e15bb6d 100644 --- a/src/main/java/org/htmlunit/html/HtmlStrong.java +++ b/src/main/java/org/htmlunit/html/HtmlStrong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlStyle.java b/src/main/java/org/htmlunit/html/HtmlStyle.java index 3bd74f6bf04..d450ea6babc 100644 --- a/src/main/java/org/htmlunit/html/HtmlStyle.java +++ b/src/main/java/org/htmlunit/html/HtmlStyle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSubmitInput.java b/src/main/java/org/htmlunit/html/HtmlSubmitInput.java index 052fd7f0786..3c1067d3788 100644 --- a/src/main/java/org/htmlunit/html/HtmlSubmitInput.java +++ b/src/main/java/org/htmlunit/html/HtmlSubmitInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSubscript.java b/src/main/java/org/htmlunit/html/HtmlSubscript.java index d88c3f4eee9..bbaf6601bc5 100644 --- a/src/main/java/org/htmlunit/html/HtmlSubscript.java +++ b/src/main/java/org/htmlunit/html/HtmlSubscript.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSummary.java b/src/main/java/org/htmlunit/html/HtmlSummary.java index 82209589bf3..3bcda51ecf1 100644 --- a/src/main/java/org/htmlunit/html/HtmlSummary.java +++ b/src/main/java/org/htmlunit/html/HtmlSummary.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSuperscript.java b/src/main/java/org/htmlunit/html/HtmlSuperscript.java index da860d55d68..99887803649 100644 --- a/src/main/java/org/htmlunit/html/HtmlSuperscript.java +++ b/src/main/java/org/htmlunit/html/HtmlSuperscript.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlSvg.java b/src/main/java/org/htmlunit/html/HtmlSvg.java index 75fa768d2d8..2d2708dff95 100644 --- a/src/main/java/org/htmlunit/html/HtmlSvg.java +++ b/src/main/java/org/htmlunit/html/HtmlSvg.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlTable.java b/src/main/java/org/htmlunit/html/HtmlTable.java index fef6feba237..9d62e33c804 100644 --- a/src/main/java/org/htmlunit/html/HtmlTable.java +++ b/src/main/java/org/htmlunit/html/HtmlTable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,9 +91,11 @@ public final HtmlTableCell getCellAt(final int rowIndex, final int columnIndex) return cell; } } - if (cell.getRowSpan() > 1 || cell.getColumnSpan() > 1) { - for (int i = 0; i < cell.getRowSpan(); i++) { - for (int j = 0; j < cell.getColumnSpan(); j++) { + final int rowSpan = cell.getRowSpan(); + final int columnSpan = cell.getColumnSpan(); + if (rowSpan > 1 || columnSpan > 1) { + for (int i = 0; i < rowSpan; i++) { + for (int j = 0; j < columnSpan; j++) { occupied.add(new Position(row + i, col + j)); } } @@ -235,7 +237,7 @@ public List getBodies() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code summary} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getSummaryAttribute() { return getAttributeDirect("summary"); @@ -247,7 +249,7 @@ public final String getSummaryAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code width} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getWidthAttribute() { return getAttributeDirect("width"); @@ -259,7 +261,7 @@ public final String getWidthAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code border} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getBorderAttribute() { return getAttributeDirect("border"); @@ -271,7 +273,7 @@ public final String getBorderAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code frame} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getFrameAttribute() { return getAttributeDirect("frame"); @@ -283,7 +285,7 @@ public final String getFrameAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code rules} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getRulesAttribute() { return getAttributeDirect("rules"); @@ -295,7 +297,7 @@ public final String getRulesAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code cellspacing} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCellSpacingAttribute() { return getAttributeDirect("cellspacing"); @@ -307,7 +309,7 @@ public final String getCellSpacingAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code cellpadding} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCellPaddingAttribute() { return getAttributeDirect("cellpadding"); @@ -319,7 +321,7 @@ public final String getCellPaddingAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code align} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAlignAttribute() { return getAttributeDirect("align"); @@ -331,7 +333,7 @@ public final String getAlignAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code bgcolor} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getBgcolorAttribute() { return getAttributeDirect("bgcolor"); diff --git a/src/main/java/org/htmlunit/html/HtmlTableBody.java b/src/main/java/org/htmlunit/html/HtmlTableBody.java index c7487ed2010..6febca3b576 100644 --- a/src/main/java/org/htmlunit/html/HtmlTableBody.java +++ b/src/main/java/org/htmlunit/html/HtmlTableBody.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlTableCell.java b/src/main/java/org/htmlunit/html/HtmlTableCell.java index 9dfc11abd39..591a495729e 100644 --- a/src/main/java/org/htmlunit/html/HtmlTableCell.java +++ b/src/main/java/org/htmlunit/html/HtmlTableCell.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,8 +14,6 @@ */ package org.htmlunit.html; -import static org.htmlunit.BrowserVersionFeatures.JS_TABLE_SPAN_SET_ZERO_IF_INVALID; - import java.util.Map; import org.apache.commons.lang3.StringUtils; @@ -80,18 +78,11 @@ public int getRowSpan() { } try { final int span = (int) Double.parseDouble(spanString); - if (getPage().getWebClient().getBrowserVersion().hasFeature(JS_TABLE_SPAN_SET_ZERO_IF_INVALID)) { - if (span < 0) { - return 1; - } - if (span < 1) { - return 0; - } + if (span < 0) { + return 1; } - else { - if (span < 1) { - return 1; - } + if (span < 1) { + return 0; } if (span > 65_534) { diff --git a/src/main/java/org/htmlunit/html/HtmlTableColumn.java b/src/main/java/org/htmlunit/html/HtmlTableColumn.java index 2aa6d78f733..41b63761952 100644 --- a/src/main/java/org/htmlunit/html/HtmlTableColumn.java +++ b/src/main/java/org/htmlunit/html/HtmlTableColumn.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ public class HtmlTableColumn extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code span} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getSpanAttribute() { return getAttributeDirect("span"); @@ -63,7 +63,7 @@ public final String getSpanAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code width} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getWidthAttribute() { return getAttributeDirect("width"); @@ -75,7 +75,7 @@ public final String getWidthAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code align} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAlignAttribute() { return getAttributeDirect("align"); @@ -87,7 +87,7 @@ public final String getAlignAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code char} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharAttribute() { return getAttributeDirect("char"); @@ -99,7 +99,7 @@ public final String getCharAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code charoff} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharoffAttribute() { return getAttributeDirect("charoff"); @@ -111,7 +111,7 @@ public final String getCharoffAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code valign} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getValignAttribute() { return getAttributeDirect("valign"); diff --git a/src/main/java/org/htmlunit/html/HtmlTableColumnGroup.java b/src/main/java/org/htmlunit/html/HtmlTableColumnGroup.java index 32f221f9800..ac92ea5e2f6 100644 --- a/src/main/java/org/htmlunit/html/HtmlTableColumnGroup.java +++ b/src/main/java/org/htmlunit/html/HtmlTableColumnGroup.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ public class HtmlTableColumnGroup extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code span} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getSpanAttribute() { return getAttributeDirect("span"); @@ -63,7 +63,7 @@ public final String getSpanAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code width} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getWidthAttribute() { return getAttributeDirect("width"); @@ -75,7 +75,7 @@ public final String getWidthAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code align} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAlignAttribute() { return getAttributeDirect("align"); @@ -87,7 +87,7 @@ public final String getAlignAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code char} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharAttribute() { return getAttributeDirect("char"); @@ -99,7 +99,7 @@ public final String getCharAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code charoff} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharoffAttribute() { return getAttributeDirect("charoff"); @@ -111,7 +111,7 @@ public final String getCharoffAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code valign} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getValignAttribute() { return getAttributeDirect("valign"); diff --git a/src/main/java/org/htmlunit/html/HtmlTableDataCell.java b/src/main/java/org/htmlunit/html/HtmlTableDataCell.java index e3eeb446c3f..65693e08c7f 100644 --- a/src/main/java/org/htmlunit/html/HtmlTableDataCell.java +++ b/src/main/java/org/htmlunit/html/HtmlTableDataCell.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class HtmlTableDataCell extends HtmlTableCell { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code abbr} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAbbrAttribute() { return getAttributeDirect("abbr"); @@ -62,7 +62,7 @@ public final String getAbbrAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code axis} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAxisAttribute() { return getAttributeDirect("axis"); @@ -74,7 +74,7 @@ public final String getAxisAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code headers} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getHeadersAttribute() { return getAttributeDirect("headers"); @@ -86,7 +86,7 @@ public final String getHeadersAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code scope} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getScopeAttribute() { return getAttributeDirect("scope"); @@ -98,7 +98,7 @@ public final String getScopeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code rowspan} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getRowSpanAttribute() { return getAttributeDirect("rowspan"); @@ -110,7 +110,7 @@ public final String getRowSpanAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code colspan} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getColumnSpanAttribute() { return getAttributeDirect("colspan"); @@ -122,7 +122,7 @@ public final String getColumnSpanAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code align} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAlignAttribute() { return getAttributeDirect("align"); @@ -134,7 +134,7 @@ public final String getAlignAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code char} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharAttribute() { return getAttributeDirect("char"); @@ -146,7 +146,7 @@ public final String getCharAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code charoff} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharoffAttribute() { return getAttributeDirect("charoff"); @@ -158,7 +158,7 @@ public final String getCharoffAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code valign} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getValignAttribute() { return getAttributeDirect("valign"); @@ -170,7 +170,7 @@ public final String getValignAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code nowrap} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getNoWrapAttribute() { return getAttributeDirect("nowrap"); @@ -182,7 +182,7 @@ public final String getNoWrapAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code bgcolor} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getBgcolorAttribute() { return getAttributeDirect("bgcolor"); @@ -194,7 +194,7 @@ public final String getBgcolorAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code width} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getWidthAttribute() { return getAttributeDirect("width"); @@ -206,7 +206,7 @@ public final String getWidthAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code height} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getHeightAttribute() { return getAttributeDirect("height"); diff --git a/src/main/java/org/htmlunit/html/HtmlTableFooter.java b/src/main/java/org/htmlunit/html/HtmlTableFooter.java index 87a89d4916a..38141b21ab9 100644 --- a/src/main/java/org/htmlunit/html/HtmlTableFooter.java +++ b/src/main/java/org/htmlunit/html/HtmlTableFooter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlTableHeader.java b/src/main/java/org/htmlunit/html/HtmlTableHeader.java index 4fcc4929da6..f53cdad68b3 100644 --- a/src/main/java/org/htmlunit/html/HtmlTableHeader.java +++ b/src/main/java/org/htmlunit/html/HtmlTableHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlTableHeaderCell.java b/src/main/java/org/htmlunit/html/HtmlTableHeaderCell.java index 490d9aff7c5..40514eb6bc4 100644 --- a/src/main/java/org/htmlunit/html/HtmlTableHeaderCell.java +++ b/src/main/java/org/htmlunit/html/HtmlTableHeaderCell.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class HtmlTableHeaderCell extends HtmlTableCell { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code abbr} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAbbrAttribute() { return getAttributeDirect("abbr"); @@ -62,7 +62,7 @@ public final String getAbbrAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code axis} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAxisAttribute() { return getAttributeDirect("axis"); @@ -74,7 +74,7 @@ public final String getAxisAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code headers} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getHeadersAttribute() { return getAttributeDirect("headers"); @@ -86,7 +86,7 @@ public final String getHeadersAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code scope} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getScopeAttribute() { return getAttributeDirect("scope"); @@ -98,7 +98,7 @@ public final String getScopeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code rowspan} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getRowSpanAttribute() { return getAttributeDirect("rowspan"); @@ -110,7 +110,7 @@ public final String getRowSpanAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code colspan} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getColumnSpanAttribute() { return getAttributeDirect("colspan"); @@ -122,7 +122,7 @@ public final String getColumnSpanAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code align} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAlignAttribute() { return getAttributeDirect("align"); @@ -134,7 +134,7 @@ public final String getAlignAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code char} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharAttribute() { return getAttributeDirect("char"); @@ -146,7 +146,7 @@ public final String getCharAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code charoff} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharoffAttribute() { return getAttributeDirect("charoff"); @@ -158,7 +158,7 @@ public final String getCharoffAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code valign} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getValignAttribute() { return getAttributeDirect("valign"); @@ -170,7 +170,7 @@ public final String getValignAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code nowrap} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getNoWrapAttribute() { return getAttributeDirect("nowrap"); @@ -182,7 +182,7 @@ public final String getNoWrapAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code bgcolor} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getBgcolorAttribute() { return getAttributeDirect("bgcolor"); @@ -194,7 +194,7 @@ public final String getBgcolorAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code width} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getWidthAttribute() { return getAttributeDirect("width"); @@ -206,7 +206,7 @@ public final String getWidthAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code height} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getHeightAttribute() { return getAttributeDirect("height"); diff --git a/src/main/java/org/htmlunit/html/HtmlTableRow.java b/src/main/java/org/htmlunit/html/HtmlTableRow.java index baaf17ec163..0afdd5f95a9 100644 --- a/src/main/java/org/htmlunit/html/HtmlTableRow.java +++ b/src/main/java/org/htmlunit/html/HtmlTableRow.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,7 +91,7 @@ public HtmlTableCell getCell(final int index) throws IndexOutOfBoundsException { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code align} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAlignAttribute() { return getAttributeDirect("align"); @@ -103,7 +103,7 @@ public final String getAlignAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code char} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharAttribute() { return getAttributeDirect("char"); @@ -115,7 +115,7 @@ public final String getCharAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code charoff} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharoffAttribute() { return getAttributeDirect("charoff"); @@ -127,7 +127,7 @@ public final String getCharoffAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code valign} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getValignAttribute() { return getAttributeDirect("valign"); @@ -147,7 +147,7 @@ public HtmlTable getEnclosingTable() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code bgcolor} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getBgcolorAttribute() { return getAttributeDirect("bgcolor"); @@ -166,7 +166,9 @@ public CellIterator() { setNextCell(getFirstChild()); } - /** @return whether there is another cell available */ + /** + * @return whether there is another cell available + */ @Override public boolean hasNext() { return nextCell_ != null; diff --git a/src/main/java/org/htmlunit/html/HtmlTelInput.java b/src/main/java/org/htmlunit/html/HtmlTelInput.java index 6e593928e37..f8068a6c9df 100644 --- a/src/main/java/org/htmlunit/html/HtmlTelInput.java +++ b/src/main/java/org/htmlunit/html/HtmlTelInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlTeletype.java b/src/main/java/org/htmlunit/html/HtmlTeletype.java index 6898074a910..67520a8d239 100644 --- a/src/main/java/org/htmlunit/html/HtmlTeletype.java +++ b/src/main/java/org/htmlunit/html/HtmlTeletype.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlTemplate.java b/src/main/java/org/htmlunit/html/HtmlTemplate.java index 20258ab9783..e1cb57afcde 100644 --- a/src/main/java/org/htmlunit/html/HtmlTemplate.java +++ b/src/main/java/org/htmlunit/html/HtmlTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlTextArea.java b/src/main/java/org/htmlunit/html/HtmlTextArea.java index 961b7b08e4d..8358d359b9f 100644 --- a/src/main/java/org/htmlunit/html/HtmlTextArea.java +++ b/src/main/java/org/htmlunit/html/HtmlTextArea.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ import java.util.Map; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.text.StringEscapeUtils; import org.htmlunit.SgmlPage; import org.htmlunit.html.impl.SelectableTextInput; import org.htmlunit.html.impl.SelectableTextSelectionDelegate; @@ -436,7 +435,7 @@ protected void printXml(final String indent, final PrintWriter printWriter) { printOpeningTagContentAsXml(printWriter); printWriter.print(">"); - printWriter.print(StringEscapeUtils.escapeXml10(getText())); + printWriter.print(org.htmlunit.util.StringUtils.escapeXml(getText())); printWriter.print(""); } diff --git a/src/main/java/org/htmlunit/html/HtmlTextInput.java b/src/main/java/org/htmlunit/html/HtmlTextInput.java index 736ad273312..a50abdd9571 100644 --- a/src/main/java/org/htmlunit/html/HtmlTextInput.java +++ b/src/main/java/org/htmlunit/html/HtmlTextInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlTime.java b/src/main/java/org/htmlunit/html/HtmlTime.java index 9c814439dd8..65d0d378974 100644 --- a/src/main/java/org/htmlunit/html/HtmlTime.java +++ b/src/main/java/org/htmlunit/html/HtmlTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlTimeInput.java b/src/main/java/org/htmlunit/html/HtmlTimeInput.java index 2b2e33695b8..74f38e37021 100644 --- a/src/main/java/org/htmlunit/html/HtmlTimeInput.java +++ b/src/main/java/org/htmlunit/html/HtmlTimeInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlTitle.java b/src/main/java/org/htmlunit/html/HtmlTitle.java index c49e6fc0089..fc04a5c0b83 100644 --- a/src/main/java/org/htmlunit/html/HtmlTitle.java +++ b/src/main/java/org/htmlunit/html/HtmlTitle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlTrack.java b/src/main/java/org/htmlunit/html/HtmlTrack.java index be74d4e73bc..1cd0542f69b 100644 --- a/src/main/java/org/htmlunit/html/HtmlTrack.java +++ b/src/main/java/org/htmlunit/html/HtmlTrack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlUnderlined.java b/src/main/java/org/htmlunit/html/HtmlUnderlined.java index fccdc68f4de..7d480355c53 100644 --- a/src/main/java/org/htmlunit/html/HtmlUnderlined.java +++ b/src/main/java/org/htmlunit/html/HtmlUnderlined.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlUnknownElement.java b/src/main/java/org/htmlunit/html/HtmlUnknownElement.java index 57c628e6998..0cd1dd74ead 100644 --- a/src/main/java/org/htmlunit/html/HtmlUnknownElement.java +++ b/src/main/java/org/htmlunit/html/HtmlUnknownElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlUnorderedList.java b/src/main/java/org/htmlunit/html/HtmlUnorderedList.java index a1b4ac3344a..e12a0904b37 100644 --- a/src/main/java/org/htmlunit/html/HtmlUnorderedList.java +++ b/src/main/java/org/htmlunit/html/HtmlUnorderedList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class HtmlUnorderedList extends HtmlElement { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code type} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getTypeAttribute() { return getAttributeDirect(TYPE_ATTRIBUTE); @@ -62,7 +62,7 @@ public final String getTypeAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code compact} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCompactAttribute() { return getAttributeDirect("compact"); diff --git a/src/main/java/org/htmlunit/html/HtmlUrlInput.java b/src/main/java/org/htmlunit/html/HtmlUrlInput.java index c2c9ae192f5..a94157b7e26 100644 --- a/src/main/java/org/htmlunit/html/HtmlUrlInput.java +++ b/src/main/java/org/htmlunit/html/HtmlUrlInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,18 +38,8 @@ public class HtmlUrlInput extends HtmlSelectableTextInput implements LabelableEl */ HtmlUrlInput(final String qualifiedName, final SgmlPage page, final Map attributes) { - super(qualifiedName, page, trimValueAttribute(page, attributes)); - } - - private static Map trimValueAttribute(final SgmlPage page, final Map attributes) { - for (final Map.Entry entry : attributes.entrySet()) { - if (VALUE_ATTRIBUTE.equalsIgnoreCase(entry.getKey())) { - entry.getValue().setValue(entry.getValue().getValue().trim()); - break; - } - } - - return attributes; + super(qualifiedName, page, attributes); + setRawValue(getValue().trim()); } /** diff --git a/src/main/java/org/htmlunit/html/HtmlVariable.java b/src/main/java/org/htmlunit/html/HtmlVariable.java index 7e277086443..456f4c5daa1 100644 --- a/src/main/java/org/htmlunit/html/HtmlVariable.java +++ b/src/main/java/org/htmlunit/html/HtmlVariable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlVideo.java b/src/main/java/org/htmlunit/html/HtmlVideo.java index c64baad80c9..88dfdedd489 100644 --- a/src/main/java/org/htmlunit/html/HtmlVideo.java +++ b/src/main/java/org/htmlunit/html/HtmlVideo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlWeekInput.java b/src/main/java/org/htmlunit/html/HtmlWeekInput.java index afa4a4370eb..c94a7423dea 100644 --- a/src/main/java/org/htmlunit/html/HtmlWeekInput.java +++ b/src/main/java/org/htmlunit/html/HtmlWeekInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/HtmlWordBreak.java b/src/main/java/org/htmlunit/html/HtmlWordBreak.java index 7244bc185dc..90c2c7d071e 100644 --- a/src/main/java/org/htmlunit/html/HtmlWordBreak.java +++ b/src/main/java/org/htmlunit/html/HtmlWordBreak.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/Keyboard.java b/src/main/java/org/htmlunit/html/Keyboard.java index e16f6ba0578..fb935a3e7c6 100644 --- a/src/main/java/org/htmlunit/html/Keyboard.java +++ b/src/main/java/org/htmlunit/html/Keyboard.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/LabelableElement.java b/src/main/java/org/htmlunit/html/LabelableElement.java index d9f5ae80603..ab098808674 100644 --- a/src/main/java/org/htmlunit/html/LabelableElement.java +++ b/src/main/java/org/htmlunit/html/LabelableElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/ScriptElement.java b/src/main/java/org/htmlunit/html/ScriptElement.java index a955817a64c..1a96e2bea1d 100644 --- a/src/main/java/org/htmlunit/html/ScriptElement.java +++ b/src/main/java/org/htmlunit/html/ScriptElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/ScriptElementSupport.java b/src/main/java/org/htmlunit/html/ScriptElementSupport.java index b48f630f1b2..796c53d1a94 100644 --- a/src/main/java/org/htmlunit/html/ScriptElementSupport.java +++ b/src/main/java/org/htmlunit/html/ScriptElementSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory; import org.htmlunit.FailingHttpStatusCodeException; import org.htmlunit.SgmlPage; +import org.htmlunit.WebClient; import org.htmlunit.WebWindow; import org.htmlunit.html.HtmlPage.JavaScriptLoadResult; import org.htmlunit.javascript.AbstractJavaScriptEngine; @@ -62,7 +63,7 @@ private ScriptElementSupport() { * Support method that is called from the (html or svg) script and the link tag. * * @param script the ScriptElement to work for - * @param postponed whether to use {@link org.htmlunit.javascript.PostponedAction} or no + * @param postponed whether to use {@link org.htmlunit.javascript.PostponedAction} or not */ public static void onAllChildrenAddedToPage(final ScriptElement script, final boolean postponed) { final DomElement element = (DomElement) script; @@ -73,7 +74,9 @@ public static void onAllChildrenAddedToPage(final ScriptElement script, final bo LOG.debug("Script node added: " + element.asXml()); } - if (!element.getPage().getWebClient().isJavaScriptEngineEnabled()) { + final SgmlPage page = element.getPage(); + final WebClient webClient = page.getWebClient(); + if (!webClient.isJavaScriptEngineEnabled()) { LOG.debug("Script found but not executed because javascript engine is disabled"); return; } @@ -84,7 +87,7 @@ public static void onAllChildrenAddedToPage(final ScriptElement script, final bo return; } - final WebWindow webWindow = element.getPage().getEnclosingWindow(); + final WebWindow webWindow = page.getEnclosingWindow(); if (webWindow != null) { final StringBuilder description = new StringBuilder() .append("Execution of ") @@ -94,7 +97,7 @@ public static void onAllChildrenAddedToPage(final ScriptElement script, final bo description.append(" (").append(srcAttrib).append(')'); } - final PostponedAction action = new PostponedAction(element.getPage(), description.toString()) { + final PostponedAction action = new PostponedAction(page, description.toString()) { @Override public void execute() { // see HTMLDocument.setExecutingDynamicExternalPosponed(boolean) @@ -103,7 +106,7 @@ public void execute() { if (window != null) { jsDoc = (HTMLDocument) window.getDocument(); jsDoc.setExecutingDynamicExternalPosponed(element.getStartLineNumber() == -1 - && ATTRIBUTE_NOT_DEFINED != srcAttrib); + && !hasNoSrcAttrib); } try { executeScriptIfNeeded(script, false, false); @@ -116,23 +119,17 @@ public void execute() { } }; - final AbstractJavaScriptEngine engine = element.getPage().getWebClient().getJavaScriptEngine(); - if (engine != null - && element.hasAttribute("async") && !engine.isScriptRunning()) { - final HtmlPage owningPage = element.getHtmlPageOrNull(); - owningPage.addAfterLoadAction(action); + final AbstractJavaScriptEngine engine = webClient.getJavaScriptEngine(); + if (element.hasAttribute("async") && !hasNoSrcAttrib) { + engine.addPostponedAction(action); } - else if (engine != null - && (element.hasAttribute("async") - || postponed && StringUtils.isBlank(element.getTextContent()))) { + else if (postponed && !hasNoSrcAttrib) { engine.addPostponedAction(action); } else { try { action.execute(); - if (engine != null) { - engine.processPostponedActions(); - } + engine.processPostponedActions(); } catch (final RuntimeException e) { throw e; @@ -308,6 +305,10 @@ public static boolean isJavaScript(String typeAttribute, final String languageAt private static void executeEvent(final DomElement element, final String type) { final EventTarget eventTarget = element.getScriptableObject(); final Event event = new Event(element, type); + + event.setParentScope(eventTarget); + event.setPrototype(eventTarget.getPrototype(event.getClass())); + eventTarget.executeEventLocally(event); } diff --git a/src/main/java/org/htmlunit/html/SiblingDomNodeList.java b/src/main/java/org/htmlunit/html/SiblingDomNodeList.java index 009de12080e..b864693af43 100644 --- a/src/main/java/org/htmlunit/html/SiblingDomNodeList.java +++ b/src/main/java/org/htmlunit/html/SiblingDomNodeList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/StaticDomNodeList.java b/src/main/java/org/htmlunit/html/StaticDomNodeList.java index a0305646333..8a1305c0e6b 100644 --- a/src/main/java/org/htmlunit/html/StaticDomNodeList.java +++ b/src/main/java/org/htmlunit/html/StaticDomNodeList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/SubmittableElement.java b/src/main/java/org/htmlunit/html/SubmittableElement.java index a8c8a3006e0..b913146e4f9 100644 --- a/src/main/java/org/htmlunit/html/SubmittableElement.java +++ b/src/main/java/org/htmlunit/html/SubmittableElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/TableRowGroup.java b/src/main/java/org/htmlunit/html/TableRowGroup.java index f885b0cfafb..c1befc12605 100644 --- a/src/main/java/org/htmlunit/html/TableRowGroup.java +++ b/src/main/java/org/htmlunit/html/TableRowGroup.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ public final List getRows() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code align} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getAlignAttribute() { return getAttributeDirect("align"); @@ -80,7 +80,7 @@ public final String getAlignAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code char} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharAttribute() { return getAttributeDirect("char"); @@ -92,7 +92,7 @@ public final String getCharAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code charoff} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getCharoffAttribute() { return getAttributeDirect("charoff"); @@ -104,7 +104,7 @@ public final String getCharoffAttribute() { * documentation for details on the use of this attribute. * * @return the value of the attribute {@code valign} - * or an empty string if that attribute isn't defined. + * or an empty string if that attribute isn't defined. */ public final String getValignAttribute() { return getAttributeDirect("valign"); diff --git a/src/main/java/org/htmlunit/html/UnknownElementFactory.java b/src/main/java/org/htmlunit/html/UnknownElementFactory.java index f5e640f9aaa..4ecff7bab49 100644 --- a/src/main/java/org/htmlunit/html/UnknownElementFactory.java +++ b/src/main/java/org/htmlunit/html/UnknownElementFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/ValidatableElement.java b/src/main/java/org/htmlunit/html/ValidatableElement.java index 654aa459727..0b441b20e32 100644 --- a/src/main/java/org/htmlunit/html/ValidatableElement.java +++ b/src/main/java/org/htmlunit/html/ValidatableElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ public interface ValidatableElement { /** * @return a boolean value boolean value that is true if the user - * has provided input that the browser is unable to convert. + * has provided input that the browser is unable to convert. */ default boolean hasBadInputValidityState() { return false; @@ -45,14 +45,14 @@ default boolean hasBadInputValidityState() { /** * @return a boolean value indicating whether the element's custom validity message - * has been set to a non-empty string by calling the element's setCustomValidity() method. + * has been set to a non-empty string by calling the element's setCustomValidity() method. */ boolean isCustomErrorValidityState(); /** * @return true if the value does not match the specified pattern, - * and false if it does match. - * If true, the element matches the :invalid CSS pseudo-class + * and false if it does match. + * If true, the element matches the :invalid CSS pseudo-class */ default boolean hasPatternMismatchValidityState() { return false; @@ -60,9 +60,9 @@ default boolean hasPatternMismatchValidityState() { /** * @return true if the value does not fit the rules determined by the step attribute - * (that is, it's not evenly divisible by the step value), - * or false if it does fit the step rule. - * If true, the element matches the :invalid and :out-of-range CSS pseudo-classes. + * (that is, it's not evenly divisible by the step value), + * or false if it does fit the step rule. + * If true, the element matches the :invalid and :out-of-range CSS pseudo-classes. */ default boolean isStepMismatchValidityState() { return false; @@ -70,8 +70,8 @@ default boolean isStepMismatchValidityState() { /** * @return true if the value is longer than the maximum length specified - * by the maxlength attribute, or false if it is shorter than or equal to the maximum. - * If true, the element matches the :invalid CSS pseudo-class + * by the maxlength attribute, or false if it is shorter than or equal to the maximum. + * If true, the element matches the :invalid CSS pseudo-class */ default boolean isTooLongValidityState() { return false; @@ -79,8 +79,8 @@ default boolean isTooLongValidityState() { /** * @return true if the value is shorter than the minimum length specified - * by the minlength attribute, or false if it is greater than or equal to the minimum. - * If true, the element matches the :invalid CSS pseudo-class + * by the minlength attribute, or false if it is greater than or equal to the minimum. + * If true, the element matches the :invalid CSS pseudo-class */ default boolean isTooShortValidityState() { return false; @@ -88,8 +88,8 @@ default boolean isTooShortValidityState() { /** * @return true if the value is not in the required syntax (when type is email or url), - * or false if the syntax is correct. - * If true, the element matches the :invalid CSS pseudo-class. + * or false if the syntax is correct. + * If true, the element matches the :invalid CSS pseudo-class. */ default boolean hasTypeMismatchValidityState() { return false; @@ -97,8 +97,8 @@ default boolean hasTypeMismatchValidityState() { /** * @return true if the value is greater than the maximum specified by the max attribute, - * or false if it is less than or equal to the maximum. - * If true, the element matches the :invalid and :out-of-range CSS pseudo-classes. + * or false if it is less than or equal to the maximum. + * If true, the element matches the :invalid and :out-of-range CSS pseudo-classes. */ default boolean hasRangeOverflowValidityState() { return false; @@ -106,8 +106,8 @@ default boolean hasRangeOverflowValidityState() { /** * @return true if the value is less than the minimum specified by the min attribute, - * or false if it is greater than or equal to the minimum. - * If true, the element matches the :invalid and :out-of-range CSS pseudo-classes. + * or false if it is greater than or equal to the minimum. + * If true, the element matches the :invalid and :out-of-range CSS pseudo-classes. */ default boolean hasRangeUnderflowValidityState() { return false; @@ -115,14 +115,14 @@ default boolean hasRangeUnderflowValidityState() { /** * @return true if the element meets all its validation constraints, and is therefore - * considered to be valid, or false if it fails any constraint. - * If true, the element matches the :valid CSS pseudo-class; the :invalid CSS pseudo-class otherwise. + * considered to be valid, or false if it fails any constraint. + * If true, the element matches the :valid CSS pseudo-class; the :invalid CSS pseudo-class otherwise. */ boolean isValidValidityState(); /** * @return true if the element has a required attribute, but no value, or false otherwise. - * If true, the element matches the :invalid CSS pseudo-class. + * If true, the element matches the :invalid CSS pseudo-class. */ default boolean isValueMissingValidityState() { return false; diff --git a/src/main/java/org/htmlunit/html/XHtmlPage.java b/src/main/java/org/htmlunit/html/XHtmlPage.java index 0ad14093a45..6f336bf0659 100644 --- a/src/main/java/org/htmlunit/html/XHtmlPage.java +++ b/src/main/java/org/htmlunit/html/XHtmlPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/XmlSerializer.java b/src/main/java/org/htmlunit/html/XmlSerializer.java index 0eb2cb5a44b..14f9d99e324 100644 --- a/src/main/java/org/htmlunit/html/XmlSerializer.java +++ b/src/main/java/org/htmlunit/html/XmlSerializer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,6 +54,12 @@ public class XmlSerializer { private final StringBuilder indent_ = new StringBuilder(); private File outputDir_; + /** + * Saves the given {@link SgmlPage} to the file. + * @param page the page to save + * @param file the destination + * @throws IOException in case of error + */ public void save(final SgmlPage page, final File file) throws IOException { save(page, file, false); } @@ -279,7 +285,7 @@ protected Map getAttributesFor(final HtmlLink link) throws IOEx final String protocol = link.getWebRequest().getUrl().getProtocol(); if ("http".equals(protocol) || "https".equals(protocol)) { try { - final WebResponse response = link.getWebResponse(true, null); + final WebResponse response = link.getWebResponse(true, null, false, null); final File file = createFile(hrefAttr.getValue(), ".css"); FileUtils.writeStringToFile(file, response.getContentAsString(), ISO_8859_1); diff --git a/src/main/java/org/htmlunit/html/impl/Color.java b/src/main/java/org/htmlunit/html/impl/Color.java index bdd1e267813..2dc3fe586e8 100644 --- a/src/main/java/org/htmlunit/html/impl/Color.java +++ b/src/main/java/org/htmlunit/html/impl/Color.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/impl/SelectableTextInput.java b/src/main/java/org/htmlunit/html/impl/SelectableTextInput.java index 04b4560a603..9e23ec7b611 100644 --- a/src/main/java/org/htmlunit/html/impl/SelectableTextInput.java +++ b/src/main/java/org/htmlunit/html/impl/SelectableTextInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/impl/SelectableTextSelectionDelegate.java b/src/main/java/org/htmlunit/html/impl/SelectableTextSelectionDelegate.java index 0430e4460e5..334d2805102 100644 --- a/src/main/java/org/htmlunit/html/impl/SelectableTextSelectionDelegate.java +++ b/src/main/java/org/htmlunit/html/impl/SelectableTextSelectionDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/impl/SelectionDelegate.java b/src/main/java/org/htmlunit/html/impl/SelectionDelegate.java index c2cdd07e260..0133077f0a5 100644 --- a/src/main/java/org/htmlunit/html/impl/SelectionDelegate.java +++ b/src/main/java/org/htmlunit/html/impl/SelectionDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/impl/SimpleRange.java b/src/main/java/org/htmlunit/html/impl/SimpleRange.java index fbef296df7e..a9fa08f70a3 100644 --- a/src/main/java/org/htmlunit/html/impl/SimpleRange.java +++ b/src/main/java/org/htmlunit/html/impl/SimpleRange.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -291,7 +291,7 @@ public DomDocumentFragment extractContents() throws DOMException { /** * @return true if startContainer equals endContainer and - * startOffset equals endOffset + * startOffset equals endOffset * @throws DOMException in case of error */ public boolean isCollapsed() throws DOMException { @@ -300,7 +300,7 @@ public boolean isCollapsed() throws DOMException { /** * @return the deepest common ancestor container of this range's two - * boundary-points. + * boundary-points. * @throws DOMException in case of error */ public DomNode getCommonAncestorContainer() throws DOMException { diff --git a/src/main/java/org/htmlunit/html/impl/SimpleSelectionDelegate.java b/src/main/java/org/htmlunit/html/impl/SimpleSelectionDelegate.java index 52458d67ba8..d45435cdb85 100644 --- a/src/main/java/org/htmlunit/html/impl/SimpleSelectionDelegate.java +++ b/src/main/java/org/htmlunit/html/impl/SimpleSelectionDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/impl/package-info.java b/src/main/java/org/htmlunit/html/impl/package-info.java index bad5bdf5a12..07d9b477f31 100644 --- a/src/main/java/org/htmlunit/html/impl/package-info.java +++ b/src/main/java/org/htmlunit/html/impl/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/package-info.java b/src/main/java/org/htmlunit/html/package-info.java index f2fb04e7dea..6aed541c35d 100644 --- a/src/main/java/org/htmlunit/html/package-info.java +++ b/src/main/java/org/htmlunit/html/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/parser/HTMLParser.java b/src/main/java/org/htmlunit/html/parser/HTMLParser.java index 63da9984060..9df2e782538 100644 --- a/src/main/java/org/htmlunit/html/parser/HTMLParser.java +++ b/src/main/java/org/htmlunit/html/parser/HTMLParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ import java.io.IOException; import org.htmlunit.SgmlPage; +import org.htmlunit.WebClient; import org.htmlunit.WebResponse; import org.htmlunit.html.DomNode; import org.htmlunit.html.ElementFactory; @@ -75,12 +76,19 @@ ElementFactory getElementFactory(SgmlPage page, String namespaceURI, * @param source the (X)HTML to be parsed * @throws SAXException if a SAX error occurs * @throws IOException if an IO error occurs + * + * @deprecated as of version 4.12.0; use + * {@link #parseFragment(WebClient, DomNode, DomNode, String, boolean)} instead. */ - void parseFragment(DomNode parent, String source) throws SAXException, IOException; + @Deprecated + default void parseFragment(final DomNode parent, final String source) throws SAXException, IOException { + parseFragment(null, parent, parent, source, false); + } /** * Parses the HTML content from the given string into an object tree representation. * + * @param webClient the {@link WebClient} * @param parent where the new parsed nodes will be added to * @param context the context to build the fragment context stack * @param source the (X)HTML to be parsed @@ -88,9 +96,41 @@ ElementFactory getElementFactory(SgmlPage page, String namespaceURI, * @throws SAXException if a SAX error occurs * @throws IOException if an IO error occurs */ - void parseFragment(DomNode parent, DomNode context, String source, + void parseFragment(WebClient webClient, DomNode parent, DomNode context, String source, boolean createdByJavascript) throws SAXException, IOException; + /** + * Parses the HTML content from the given string into an object tree representation. + * + * @param parent where the new parsed nodes will be added to + * @param context the context to build the fragment context stack + * @param source the (X)HTML to be parsed + * @param createdByJavascript if true the (script) tag was created by javascript + * @throws SAXException if a SAX error occurs + * @throws IOException if an IO error occurs + * + * @deprecated as of version 4.12.0; use + * {@link #parseFragment(WebClient, DomNode, DomNode, String, boolean)} instead. + */ + @Deprecated + default void parseFragment(final DomNode parent, final DomNode context, final String source, + final boolean createdByJavascript) throws SAXException, IOException { + parseFragment(null, parent, context, source, createdByJavascript); + } + + /** + * Parses the WebResponse into an object tree representation. + * + * @param webClient the {@link WebClient} + * @param webResponse the response data + * @param page the HtmlPage to add the nodes + * @param xhtml if true use the XHtml parser + * @param createdByJavascript if true the (script) tag was created by javascript + * @throws IOException if there is an IO error + */ + void parse(WebClient webClient, WebResponse webResponse, HtmlPage page, + boolean xhtml, boolean createdByJavascript) throws IOException; + /** * Parses the WebResponse into an object tree representation. * @@ -99,6 +139,13 @@ void parseFragment(DomNode parent, DomNode context, String source, * @param xhtml if true use the XHtml parser * @param createdByJavascript if true the (script) tag was created by javascript * @throws IOException if there is an IO error + * + * @deprecated as of version 4.12.0; use + * {@link #parse(WebClient, WebResponse, HtmlPage, boolean, boolean)} instead. */ - void parse(WebResponse webResponse, HtmlPage page, boolean xhtml, boolean createdByJavascript) throws IOException; + @Deprecated + default void parse(final WebResponse webResponse, final HtmlPage page, final boolean xhtml, + final boolean createdByJavascript) throws IOException { + parse(null, webResponse, page, xhtml, createdByJavascript); + } } diff --git a/src/main/java/org/htmlunit/html/parser/HTMLParserDOMBuilder.java b/src/main/java/org/htmlunit/html/parser/HTMLParserDOMBuilder.java index f5adceaa6a8..c12143e4a9f 100644 --- a/src/main/java/org/htmlunit/html/parser/HTMLParserDOMBuilder.java +++ b/src/main/java/org/htmlunit/html/parser/HTMLParserDOMBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/parser/HTMLParserListener.java b/src/main/java/org/htmlunit/html/parser/HTMLParserListener.java index b941688e16d..0eb758ed0e6 100644 --- a/src/main/java/org/htmlunit/html/parser/HTMLParserListener.java +++ b/src/main/java/org/htmlunit/html/parser/HTMLParserListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/parser/neko/HtmlUnitNekoDOMBuilder.java b/src/main/java/org/htmlunit/html/parser/neko/HtmlUnitNekoDOMBuilder.java index 9e68ab12967..4241ac13949 100644 --- a/src/main/java/org/htmlunit/html/parser/neko/HtmlUnitNekoDOMBuilder.java +++ b/src/main/java/org/htmlunit/html/parser/neko/HtmlUnitNekoDOMBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ import java.util.ArrayDeque; import java.util.Deque; -import org.apache.commons.lang3.ArrayUtils; import org.htmlunit.BrowserVersion; import org.htmlunit.ObjectInstantiationException; import org.htmlunit.WebClient; @@ -270,10 +269,6 @@ public void startElement(String namespaceURI, final String localName, final Stri headParsed_ = lastTagWasSynthesized_ ? HeadParsed.SYNTHESIZED : HeadParsed.YES; } - if (namespaceURI != null) { - namespaceURI = namespaceURI.trim(); - } - // If we're adding a body element, keep track of any temporary synthetic ones // that we may have had to create earlier (for document.write(), for example). HtmlBody oldBody = null; @@ -285,6 +280,9 @@ public void startElement(String namespaceURI, final String localName, final Stri } } + if (namespaceURI != null) { + namespaceURI = namespaceURI.trim(); + } // Add the new node. if (!(page_ instanceof XHtmlPage) && Html.XHTML_NAMESPACE.equals(namespaceURI)) { namespaceURI = null; @@ -295,6 +293,7 @@ public void startElement(String namespaceURI, final String localName, final Stri if (factory == HtmlUnitNekoHtmlParser.SVG_FACTORY) { namespaceURI = Html.SVG_NAMESPACE; } + final DomElement newElement = factory.createElementNS(page_, namespaceURI, qName, atts); newElement.setStartLocation(locator_.getLineNumber(), locator_.getColumnNumber()); @@ -310,7 +309,7 @@ else if (newElement instanceof HtmlTemplate) { // Forms own elements simply by enclosing source-wise rather than DOM parent-child relationship // Forms without a will keep consuming forever - if (newElement instanceof HtmlForm) { + else if (newElement instanceof HtmlForm) { consumingForm_ = (HtmlForm) newElement; formEndingIsAdjusting_ = false; } @@ -416,20 +415,28 @@ else if (newElement instanceof HtmlHiddenInput) { appendChild(currentNode, newElement); } - private DomNode findElementOnStack(final String... searchedElementNames) { - DomNode searchedNode = null; + private DomNode findElementOnStack(final String searchedElementName) { for (final DomNode node : stack_) { - if (ArrayUtils.contains(searchedElementNames, node.getNodeName())) { - searchedNode = node; - break; + if (searchedElementName.equals(node.getNodeName())) { + return node; } } - if (searchedNode == null) { - searchedNode = stack_.peek(); // this is surely wrong but at least it won't throw a NPE + // this is surely wrong but at least it won't throw a NPE + return stack_.peek(); + } + + private DomNode findElementOnStack(final String... searchedElementNames) { + for (final DomNode node : stack_) { + for (final String searchedElementName : searchedElementNames) { + if (searchedElementName.equals(node.getNodeName())) { + return node; + } + } } - return searchedNode; + // this is surely wrong but at least it won't throw a NPE + return stack_.peek(); } private static boolean isTableChild(final String nodeName) { @@ -541,24 +548,14 @@ private void handleCharacters() { if (org.apache.commons.lang3.StringUtils.isBlank(textValue)) { appendChild(currentNode_, new DomText(page_, textValue)); + return; } - else { - // malformed HTML: some text => text comes before the table - if (currentNode_ instanceof HtmlTableRow) { - final HtmlTableRow row = (HtmlTableRow) currentNode_; - final HtmlTable enclosingTable = row.getEnclosingTable(); - if (enclosingTable != null) { // may be null when called from Range.createContextualFragment - if (enclosingTable.getPreviousSibling() instanceof DomText) { - final DomText domText = (DomText) enclosingTable.getPreviousSibling(); - domText.setTextContent(domText.getWholeText() + textValue); - } - else { - enclosingTable.insertBefore(new DomText(page_, textValue)); - } - } - } - else if (currentNode_ instanceof HtmlTable) { - final HtmlTable enclosingTable = (HtmlTable) currentNode_; + + // malformed HTML: some text => text comes before the table + if (currentNode_ instanceof HtmlTableRow) { + final HtmlTableRow row = (HtmlTableRow) currentNode_; + final HtmlTable enclosingTable = row.getEnclosingTable(); + if (enclosingTable != null) { // may be null when called from Range.createContextualFragment if (enclosingTable.getPreviousSibling() instanceof DomText) { final DomText domText = (DomText) enclosingTable.getPreviousSibling(); domText.setTextContent(domText.getWholeText() + textValue); @@ -567,13 +564,23 @@ else if (currentNode_ instanceof HtmlTable) { enclosingTable.insertBefore(new DomText(page_, textValue)); } } - else if (currentNode_ instanceof HtmlImage) { - currentNode_.getParentNode().appendChild(new DomText(page_, textValue)); + } + else if (currentNode_ instanceof HtmlTable) { + final HtmlTable enclosingTable = (HtmlTable) currentNode_; + if (enclosingTable.getPreviousSibling() instanceof DomText) { + final DomText domText = (DomText) enclosingTable.getPreviousSibling(); + domText.setTextContent(domText.getWholeText() + textValue); } else { - appendChild(currentNode_, new DomText(page_, textValue)); + enclosingTable.insertBefore(new DomText(page_, textValue)); } } + else if (currentNode_ instanceof HtmlImage) { + currentNode_.getParentNode().appendChild(new DomText(page_, textValue)); + } + else { + appendChild(currentNode_, new DomText(page_, textValue)); + } } /** {@inheritDoc} */ diff --git a/src/main/java/org/htmlunit/html/parser/neko/HtmlUnitNekoHtmlParser.java b/src/main/java/org/htmlunit/html/parser/neko/HtmlUnitNekoHtmlParser.java index 74b464f2385..89e5d3fbea2 100644 --- a/src/main/java/org/htmlunit/html/parser/neko/HtmlUnitNekoHtmlParser.java +++ b/src/main/java/org/htmlunit/html/parser/neko/HtmlUnitNekoHtmlParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,14 +21,15 @@ import java.net.URL; import java.nio.charset.Charset; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import org.htmlunit.ObjectInstantiationException; import org.htmlunit.Page; import org.htmlunit.SgmlPage; import org.htmlunit.WebAssert; +import org.htmlunit.WebClient; import org.htmlunit.WebResponse; import org.htmlunit.cyberneko.HTMLScanner; import org.htmlunit.cyberneko.HTMLTagBalancer; @@ -73,7 +74,7 @@ public final class HtmlUnitNekoHtmlParser implements HTMLParser { */ public static final SvgElementFactory SVG_FACTORY = new SvgElementFactory(); - private static final Map ELEMENT_FACTORIES = new HashMap<>(); + private static final Map ELEMENT_FACTORIES = new ConcurrentHashMap<>(); static { final DefaultElementFactory defaultElementFactory = new DefaultElementFactory(); @@ -83,31 +84,11 @@ public final class HtmlUnitNekoHtmlParser implements HTMLParser { } /** - * Parses the HTML content from the given string into an object tree representation. - * - * @param parent the parent for the new nodes - * @param source the (X)HTML to be parsed - * @throws SAXException if a SAX error occurs - * @throws IOException if an IO error occurs - */ - @Override - public void parseFragment(final DomNode parent, final String source) throws SAXException, IOException { - parseFragment(parent, parent, source, false); - } - - /** - * Parses the HTML content from the given string into an object tree representation. - * - * @param parent where the new parsed nodes will be added to - * @param context the context to build the fragment context stack - * @param source the (X)HTML to be parsed - * @param createdByJavascript if true the (script) tag was created by javascript - * @throws SAXException if a SAX error occurs - * @throws IOException if an IO error occurs + * {@inheritDoc} */ @Override - public void parseFragment(final DomNode parent, final DomNode context, final String source, - final boolean createdByJavascript) + public void parseFragment(final WebClient webClient, final DomNode parent, final DomNode context, + final String source, final boolean createdByJavascript) throws SAXException, IOException { final Page page = parent.getPage(); if (!(page instanceof HtmlPage)) { @@ -153,16 +134,10 @@ else if (ancestors.size() == 1 } /** - * Parses the WebResponse into an object tree representation. - * - * @param webResponse the response data - * @param page the HtmlPage to add the nodes - * @param xhtml if true use the XHtml parser - * @param createdByJavascript if true the (script) tag was created by javascript - * @throws IOException if there is an IO error + * {@inheritDoc} */ @Override - public void parse(final WebResponse webResponse, final HtmlPage page, + public void parse(final WebClient webClient, final WebResponse webResponse, final HtmlPage page, final boolean xhtml, final boolean createdByJavascript) throws IOException { final URL url = webResponse.getWebRequest().getUrl(); final HtmlUnitNekoDOMBuilder domBuilder = @@ -182,6 +157,13 @@ public void parse(final WebResponse webResponse, final HtmlPage page, domBuilder.setFeature(HTMLScanner.STYLE_STRIP_CDATA_DELIMS, true); domBuilder.setFeature(HTMLScanner.CDATA_EARLY_CLOSING, false); } + + if (webClient != null) { + final int bufferSize = webClient.getOptions().getNekoReaderBufferSize(); + if (bufferSize > 0) { + domBuilder.setProperty(HTMLScanner.READER_BUFFER_SIZE, bufferSize); + } + } } catch (final Exception e) { throw new ObjectInstantiationException("Error setting HTML parser feature", e); @@ -315,7 +297,9 @@ class HtmlUnitNekoHTMLErrorHandler implements XMLErrorHandler { html_ = htmlContent; } - /** @see DefaultErrorHandler#error(String,String,XMLParseException) */ + /** + * @see DefaultErrorHandler#error(String,String,XMLParseException) + */ @Override public void error(final String domain, final String key, final XMLParseException exception) throws XNIException { @@ -327,7 +311,9 @@ public void error(final String domain, final String key, key); } - /** @see DefaultErrorHandler#warning(String,String,XMLParseException) */ + /** + * @see DefaultErrorHandler#warning(String,String,XMLParseException) + */ @Override public void warning(final String domain, final String key, final XMLParseException exception) throws XNIException { diff --git a/src/main/java/org/htmlunit/html/parser/neko/package-info.java b/src/main/java/org/htmlunit/html/parser/neko/package-info.java index 3ee2186e58e..2944fb2de07 100644 --- a/src/main/java/org/htmlunit/html/parser/neko/package-info.java +++ b/src/main/java/org/htmlunit/html/parser/neko/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/parser/package-info.java b/src/main/java/org/htmlunit/html/parser/package-info.java index 9d946ab60cc..53b21ca71ab 100644 --- a/src/main/java/org/htmlunit/html/parser/package-info.java +++ b/src/main/java/org/htmlunit/html/parser/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/serializer/HtmlSerializerInnerOuterText.java b/src/main/java/org/htmlunit/html/serializer/HtmlSerializerInnerOuterText.java index 2396e2593c4..3e919e6a3df 100644 --- a/src/main/java/org/htmlunit/html/serializer/HtmlSerializerInnerOuterText.java +++ b/src/main/java/org/htmlunit/html/serializer/HtmlSerializerInnerOuterText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/serializer/HtmlSerializerNormalizedText.java b/src/main/java/org/htmlunit/html/serializer/HtmlSerializerNormalizedText.java index 35006258db1..9be60feb6dd 100644 --- a/src/main/java/org/htmlunit/html/serializer/HtmlSerializerNormalizedText.java +++ b/src/main/java/org/htmlunit/html/serializer/HtmlSerializerNormalizedText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/serializer/HtmlSerializerVisibleText.java b/src/main/java/org/htmlunit/html/serializer/HtmlSerializerVisibleText.java index 635a3f33d93..435a3d22201 100644 --- a/src/main/java/org/htmlunit/html/serializer/HtmlSerializerVisibleText.java +++ b/src/main/java/org/htmlunit/html/serializer/HtmlSerializerVisibleText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -512,9 +512,7 @@ protected void appendSelect(final HtmlSerializerTextBuilder builder, */ protected void appendOption(final HtmlSerializerTextBuilder builder, final HtmlOption htmlOption, final Mode mode) { - builder.ignoreHtmlBreaks(); appendChildren(builder, htmlOption, mode); - builder.processHtmlBreaks(); } /** @@ -787,7 +785,6 @@ private enum State { private final StringBuilder builder_; private int trimRightPos_; private boolean contentAdded_; - private boolean ignoreHtmlBreaks_; /** * Ctor. @@ -985,10 +982,6 @@ public void appendBlockSeparator() { * @param mode the {@link Mode} */ public void appendBreak(final Mode mode) { - if (ignoreHtmlBreaks_) { - return; - } - builder_.setLength(trimRightPos_); builder_.append('\n'); @@ -1046,20 +1039,6 @@ public void resetContentAdded() { contentAdded_ = false; } - /** - * Ignore the following html breaks in the content to be added. - */ - public void ignoreHtmlBreaks() { - ignoreHtmlBreaks_ = true; - } - - /** - * Prozess the following html breaks in the content to be added. - */ - public void processHtmlBreaks() { - ignoreHtmlBreaks_ = false; - } - /** * @return the constructed text. */ diff --git a/src/main/java/org/htmlunit/html/serializer/package-info.java b/src/main/java/org/htmlunit/html/serializer/package-info.java index 040d6ac6e07..bf893024405 100644 --- a/src/main/java/org/htmlunit/html/serializer/package-info.java +++ b/src/main/java/org/htmlunit/html/serializer/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/xpath/HtmlUnitPrefixResolver.java b/src/main/java/org/htmlunit/html/xpath/HtmlUnitPrefixResolver.java index 46fe6e3feda..824f7a3d240 100644 --- a/src/main/java/org/htmlunit/html/xpath/HtmlUnitPrefixResolver.java +++ b/src/main/java/org/htmlunit/html/xpath/HtmlUnitPrefixResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/html/xpath/XPathAdapter.java b/src/main/java/org/htmlunit/html/xpath/XPathAdapter.java index cf0b7497e3e..203c0cc72da 100644 --- a/src/main/java/org/htmlunit/html/xpath/XPathAdapter.java +++ b/src/main/java/org/htmlunit/html/xpath/XPathAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,14 +45,6 @@ private enum STATE { } private final Expression mainExp_; - private FunctionTable funcTable_; - - /** - * Initiates the function table. - */ - private void initFunctionTable() { - funcTable_ = new FunctionTable(); - } /** * Constructor. @@ -64,11 +56,9 @@ private void initFunctionTable() { public XPathAdapter(final String exprString, final PrefixResolver prefixResolver, final boolean caseSensitive) throws TransformerException { - initFunctionTable(); - final ErrorListener errorHandler = new DefaultErrorHandler(); final XPathParser parser = new XPathParser(errorHandler); - final Compiler compiler = new Compiler(errorHandler, funcTable_); + final Compiler compiler = new Compiler(errorHandler, new FunctionTable()); final String expression = preProcessXPath(exprString, caseSensitive); parser.initXPath(compiler, expression, prefixResolver); diff --git a/src/main/java/org/htmlunit/html/xpath/XPathHelper.java b/src/main/java/org/htmlunit/html/xpath/XPathHelper.java index cd608257e39..881058edc74 100644 --- a/src/main/java/org/htmlunit/html/xpath/XPathHelper.java +++ b/src/main/java/org/htmlunit/html/xpath/XPathHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -92,6 +92,14 @@ public static List getByXPath(final DomNode contextNode, final String xpa } } + /** + * @param the type of nodes expected + * @param node the start node + * @param xpath the {@link XPathAdapter} to search for + * @param prefixResolver the {@link PrefixResolver} to be used + * @return a list of nodes matching the given xpath + * @throws TransformerException in case of error + */ public static List getByXPath(final Node node, final XPathAdapter xpath, final PrefixResolver prefixResolver) throws TransformerException { final List list = new ArrayList<>(); @@ -104,7 +112,8 @@ public static List getByXPath(final Node node, final XPathAdapter xpath, if (result instanceof XNodeSet) { final NodeList nodelist = result.nodelist(); - for (int i = 0; i < nodelist.getLength(); i++) { + final int length = nodelist.getLength(); + for (int i = 0; i < length; i++) { list.add((T) nodelist.item(i)); } } diff --git a/src/main/java/org/htmlunit/html/xpath/package-info.java b/src/main/java/org/htmlunit/html/xpath/package-info.java index 74e1b478cc0..e399cdcf4ab 100644 --- a/src/main/java/org/htmlunit/html/xpath/package-info.java +++ b/src/main/java/org/htmlunit/html/xpath/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/http/HttpStatus.java b/src/main/java/org/htmlunit/http/HttpStatus.java index 1533561f77d..436141565eb 100644 --- a/src/main/java/org/htmlunit/http/HttpStatus.java +++ b/src/main/java/org/htmlunit/http/HttpStatus.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/http/HttpUtils.java b/src/main/java/org/htmlunit/http/HttpUtils.java index fa6cf9de713..34d357f9c2b 100644 --- a/src/main/java/org/htmlunit/http/HttpUtils.java +++ b/src/main/java/org/htmlunit/http/HttpUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -293,7 +293,7 @@ private HttpUtils() { * @param buf buffer with the sequence of chars to be parsed * @param range defines the bounds and current position of the buffer * @param delimiters set of delimiting characters. Can be {@code null} if the token - * is not delimited by any character. + * is not delimited by any character. */ private static String parseToken(final String buf, final ParseRange range, final BitSet delimiters) { final StringBuilder dst = new StringBuilder(); @@ -345,7 +345,7 @@ private static void skipWhiteSpace(final String buf, final ParseRange range) { * @param buf buffer with the sequence of chars to be parsed * @param range defines the bounds and current position of the buffer * @param delimiters set of delimiting characters. Can be {@code null} if the value - * is delimited by a whitespace only. + * is delimited by a whitespace only. * @param dst destination buffer */ private static void copyContent(final String buf, final ParseRange range, diff --git a/src/main/java/org/htmlunit/http/package-info.java b/src/main/java/org/htmlunit/http/package-info.java index 58526dc5f98..b9e197f8bc5 100644 --- a/src/main/java/org/htmlunit/http/package-info.java +++ b/src/main/java/org/htmlunit/http/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitBrowserCompatCookieHeaderValueFormatter.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitBrowserCompatCookieHeaderValueFormatter.java index 89718701242..0b0e8b2eac4 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitBrowserCompatCookieHeaderValueFormatter.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitBrowserCompatCookieHeaderValueFormatter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitBrowserCompatCookieSpec.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitBrowserCompatCookieSpec.java index 77ca3918c30..fce1220057f 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitBrowserCompatCookieSpec.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitBrowserCompatCookieSpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -223,7 +223,8 @@ public List

formatCookies(final List cookies) { final CharArrayBuffer buffer = new CharArrayBuffer(20 * cookies.size()); buffer.append(SM.COOKIE); buffer.append(": "); - for (int i = 0; i < cookies.size(); i++) { + final int size = cookies.size(); + for (int i = 0; i < size; i++) { final Cookie cookie = cookies.get(i); if (i > 0) { buffer.append("; "); diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitCookieSpecProvider.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitCookieSpecProvider.java index 41063f6e0d6..35b6a5bce37 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitCookieSpecProvider.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitCookieSpecProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitCookieStore.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitCookieStore.java index 79cdac2a5d4..dd371bb1f70 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitCookieStore.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitCookieStore.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitDomainHandler.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitDomainHandler.java index b8d0c0c8cbc..9340bdd8a0d 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitDomainHandler.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitDomainHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitExpiresHandler.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitExpiresHandler.java index b23bc40a79a..733632c4e33 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitExpiresHandler.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitExpiresHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitHttpOnlyHandler.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitHttpOnlyHandler.java index b4cd18ca563..ea38eba236c 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitHttpOnlyHandler.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitHttpOnlyHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitMaxAgeHandler.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitMaxAgeHandler.java index 063819cd62e..c49d93eb27f 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitMaxAgeHandler.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitMaxAgeHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitPathHandler.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitPathHandler.java index 40773ec4676..ec1385557a1 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitPathHandler.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitPathHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitRedirectStrategie.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitRedirectStrategie.java index 24bbed61091..48f930f9f83 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitRedirectStrategie.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitRedirectStrategie.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitSSLConnectionSocketFactory.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitSSLConnectionSocketFactory.java index 6fab8d69698..b98582cc863 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitSSLConnectionSocketFactory.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitSSLConnectionSocketFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitSameSiteHandler.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitSameSiteHandler.java index 3123dadca5f..f9fb0fe5485 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitSameSiteHandler.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitSameSiteHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitSecureHandler.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitSecureHandler.java index beda0515837..dfd8e8055f4 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitSecureHandler.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitSecureHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitUsernamePasswordCredentials.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitUsernamePasswordCredentials.java index 4502bcbc49d..a4095db56b1 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitUsernamePasswordCredentials.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitUsernamePasswordCredentials.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HtmlUnitVersionAttributeHandler.java b/src/main/java/org/htmlunit/httpclient/HtmlUnitVersionAttributeHandler.java index 5026a3a8626..4fc36c0f1ed 100644 --- a/src/main/java/org/htmlunit/httpclient/HtmlUnitVersionAttributeHandler.java +++ b/src/main/java/org/htmlunit/httpclient/HtmlUnitVersionAttributeHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/HttpClientConverter.java b/src/main/java/org/htmlunit/httpclient/HttpClientConverter.java index 45b626c082b..9a7a9562f26 100644 --- a/src/main/java/org/htmlunit/httpclient/HttpClientConverter.java +++ b/src/main/java/org/htmlunit/httpclient/HttpClientConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,16 +16,12 @@ import java.net.MalformedURLException; import java.net.URL; -import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Collection; -import java.util.Date; import java.util.List; import java.util.Set; import org.apache.http.NoHttpResponseException; -import org.apache.http.client.utils.DateUtils; -import org.apache.http.client.utils.URLEncodedUtils; import org.apache.http.cookie.ClientCookie; import org.apache.http.cookie.Cookie; import org.apache.http.cookie.CookieOrigin; @@ -35,8 +31,6 @@ import org.apache.http.message.BufferedHeader; import org.apache.http.util.CharArrayBuffer; import org.htmlunit.BrowserVersion; -import org.htmlunit.http.HttpStatus; -import org.htmlunit.http.HttpUtils; import org.htmlunit.util.NameValuePair; import org.htmlunit.util.UrlUtils; @@ -47,84 +41,6 @@ */ public final class HttpClientConverter { - /** Forwarder to HttpStatus.SC_OK. - * @deprecated as of version 4.1.0; use {@link HttpStatus#OK_200} instead - */ - @Deprecated - public static final int OK = org.apache.http.HttpStatus.SC_OK; - - /** Forwarder to HttpStatus.SC_NO_CONTENT. - * @deprecated as of version 4.1.0; use {@link HttpStatus#NO_CONTENT_204} instead - */ - @Deprecated - public static final int NO_CONTENT = org.apache.http.HttpStatus.SC_NO_CONTENT; - - /** Forwarder to HttpStatus.MULTIPLE_CHOICES. - * @deprecated as of version 4.1.0; use {@link HttpStatus#MULTIPLE_CHOICES_300} instead - */ - @Deprecated - public static final int MULTIPLE_CHOICES = org.apache.http.HttpStatus.SC_MULTIPLE_CHOICES; - - /** Forwarder to HttpStatus.MOVED_PERMANENTLY. - * @deprecated as of version 4.1.0; use {@link HttpStatus#MOVED_PERMANENTLY_301} instead - */ - @Deprecated - public static final int MOVED_PERMANENTLY = org.apache.http.HttpStatus.SC_MOVED_PERMANENTLY; - - /** Forwarder to HttpStatus.MOVED_TEMPORARILY. - * @deprecated as of version 4.1.0; use {@link HttpStatus#FOUND_302} instead - */ - @Deprecated - public static final int MOVED_TEMPORARILY = org.apache.http.HttpStatus.SC_MOVED_TEMPORARILY; - - /** Forwarder to HttpStatus.SEE_OTHER. - * @deprecated as of version 4.1.0; use {@link HttpStatus#SEE_OTHER_303} instead - */ - @Deprecated - public static final int SEE_OTHER = org.apache.http.HttpStatus.SC_SEE_OTHER; - - /** Forwarder to HttpStatus.TEMPORARY_REDIRECT. - * @deprecated as of version 4.1.0; use {@link HttpStatus#TEMPORARY_REDIRECT_307} instead - */ - @Deprecated - public static final int TEMPORARY_REDIRECT = org.apache.http.HttpStatus.SC_TEMPORARY_REDIRECT; - - /** 308. - * @deprecated as of version 4.1.0; use {@link HttpStatus#PERMANENT_REDIRECT_308} instead - */ - @Deprecated - public static final int PERMANENT_REDIRECT = 308; - - /** Forwarder to HttpStatus.NOT_MODIFIED. - * @deprecated as of version 4.1.0; use {@link HttpStatus#NOT_MODIFIED_304} instead - */ - @Deprecated - public static final int NOT_MODIFIED = org.apache.http.HttpStatus.SC_NOT_MODIFIED; - - /** Forwarder to HttpStatus.SC_USE_PROXY. - * @deprecated as of version 4.1.0; use {@link HttpStatus#USE_PROXY_305} instead - */ - @Deprecated - public static final int USE_PROXY = org.apache.http.HttpStatus.SC_USE_PROXY; - - /** Forwarder to HttpStatus.SC_FORBIDDEN. - * @deprecated as of version 4.1.0; use {@link HttpStatus#FORBIDDEN_403} instead - */ - @Deprecated - public static final int FORBIDDEN = org.apache.http.HttpStatus.SC_FORBIDDEN; - - /** Forwarder to HttpStatus.SC_NOT_FOUND. - * @deprecated as of version 4.1.0; use {@link HttpStatus#NOT_FOUND_404} instead - */ - @Deprecated - public static final int NOT_FOUND = org.apache.http.HttpStatus.SC_NOT_FOUND; - - /** Forwarder to HttpStatus.SC_INTERNAL_SERVER_ERROR. - * @deprecated as of version 4.1.0; use {@link HttpStatus#INTERNAL_SERVER_ERROR_500} instead - */ - @Deprecated - public static final int INTERNAL_SERVER_ERROR = org.apache.http.HttpStatus.SC_INTERNAL_SERVER_ERROR; - private HttpClientConverter() { // util class } @@ -142,67 +58,6 @@ public static List nameValuePairsToHttpClient(fin return resultingPairs; } - /** - * Parses url query into name/value pairs using methods from HttpClient. - * @param query the urlencoded query - * @param charset the charset or null (defaulting to utf-8) - * @return the name/value pairs - * - * @deprecated as of version 4.1.0; use {@link HttpUtils#parseUrlQuery(String, Charset)} instead - */ - @Deprecated - public static List parseUrlQuery(final String query, final Charset charset) { - final List pairs = URLEncodedUtils.parse(query, charset); - - final List resultingPairs = new ArrayList<>(); - for (final org.apache.http.NameValuePair pair : pairs) { - resultingPairs.add(new NameValuePair(pair.getName(), pair.getValue())); - } - return resultingPairs; - } - - /** - * @param parameters the paramters - * @param enc the charset - * @return the query string from the given parameters - * - * @deprecated as of version 4.1.0; use {@link HttpUtils#toQueryFormFields(Iterable, Charset)} instead - */ - @Deprecated - public static String toQueryFormFields(final List parameters, final Charset enc) { - return URLEncodedUtils.format(nameValuePairsToHttpClient(parameters), enc); - } - - /** - * Parses the specified date string, assuming that it is formatted according to RFC 1123, RFC 1036 or as an ANSI - * C HTTP date header. This method returns {@code null} if the specified string is {@code null} or unparseable. - * - * @param s the string to parse as a date - * @return the date version of the specified string, or {@code null} - * - * @deprecated as of version 4.1.0; use {@link HttpUtils#parseDate(String)} instead - */ - @Deprecated - public static Date parseHttpDate(final String s) { - if (s == null) { - return null; - } - return DateUtils.parseDate(s); - } - - /** - * Formats the given date according to the RFC 1123 pattern. - * - * @param date The date to format. - * @return An RFC 1123 formatted date string. - * - * @deprecated as of version 4.1.0; use {@link HttpUtils#parseDate(String)} instead - */ - @Deprecated - public static String formatDate(final Date date) { - return DateUtils.formatDate(date); - } - /** * @param e the exception to check * @return true if the provided Exception is na {@link NoHttpResponseException} @@ -254,6 +109,13 @@ public static URL replaceForCookieIfNecessary(URL url) { return url; } + /** + * @param cookieString the string to parse + * @param pageUrl the page url as root + * @param browserVersion the {@link BrowserVersion} + * @return a list of {@link org.htmlunit.util.Cookie}'s + * @throws MalformedCookieException in case the cookie does not conform to the spec + */ public static List parseCookie(final String cookieString, final URL pageUrl, final BrowserVersion browserVersion) throws MalformedCookieException { @@ -298,6 +160,13 @@ public static List fromHttpClient(final List c return list; } + /** + * Adds all matching cookies to the provided set. + * @param cookies the cookies to select from + * @param normalizedUrl the url to match against + * @param browserVersion the {@link BrowserVersion} + * @param matches the set to add + */ public static void addMatching(final Set cookies, final URL normalizedUrl, final BrowserVersion browserVersion, final Set matches) { diff --git a/src/main/java/org/htmlunit/httpclient/HttpDelete.java b/src/main/java/org/htmlunit/httpclient/HttpDelete.java index 5463dfb1743..3f9d2a671d5 100644 --- a/src/main/java/org/htmlunit/httpclient/HttpDelete.java +++ b/src/main/java/org/htmlunit/httpclient/HttpDelete.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,10 +25,17 @@ */ public class HttpDelete extends HttpEntityEnclosingRequestBase { + /** + * Ctor. + */ public HttpDelete() { super(); } + /** + * Ctor. + * @param uri the uri + */ public HttpDelete(final URI uri) { super(); setURI(uri); diff --git a/src/main/java/org/htmlunit/httpclient/HttpOptions.java b/src/main/java/org/htmlunit/httpclient/HttpOptions.java index 723fa53afa3..0b643b8ac96 100644 --- a/src/main/java/org/htmlunit/httpclient/HttpOptions.java +++ b/src/main/java/org/htmlunit/httpclient/HttpOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,10 +25,17 @@ */ public class HttpOptions extends HttpEntityEnclosingRequestBase { + /** + * Ctor. + */ public HttpOptions() { super(); } + /** + * Ctor. + * @param uri the uri + */ public HttpOptions(final URI uri) { super(); setURI(uri); diff --git a/src/main/java/org/htmlunit/httpclient/SocksConnectionSocketFactory.java b/src/main/java/org/htmlunit/httpclient/SocksConnectionSocketFactory.java index 0821abd4099..e71a68a4383 100644 --- a/src/main/java/org/htmlunit/httpclient/SocksConnectionSocketFactory.java +++ b/src/main/java/org/htmlunit/httpclient/SocksConnectionSocketFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/httpclient/package-info.java b/src/main/java/org/htmlunit/httpclient/package-info.java index 6ecc919c21c..a2147c5928d 100644 --- a/src/main/java/org/htmlunit/httpclient/package-info.java +++ b/src/main/java/org/htmlunit/httpclient/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/javascript/AbstractJavaScriptEngine.java b/src/main/java/org/htmlunit/javascript/AbstractJavaScriptEngine.java index 1a36e9ecbc4..29a558c6080 100644 --- a/src/main/java/org/htmlunit/javascript/AbstractJavaScriptEngine.java +++ b/src/main/java/org/htmlunit/javascript/AbstractJavaScriptEngine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/javascript/DebugFrameAdapter.java b/src/main/java/org/htmlunit/javascript/DebugFrameAdapter.java index 9322c33abd4..99bbe72727a 100644 --- a/src/main/java/org/htmlunit/javascript/DebugFrameAdapter.java +++ b/src/main/java/org/htmlunit/javascript/DebugFrameAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/javascript/DebugFrameImpl.java b/src/main/java/org/htmlunit/javascript/DebugFrameImpl.java index a67a6441683..dbfa9d33993 100644 --- a/src/main/java/org/htmlunit/javascript/DebugFrameImpl.java +++ b/src/main/java/org/htmlunit/javascript/DebugFrameImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/javascript/DebuggerAdapter.java b/src/main/java/org/htmlunit/javascript/DebuggerAdapter.java index 7d53f77c97a..f1434b77ec0 100644 --- a/src/main/java/org/htmlunit/javascript/DebuggerAdapter.java +++ b/src/main/java/org/htmlunit/javascript/DebuggerAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/javascript/DebuggerImpl.java b/src/main/java/org/htmlunit/javascript/DebuggerImpl.java index 716a619eb0c..ef35f99e8b0 100644 --- a/src/main/java/org/htmlunit/javascript/DebuggerImpl.java +++ b/src/main/java/org/htmlunit/javascript/DebuggerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/javascript/DefaultJavaScriptErrorListener.java b/src/main/java/org/htmlunit/javascript/DefaultJavaScriptErrorListener.java index 9dff512805d..10124fabc8d 100644 --- a/src/main/java/org/htmlunit/javascript/DefaultJavaScriptErrorListener.java +++ b/src/main/java/org/htmlunit/javascript/DefaultJavaScriptErrorListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/javascript/FunctionWrapper.java b/src/main/java/org/htmlunit/javascript/FunctionWrapper.java index 87f4e699086..0313778f880 100644 --- a/src/main/java/org/htmlunit/javascript/FunctionWrapper.java +++ b/src/main/java/org/htmlunit/javascript/FunctionWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/javascript/HtmlUnitContextFactory.java b/src/main/java/org/htmlunit/javascript/HtmlUnitContextFactory.java index e13a903f9a0..1926f59b5e2 100644 --- a/src/main/java/org/htmlunit/javascript/HtmlUnitContextFactory.java +++ b/src/main/java/org/htmlunit/javascript/HtmlUnitContextFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,12 +18,14 @@ import static org.htmlunit.BrowserVersionFeatures.JS_PROPERTY_DESCRIPTOR_NAME; import java.io.Serializable; +import java.util.function.Consumer; import org.htmlunit.BrowserVersion; import org.htmlunit.ScriptException; import org.htmlunit.ScriptPreProcessor; import org.htmlunit.WebClient; import org.htmlunit.corejs.javascript.Callable; +import org.htmlunit.corejs.javascript.CompilerEnvirons; import org.htmlunit.corejs.javascript.Context; import org.htmlunit.corejs.javascript.ContextAction; import org.htmlunit.corejs.javascript.ContextFactory; @@ -32,12 +34,10 @@ import org.htmlunit.corejs.javascript.EvaluatorException; import org.htmlunit.corejs.javascript.Function; import org.htmlunit.corejs.javascript.Script; -import org.htmlunit.corejs.javascript.ScriptRuntime; import org.htmlunit.corejs.javascript.Scriptable; import org.htmlunit.corejs.javascript.debug.Debugger; import org.htmlunit.html.HtmlElement; import org.htmlunit.html.HtmlPage; -import org.htmlunit.javascript.regexp.HtmlUnitRegExpProxy; /** * ContextFactory that supports termination of scripts if they exceed a timeout. Based on example from @@ -156,7 +156,8 @@ public void terminateScriptIfNecessary() { @Override protected Script compileString(String source, final Evaluator compiler, final ErrorReporter compilationErrorReporter, final String sourceName, - final int lineno, final Object securityDomain) { + final int lineno, final Object securityDomain, + final Consumer compilerEnvironsProcessor) { // this method gets called by Context.compileString and by ScriptRuntime.evalSpecial // which is used for window.eval. We have to take care in which case we are. @@ -192,7 +193,7 @@ protected Script compileString(String source, final Evaluator compiler, source = preProcess(page, source, sourceName, lineno, null); return super.compileString(source, compiler, compilationErrorReporter, - sourceName, lineno, securityDomain); + sourceName, lineno, securityDomain, compilerEnvironsProcessor); } @Override @@ -252,7 +253,7 @@ protected Context makeContext() { cx.setClassShutter(fullClassName -> false); // Use pure interpreter mode to get observeInstructionCount() callbacks. - cx.setOptimizationLevel(-1); + cx.setInterpretedMode(true); // Set threshold on how often we want to receive the callbacks cx.setInstructionObserverThreshold(INSTRUCTION_COUNT_THRESHOLD); @@ -265,9 +266,6 @@ protected Context makeContext() { cx.setDebugger(debugger_, null); } - // register custom RegExp processing - ScriptRuntime.setRegExpProxy(cx, new HtmlUnitRegExpProxy(ScriptRuntime.getRegExpProxy(cx))); - cx.setMaximumInterpreterStackDepth(5_000); return cx; @@ -341,8 +339,6 @@ protected boolean hasFeature(final Context cx, final int featureIndex) { return true; case Context.FEATURE_HTMLUNIT_FN_ARGUMENTS_IS_RO_VIEW: return true; - case Context.FEATURE_HTMLUNIT_FUNCTION_DECLARED_FORWARD_IN_BLOCK: - return true; case Context.FEATURE_HTMLUNIT_MEMBERBOX_NAME: return browserVersion_.hasFeature(JS_PROPERTY_DESCRIPTOR_NAME); case Context.FEATURE_HTMLUNIT_ARRAY_SORT_COMPERATOR_ACCEPTS_BOOL: diff --git a/src/main/java/org/htmlunit/javascript/HtmlUnitScriptable.java b/src/main/java/org/htmlunit/javascript/HtmlUnitScriptable.java index f7eba4f944c..608f982b3e0 100644 --- a/src/main/java/org/htmlunit/javascript/HtmlUnitScriptable.java +++ b/src/main/java/org/htmlunit/javascript/HtmlUnitScriptable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -109,7 +109,7 @@ public void put(final String name, final Scriptable start, final Object value) { } catch (final IllegalArgumentException e) { // is it the right place or should Rhino throw a RuntimeError instead of an IllegalArgumentException? - throw JavaScriptEngine.reportRuntimeError("'set " + throw JavaScriptEngine.typeError("'set " + name + "' called on an object that does not implement interface " + getClassName()); } } @@ -117,22 +117,17 @@ public void put(final String name, final Scriptable start, final Object value) { /** * Gets a named property from the object. * Normally HtmlUnit objects don't need to overwrite this method as properties are defined - * on the prototypes from the XML configuration. In some cases where "content" of object + * on the prototypes. In some cases where "content" of object * has priority compared to the properties consider using utility {@link #getWithPreemption(String)}. + * * {@inheritDoc} */ @Override public Object get(final String name, final Scriptable start) { // Try to get property configured on object itself. - Object response = super.get(name, start); - if (response != NOT_FOUND) { - return response; - } - if (this == start) { - response = getWithPreemption(name); - } - if (response == NOT_FOUND && start instanceof Window) { - response = ((Window) start).getWithFallback(name); + final Object response = super.get(name, start); + if (response == NOT_FOUND && this == start) { + return getWithPreemption(name); } return response; } diff --git a/src/main/java/org/htmlunit/javascript/HtmlUnitScriptableProxy.java b/src/main/java/org/htmlunit/javascript/HtmlUnitScriptableProxy.java index 32bb6a37384..60d3bb07e29 100644 --- a/src/main/java/org/htmlunit/javascript/HtmlUnitScriptableProxy.java +++ b/src/main/java/org/htmlunit/javascript/HtmlUnitScriptableProxy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java b/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java index 87cb90feb54..5c45d6e45d6 100644 --- a/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java +++ b/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,6 @@ import org.htmlunit.corejs.javascript.EcmaError; import org.htmlunit.corejs.javascript.Function; import org.htmlunit.corejs.javascript.FunctionObject; -import org.htmlunit.corejs.javascript.Interpreter; import org.htmlunit.corejs.javascript.JavaScriptException; import org.htmlunit.corejs.javascript.NativeArray; import org.htmlunit.corejs.javascript.NativeArrayIterator; @@ -104,7 +103,7 @@ * @author Sven Strickroth * * @see - * Rhino and Java Browser + * Rhino and Java Browser */ public class JavaScriptEngine implements AbstractJavaScriptEngine\n" + "\n" @@ -220,8 +212,7 @@ public void acceptHeaderJavascript() throws Exception { @Test @Alerts("Accept: */*") public void acceptHeaderJavascriptWithoutType() throws Exception { - final String html - = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + " \n" + "\n" @@ -240,8 +231,7 @@ public void acceptHeaderJavascriptWithoutType() throws Exception { @Test @Alerts("Accept: text/css,*/*;q=0.1") public void acceptHeaderCssWithoutType() throws Exception { - final String html - = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + " \n" + "\n" + "\n" + "\n" + "to page 2\n" + ""; - final String content2 = "page 2\n" + final String content2 = DOCTYPE_HTML + + "page 2\n" + "\n" + "\n" + "to page 1\n" @@ -235,11 +264,12 @@ public void usage() throws Exception { } /** - *@throws Exception if the test fails + * @throws Exception if the test fails */ @Test public void jsUrlEncoded() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + " page 1\n" + " \n" @@ -250,7 +280,8 @@ public void jsUrlEncoded() throws Exception { + "\n" + ""; - final String content2 = "\n" + final String content2 = DOCTYPE_HTML + + "\n" + "\n" + " page 2\n" + " \n" @@ -292,11 +323,12 @@ public void jsUrlEncoded() throws Exception { } /** - *@throws Exception if the test fails + * @throws Exception if the test fails */ @Test public void cssUrlEncoded() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + " page 1\n" + " \n" @@ -315,7 +347,8 @@ public void cssUrlEncoded() throws Exception { + "\n" + ""; - final String content2 = "\n" + final String content2 = DOCTYPE_HTML + + "\n" + "\n" + " page 2\n" + " \n" @@ -362,11 +395,12 @@ public void cssUrlEncoded() throws Exception { } /** - *@throws Exception if the test fails + * @throws Exception if the test fails */ @Test public void maxSizeMaintained() throws Exception { - final String html = "page 1\n" + final String html = DOCTYPE_HTML + + "page 1\n" + "\n" + "\n" + ""; @@ -581,7 +587,8 @@ public void domainDuplicateLeadingDot() throws Exception { */ @Test public void domainDuplicateLeadingDotSend() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "next page\n" + ""; @@ -608,7 +615,8 @@ public void domainDuplicateLeadingDotSend() throws Exception { */ @Test public void domainDuplicateLeadingDotRedirect() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "next page\n" + ""; @@ -647,7 +655,8 @@ public void domain2() throws Exception { responseHeader1.add(new NameValuePair("Set-Cookie", "c4=4; Domain=" + DOMAIN + "; Path=/")); responseHeader1.add(new NameValuePair("Set-Cookie", "c5=5; Domain=.org; Path=/")); - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "

Cookie Domain Test

\n" @@ -678,7 +687,8 @@ public void domain3() throws Exception { responseHeader1.add(new NameValuePair("Set-Cookie", "c4=4; Domain=" + DOMAIN + "; Path=/")); responseHeader1.add(new NameValuePair("Set-Cookie", "c5=5; Domain=.org; Path=/")); - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "

Cookie Domain Test

\n" @@ -705,7 +715,8 @@ public void differentHostsSameDomain() throws Exception { final List responseHeader1 = new ArrayList<>(); responseHeader1.add(new NameValuePair("Set-Cookie", "cross-domain=1; Domain=." + DOMAIN + "; Path=/")); - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "

Cookie Domain Test

\n" @@ -729,7 +740,8 @@ public void differentHostsSameDomain() throws Exception { @Test @Alerts("cross-domain=1") public void differentHostsSameDomainCookieFromJS() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -755,7 +767,8 @@ public void differentHostsSameDomainCookieFromJS() throws Exception { @Test @Alerts("cross-domain=1") public void differentHostsSameDomainCookieFromMeta() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" @@ -947,7 +960,7 @@ public void sameSiteIncludeFromSameDomain() throws Exception { responseHeader.add(new NameValuePair("Set-Cookie", "c4=empty; SameSite=")); responseHeader.add(new NameValuePair("Set-Cookie", "c5=unknown; SameSite=unknown")); - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + " \n" + "\n" @@ -1002,7 +1015,7 @@ public void sameSiteIncludeFromSubDomain() throws Exception { responseHeader.add(new NameValuePair("Set-Cookie", "c4=empty; SameSite=")); responseHeader.add(new NameValuePair("Set-Cookie", "c5=unknown; SameSite=unknown")); - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + " \n" + "\n" @@ -1057,7 +1070,7 @@ public void sameSiteIFrameFromSameDomain() throws Exception { responseHeader.add(new NameValuePair("Set-Cookie", "c4=empty; SameSite=")); responseHeader.add(new NameValuePair("Set-Cookie", "c5=unknown; SameSite=unknown")); - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -1112,7 +1125,7 @@ public void sameSiteIFrameFromSubDomain() throws Exception { responseHeader.add(new NameValuePair("Set-Cookie", "c4=empty; SameSite=")); responseHeader.add(new NameValuePair("Set-Cookie", "c5=unknown; SameSite=unknown")); - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -1151,4 +1164,57 @@ public void sameSiteIFrameFromSubDomain() throws Exception { assertEquals("unknown", mgr.getCookie("c5").getSameSite()); } } + + /** + * Test for issue #270. + * @throws Exception in case of error + */ + @Test + @Alerts("JDSessionID=1234567890") + public void issue270() throws Exception { + final List responseHeader1 = new ArrayList<>(); + responseHeader1.add(new NameValuePair("Set-Cookie", "first=1; path=/c")); + + final String html = DOCTYPE_HTML + + "\n" + + "\n" + + "\n" + + ""; + + final URL firstUrl = new URL(URL_HOST1); + getMockWebConnection().setResponse(firstUrl, html); + loadPage2(html, firstUrl); + + loadPage2(HTML_ALERT_COOKIE, firstUrl); + verifyTitle2(getWebDriver(), getExpectedAlerts()); + } + + @Override + protected final WebDriver getWebDriver() { + final WebDriver driver = super.getWebDriver(); + if (driver instanceof HtmlUnitDriver) { + // set timeout to fail fast when the url not mapped + ((HtmlUnitDriver) driver).getWebClient().getOptions().setTimeout(1000); + } + + return driver; + } } diff --git a/src/test/java/org/htmlunit/CookieManager5Test.java b/src/test/java/org/htmlunit/CookieManager5Test.java index 79f49ea6873..8ee29b6f46f 100644 --- a/src/test/java/org/htmlunit/CookieManager5Test.java +++ b/src/test/java/org/htmlunit/CookieManager5Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,6 @@ import javax.servlet.http.HttpServletResponse; import org.apache.http.client.utils.DateUtils; -import org.htmlunit.html.HtmlPageTest; import org.htmlunit.junit.BrowserRunner; import org.htmlunit.util.Cookie; import org.htmlunit.util.MimeType; @@ -43,6 +42,9 @@ @RunWith(BrowserRunner.class) public class CookieManager5Test extends WebServerTestCase { + /** + * @throws Exception if an error occurs + */ @Test public void sameDomainWithClientCookie() throws Exception { final List headers = new ArrayList<>(); @@ -64,6 +66,9 @@ public void sameDomainWithClientCookie() throws Exception { } } + /** + * @throws Exception if an error occurs + */ @Test public void unqualifiedHostWithClientCookie() throws Exception { final List headers = new ArrayList<>(); @@ -85,6 +90,9 @@ public void unqualifiedHostWithClientCookie() throws Exception { } } + /** + * @throws Exception if an error occurs + */ @Test public void subdomainWithClientCookie() throws Exception { final List headers = new ArrayList<>(); @@ -106,6 +114,9 @@ public void subdomainWithClientCookie() throws Exception { } } + /** + * @throws Exception if an error occurs + */ @Test public void differentSubdomainWithClientCookie() throws Exception { final List headers = new ArrayList<>(); @@ -172,23 +183,32 @@ public void updateCookieExpires() throws Exception { servlets.put(SetCookieExpires1000Servlet.URL, SetCookieExpires1000Servlet.class); startWebServer("./", null, servlets); - final WebClient webClient = getWebClient(); - webClient.getPage("http://localhost:" + PORT + SetCookieExpires10Servlet.URL); - assertEquals(1, webClient.getCookieManager().getCookies().size()); - Cookie cookie = webClient.getCookieManager().getCookies().iterator().next(); - assertFalse("" + cookie.getExpires(), cookie.getExpires().after(date)); + try (WebClient webClient = getWebClient()) { + webClient.getPage("http://localhost:" + PORT + SetCookieExpires10Servlet.URL); + assertEquals(1, webClient.getCookieManager().getCookies().size()); + Cookie cookie = webClient.getCookieManager().getCookies().iterator().next(); + assertFalse("" + cookie.getExpires(), cookie.getExpires().after(date)); + + webClient.getPage("http://localhost:" + PORT + SetCookieExpires1000Servlet.URL); + assertEquals(1, webClient.getCookieManager().getCookies().size()); + cookie = webClient.getCookieManager().getCookies().iterator().next(); + assertTrue("" + cookie.getExpires(), cookie.getExpires().after(date)); + } + } - webClient.getPage("http://localhost:" + PORT + SetCookieExpires1000Servlet.URL); - assertEquals(1, webClient.getCookieManager().getCookies().size()); - cookie = webClient.getCookieManager().getCookies().iterator().next(); - assertTrue("" + cookie.getExpires(), cookie.getExpires().after(date)); + @Override + protected WebClient getWebClient() { + final WebClient webClient = super.getWebClient(); + // set timeout to fail fast when the url not mapped + webClient.getOptions().setTimeout(1000); + return webClient; } /** * Helper class for {@link #updateCookieExpires}. */ public abstract static class SetCookieExpiresServlet extends HttpServlet { - private static final String HTML_ = HtmlPageTest.STANDARDS_MODE_PREFIX_ + private static final String HTML_ = DOCTYPE_HTML + "\n" + "\n" + ""; diff --git a/src/test/java/org/htmlunit/CookieManagerTest.java b/src/test/java/org/htmlunit/CookieManagerTest.java index bc82c12763c..34e9665b7b2 100644 --- a/src/test/java/org/htmlunit/CookieManagerTest.java +++ b/src/test/java/org/htmlunit/CookieManagerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,9 +24,8 @@ import java.util.Map; import org.apache.http.client.utils.DateUtils; -import org.htmlunit.html.HtmlPageTest; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.htmlunit.util.MimeType; import org.htmlunit.util.NameValuePair; import org.junit.Test; @@ -48,8 +47,7 @@ public class CookieManagerTest extends WebDriverTestCase { /** HTML code with JS code alert(document.cookie). */ - public static final String HTML_ALERT_COOKIE - = HtmlPageTest.STANDARDS_MODE_PREFIX_ + public static final String HTML_ALERT_COOKIE = DOCTYPE_HTML + "\n" + "\n" @@ -303,7 +302,7 @@ public void setCookieExpired() throws Exception { @Test @Alerts({"cookies: first=1", "cookies: "}) public void setCookieTimeout() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" - + ""; - - final URL firstUrl = new URL("http://host1.htmlunit.org:" + PORT + "/"); - getMockWebConnection().setResponse(firstUrl, html); - loadPage2(html, firstUrl); - - loadPage2(HTML_ALERT_COOKIE, firstUrl); - verifyTitle2(getWebDriver(), getExpectedAlerts()); - } } diff --git a/src/test/java/org/htmlunit/DefaultCredentialsProvider2Test.java b/src/test/java/org/htmlunit/DefaultCredentialsProvider2Test.java index d3a8ff56164..e1b9ab8f10e 100644 --- a/src/test/java/org/htmlunit/DefaultCredentialsProvider2Test.java +++ b/src/test/java/org/htmlunit/DefaultCredentialsProvider2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import org.apache.logging.log4j.core.layout.PatternLayout; import org.htmlunit.html.HtmlPage; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -135,7 +135,7 @@ public void basicAuthentication_singleAuthenticaiton() throws Exception { @Test @Alerts("SecRet") public void basicAuthenticationUserFromUrl() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; getMockWebConnection().setDefaultResponse(html); getWebClient().getCredentialsProvider().clear(); @@ -184,7 +184,7 @@ public void basicAuthenticationUserFromUrl() throws Exception { @Test @Alerts("SecRet") public void basicAuthenticationUserFromUrlUsedForNextSteps() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; getMockWebConnection().setDefaultResponse(html); getWebClient().getCredentialsProvider().clear(); @@ -248,7 +248,7 @@ public void basicAuthenticationUserFromUrlUsedForNextSteps() throws Exception { @Test @Alerts("SecRet") public void basicAuthenticationUserFromUrlOverwrite() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; getMockWebConnection().setDefaultResponse(html); getWebClient().getCredentialsProvider().clear(); @@ -307,7 +307,7 @@ public void basicAuthenticationUserFromUrlOverwrite() throws Exception { @Test @Alerts("SecRet") public void basicAuthenticationUserFromUrlOverwriteDefaultCredentials() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; getMockWebConnection().setDefaultResponse(html); getWebClient().getCredentialsProvider().clear(); @@ -333,7 +333,7 @@ public void basicAuthenticationUserFromUrlOverwriteDefaultCredentials() throws E @Test @Alerts("SecRet") public void basicAuthenticationUserFromUrlOverwriteWrongDefaultCredentials() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; getMockWebConnection().setDefaultResponse(html); getWebClient().getCredentialsProvider().clear(); @@ -372,7 +372,8 @@ public void basicAuthenticationUserFromUrlOverwriteWrongDefaultCredentials() thr @Test @Alerts("Hello World") public void basicAuthenticationXHR() throws Exception { - final String html = ""; + String html = DOCTYPE_HTML + + ""; html = "HTTP/1.1 200 OK\r\n" + "Content-Length: " + (html.length()) + "\r\n" + "Content-Type: text/html\r\n" @@ -1142,7 +1151,8 @@ public void locationSetHref() throws Exception { "Sec-Fetch-User: ?1", "Priority: u=0, i"}) public void locationSetSearch() throws Exception { - String html = ""; + String html = DOCTYPE_HTML + + ""; html = "HTTP/1.1 200 OK\r\n" + "Content-Length: " + (html.length()) + "\r\n" + "Content-Type: text/html\r\n" @@ -1293,7 +1303,8 @@ public void locationSetSearch() throws Exception { "Sec-Fetch-User: ?1", /* wrong */ "Priority: u=0, i"}) public void loadJavascript() throws Exception { - String html = " "; + String html = DOCTYPE_HTML + + " "; html = "HTTP/1.1 200 OK\r\n" + "Content-Length: " + (html.length()) + "\r\n" + "Content-Type: text/html\r\n" @@ -1443,12 +1454,13 @@ public void loadJavascript() throws Exception { "Sec-Fetch-Site: same-origin", "Sec-Fetch-User: ?1", /* wrong */ "Priority: u=0, i"}) - // this fails on our CI but i have no idea why + // this fails on our CI but I have no idea why // seems like the request for downloading the script never reaches the // PrimitiveWebServer @NotYetImplemented(value = {}, os = OS.Linux) public void loadJavascriptCharset() throws Exception { - String html = "" + String html = DOCTYPE_HTML + + "" + "" + "" + ""; @@ -1479,6 +1491,18 @@ public void loadJavascriptCharset() throws Exception { expectedHeaders[i] = expectedHeaders[i].replaceAll("§§ACCEPT§§", getBrowserVersion().getScriptAcceptHeader()); } + + // let's try some wait on our CI server + final long endTime = System.currentTimeMillis() + Duration.ofSeconds(4).toMillis(); + while (primitiveWebServer.getRequests().size() < 1 + && System.currentTimeMillis() < endTime) { + Thread.sleep(100); + } + + if (primitiveWebServer.getRequests().size() < 2) { + Assert.fail("Still no request / request count:" + primitiveWebServer.getRequests().size()); + } + final String request = primitiveWebServer.getRequests().get(1); final String[] headers = request.split("\\r\\n"); assertEquals(Arrays.asList(expectedHeaders).toString(), Arrays.asList(headers).toString()); diff --git a/src/test/java/org/htmlunit/HttpWebConnectionInsecureSSLTest.java b/src/test/java/org/htmlunit/HttpWebConnectionInsecureSSLTest.java index cc622a7edbd..b62022bb4f9 100644 --- a/src/test/java/org/htmlunit/HttpWebConnectionInsecureSSLTest.java +++ b/src/test/java/org/htmlunit/HttpWebConnectionInsecureSSLTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/HttpWebConnectionInsecureSSLWithClientCertificateTest.java b/src/test/java/org/htmlunit/HttpWebConnectionInsecureSSLWithClientCertificateTest.java index 197fa70a0f4..3c7013da406 100644 --- a/src/test/java/org/htmlunit/HttpWebConnectionInsecureSSLWithClientCertificateTest.java +++ b/src/test/java/org/htmlunit/HttpWebConnectionInsecureSSLWithClientCertificateTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/HttpWebConnectionProxyTest.java b/src/test/java/org/htmlunit/HttpWebConnectionProxyTest.java index 84236df65dc..df47e09a647 100644 --- a/src/test/java/org/htmlunit/HttpWebConnectionProxyTest.java +++ b/src/test/java/org/htmlunit/HttpWebConnectionProxyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/HttpWebConnectionTest.java b/src/test/java/org/htmlunit/HttpWebConnectionTest.java index 9dd4f7a155c..21aec5c549f 100644 --- a/src/test/java/org/htmlunit/HttpWebConnectionTest.java +++ b/src/test/java/org/htmlunit/HttpWebConnectionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -292,7 +292,8 @@ public void emptyPut() throws Exception { public static class EmptyPutServlet extends ServletContentWrapper { /** Constructor. */ public EmptyPutServlet() { - super("\n" + super(DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/MiniServer.java b/src/test/java/org/htmlunit/MiniServer.java index a36cdc8d2ab..5f6e25c1bd5 100644 --- a/src/test/java/org/htmlunit/MiniServer.java +++ b/src/test/java/org/htmlunit/MiniServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,19 +58,35 @@ public class MiniServer extends Thread implements Closeable { private static final Set DROP_REQUESTS = new HashSet<>(); private static final Set DROP_GET_REQUESTS = new HashSet<>(); + /** + * Resets the drop and drop-get request counters. + */ public static void resetDropRequests() { DROP_REQUESTS.clear(); DROP_GET_REQUESTS.clear(); } + /** + * Add the given url to the list of drop requests. + * @param url to url to add + */ public static void configureDropRequest(final URL url) { DROP_REQUESTS.add(url); } + /** + * Add the given url to the list of drop-get requests. + * @param url to url to add + */ public static void configureDropGetRequest(final URL url) { DROP_GET_REQUESTS.add(url); } + /** + * Ctor. + * @param port the port to listen on + * @param mockWebConnection the {@link MockWebConnection} to get the responses from + */ public MiniServer(final int port, final MockWebConnection mockWebConnection) { port_ = port; mockWebConnection_ = mockWebConnection; @@ -211,6 +227,9 @@ else if ("POST".equalsIgnoreCase(methodText)) { } } + /** + * @return the last received request + */ public String getLastRequest() { return lastRequest_; } diff --git a/src/test/java/org/htmlunit/MockWebConnectionTest.java b/src/test/java/org/htmlunit/MockWebConnectionTest.java index 4b2784d7c82..547420d8214 100644 --- a/src/test/java/org/htmlunit/MockWebConnectionTest.java +++ b/src/test/java/org/htmlunit/MockWebConnectionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,8 @@ public class MockWebConnectionTest extends SimpleWebTestCase { */ @Test public void charset() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + " Pound Test\n" diff --git a/src/test/java/org/htmlunit/NiceRefreshHandlerTest.java b/src/test/java/org/htmlunit/NiceRefreshHandlerTest.java index de64339a37d..eb7ac4b2afd 100644 --- a/src/test/java/org/htmlunit/NiceRefreshHandlerTest.java +++ b/src/test/java/org/htmlunit/NiceRefreshHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,8 @@ public void noRefreshForDelayLargerThanMax() throws Exception { } private void doTest(final int handlerMaxDelay, final URL expectedUrl) throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "Meta Redirect Page\n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/NicelyResynchronizingAjaxControllerTest.java b/src/test/java/org/htmlunit/NicelyResynchronizingAjaxControllerTest.java index 9607ff8bbfa..91137f61f9e 100644 --- a/src/test/java/org/htmlunit/NicelyResynchronizingAjaxControllerTest.java +++ b/src/test/java/org/htmlunit/NicelyResynchronizingAjaxControllerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/NoHttpResponseTest.java b/src/test/java/org/htmlunit/NoHttpResponseTest.java index 1ef0df8478e..febe69294b1 100644 --- a/src/test/java/org/htmlunit/NoHttpResponseTest.java +++ b/src/test/java/org/htmlunit/NoHttpResponseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ import org.htmlunit.html.HtmlPage; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.After; import org.junit.Test; import org.junit.experimental.runners.Enclosed; @@ -60,6 +60,11 @@ public class NoHttpResponseTest { @RunWith(BrowserRunner.class) public static class WithWebDriverTest extends WebDriverTestCase { + /** + * Resets the {@link MiniServer}. + * + * @throws Exception in case of error + */ @After public void after() throws Exception { MiniServer.resetDropRequests(); @@ -79,7 +84,8 @@ public void submit() throws Exception { mockWebConnection.setResponse(URL_FIRST, HTML); MiniServer.configureDropRequest(new URL(URL_FIRST, "page2?textfield=")); final URL urlRightSubmit = new URL(URL_FIRST, "page2?textfield=new+value"); - mockWebConnection.setResponse(urlRightSubmit, "right submit"); + mockWebConnection.setResponse(urlRightSubmit, + DOCTYPE_HTML + "right submit"); expandExpectedAlertsVariables(URL_FIRST); final WebDriver driver = getWebDriver(); @@ -89,6 +95,9 @@ public void submit() throws Exception { driver.get(URL_FIRST.toString()); driver.findElement(By.id("inputSubmit")).click(); + if (useRealBrowser()) { + Thread.sleep(400); + } assertEquals(getExpectedAlerts()[0], driver.getCurrentUrl()); } catch (final WebDriverException e) { @@ -106,7 +115,8 @@ public void callSubmitInButtonAndReturnTrue() throws Exception { mockWebConnection.setResponse(URL_FIRST, HTML); MiniServer.configureDropRequest(new URL(URL_FIRST, "page2?textfield=")); final URL urlRightSubmit = new URL(URL_FIRST, "page2?textfield=new+value"); - mockWebConnection.setResponse(urlRightSubmit, "right submit"); + mockWebConnection.setResponse(urlRightSubmit, + DOCTYPE_HTML + "right submit"); final WebDriver driver = getWebDriver(); @@ -126,6 +136,11 @@ public void callSubmitInButtonAndReturnTrue() throws Exception { @RunWith(BrowserRunner.class) public static class WithWebClientTest extends SimpleWebTestCase { + /** + * Resets the {@link MiniServer}. + * + * @throws Exception in case of error + */ @After public void after() throws Exception { MiniServer.resetDropRequests(); @@ -140,7 +155,8 @@ public void submit() throws Throwable { mockWebConnection.setResponse(URL_FIRST, HTML); MiniServer.configureDropRequest(new URL(URL_FIRST, "page2?textfield=")); final URL urlRightSubmit = new URL(URL_FIRST, "page2?textfield=new+value"); - mockWebConnection.setResponse(urlRightSubmit, "right submit"); + mockWebConnection.setResponse(urlRightSubmit, + DOCTYPE_HTML + "right submit"); expandExpectedAlertsVariables(URL_FIRST); @@ -162,7 +178,8 @@ public void callSubmitInButtonAndReturnTrue() throws Throwable { mockWebConnection.setResponse(URL_FIRST, HTML); MiniServer.configureDropRequest(new URL(URL_FIRST, "page2?textfield=")); final URL urlRightSubmit = new URL(URL_FIRST, "page2?textfield=new+value"); - mockWebConnection.setResponse(urlRightSubmit, "right submit"); + mockWebConnection.setResponse(urlRightSubmit, + DOCTYPE_HTML + "right submit"); try (MiniServer miniServer = new MiniServer(PORT, mockWebConnection)) { miniServer.start(); diff --git a/src/test/java/org/htmlunit/NotYetImplementedTest.java b/src/test/java/org/htmlunit/NotYetImplementedTest.java index 4a86c5d829f..d16ebc43688 100644 --- a/src/test/java/org/htmlunit/NotYetImplementedTest.java +++ b/src/test/java/org/htmlunit/NotYetImplementedTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,6 +58,7 @@ private void process(final File dir) throws IOException { else { if (fileName.endsWith(".java") && !"SimpleWebTestCase.java".equals(fileName) + && !"AnnotationUtilsTest.java".equals(fileName) && !"NotYetImplementedTest.java".equals(fileName) && !"CodeStyleTest.java".equals(fileName)) { final List lines = FileUtils.readLines(file, ISO_8859_1); diff --git a/src/test/java/org/htmlunit/ObjectInstantiationExceptionTest.java b/src/test/java/org/htmlunit/ObjectInstantiationExceptionTest.java index 83486b76e4e..e393bfa3ced 100644 --- a/src/test/java/org/htmlunit/ObjectInstantiationExceptionTest.java +++ b/src/test/java/org/htmlunit/ObjectInstantiationExceptionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/PageReloadTest.java b/src/test/java/org/htmlunit/PageReloadTest.java index 0d2f1e7bb1c..1e7b5928cec 100644 --- a/src/test/java/org/htmlunit/PageReloadTest.java +++ b/src/test/java/org/htmlunit/PageReloadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import java.net.URL; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.By; @@ -1682,6 +1682,9 @@ private void openUrlAndClickById( // click driver.findElement(By.id(id)).click(); + if (useRealBrowser()) { + Thread.sleep(400); + } assertEquals(counterChange, getMockWebConnection().getRequestCount() - 1); // check location visible to javascript diff --git a/src/test/java/org/htmlunit/PrimitiveWebServer.java b/src/test/java/org/htmlunit/PrimitiveWebServer.java index 6100a8304a8..c56e1650ff3 100644 --- a/src/test/java/org/htmlunit/PrimitiveWebServer.java +++ b/src/test/java/org/htmlunit/PrimitiveWebServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/ScriptExceptionTest.java b/src/test/java/org/htmlunit/ScriptExceptionTest.java index f6534045ee1..540c93f0505 100644 --- a/src/test/java/org/htmlunit/ScriptExceptionTest.java +++ b/src/test/java/org/htmlunit/ScriptExceptionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ public final class ScriptExceptionTest extends SimpleWebTestCase { public void constructor() throws Exception { final String message = "bla bla"; final Throwable t = new RuntimeException(message); - final HtmlPage page = loadPage(""); + final HtmlPage page = loadPage(DOCTYPE_HTML + ""); final ScriptException exception = new ScriptException(page, t); assertEquals(t, exception.getCause()); @@ -54,7 +54,7 @@ public void constructor() throws Exception { */ @Test public void getPage() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; try { loadPage(html); } diff --git a/src/test/java/org/htmlunit/ScriptPreProcessorTest.java b/src/test/java/org/htmlunit/ScriptPreProcessorTest.java index 2d66a5a9ea5..f34d3680754 100644 --- a/src/test/java/org/htmlunit/ScriptPreProcessorTest.java +++ b/src/test/java/org/htmlunit/ScriptPreProcessorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,8 +54,8 @@ public void scriptPreProcessor() throws IOException { final MockWebConnection webConnection = new MockWebConnection(); final String alertText = "content"; final String newAlertText = "newcontent"; - final String content - = "foo\n" + "

hello world

\n" @@ -118,7 +118,8 @@ public void handleAlert(final Page page, final String message) { public void scriptPreProcessor_UnimplementedJavascript() throws Exception { final WebClient client = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); - final String content = "foo\n" + final String content = DOCTYPE_HTML + + "foo\n" + "

hello world

\n" + "\n" + "\n" @@ -151,7 +152,8 @@ public String preProcess(final HtmlPage htmlPage, final String sourceCode, final */ @Test public void scriptPreProcessor_Eval() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + + ""; final WebClient client = getWebClient(); final MockWebConnection conn = new MockWebConnection(); diff --git a/src/test/java/org/htmlunit/SgmlPage2Test.java b/src/test/java/org/htmlunit/SgmlPage2Test.java index 1ec03fba12b..f001c11f17d 100644 --- a/src/test/java/org/htmlunit/SgmlPage2Test.java +++ b/src/test/java/org/htmlunit/SgmlPage2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.html.HtmlPage; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.WebDriver; @@ -36,7 +36,8 @@ public final class SgmlPage2Test extends WebDriverTestCase { @Test @Alerts({"2", "2"}) public void getElementsByTagName() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -50,8 +50,8 @@ public void localStorage() throws Exception { assertEquals(1, localStorage.size()); assertEquals("Tom", localStorage.get("myCat")); - html - = "\n" + html = DOCTYPE_HTML + + "\n" + "\n" @@ -73,8 +73,8 @@ public void populateLocalStorage() throws Exception { localStorage.put("myCat", "Tom"); - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -96,8 +96,8 @@ public void sessionStorage() throws Exception { webClient.getStorageHolder().getSessionStorage(webClient.getCurrentWindow()); assertEquals(0, sessionStorage.size()); - String html - = "\n" + String html = DOCTYPE_HTML + + "\n" + "\n" @@ -107,8 +107,8 @@ public void sessionStorage() throws Exception { assertEquals(1, sessionStorage.size()); assertEquals("Tom", sessionStorage.get("myCat")); - html - = "\n" + html = DOCTYPE_HTML + + "\n" + "\n" @@ -131,8 +131,8 @@ public void populateSessionStorage() throws Exception { sessionStorage.put("myCat", "Tom"); - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/StringWebResponseTest.java b/src/test/java/org/htmlunit/StringWebResponseTest.java index 1ecb35b6fbd..a19a1cf3159 100644 --- a/src/test/java/org/htmlunit/StringWebResponseTest.java +++ b/src/test/java/org/htmlunit/StringWebResponseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,9 @@ public void charset() { assertSame(UTF_8, webResponse.getContentCharset()); } + /** + * @throws Exception if the test fails + */ @Test public void charsetImplicit() { final StringWebResponse webResponse = new StringWebResponse("hello", URL_FIRST); @@ -54,7 +57,8 @@ public void charsetImplicit() { */ @Test public void charsetInContent() { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\u010C\u00CDSLO"; final StringWebResponse webResponse = new StringWebResponse(content, UTF_8, URL_FIRST); @@ -63,9 +67,13 @@ public void charsetInContent() { assertEquals(content, webResponse.getContentAsString()); } + /** + * @throws Exception if the test fails + */ @Test public void charsetInContentImplicit() { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\u010C\u00CDSLO"; final StringWebResponse webResponse = new StringWebResponse(content, URL_FIRST); @@ -75,11 +83,12 @@ public void charsetInContentImplicit() { } /** - * @throws IOException + * @throws IOException in case of error */ @Test public void inputStream() throws IOException { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\u010C\u00CDSLO"; final StringWebResponse webResponse = new StringWebResponse(content, URL_FIRST); diff --git a/src/test/java/org/htmlunit/TestCaseTest.java b/src/test/java/org/htmlunit/TestCaseTest.java index 7afaf2c0656..3335c99b360 100644 --- a/src/test/java/org/htmlunit/TestCaseTest.java +++ b/src/test/java/org/htmlunit/TestCaseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/TextPageTest.java b/src/test/java/org/htmlunit/TextPageTest.java index 719f8da1687..8998c80227c 100644 --- a/src/test/java/org/htmlunit/TextPageTest.java +++ b/src/test/java/org/htmlunit/TextPageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/TopLevelWindowTest.java b/src/test/java/org/htmlunit/TopLevelWindowTest.java index 51142b533f9..49e837ab55b 100644 --- a/src/test/java/org/htmlunit/TopLevelWindowTest.java +++ b/src/test/java/org/htmlunit/TopLevelWindowTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import org.htmlunit.javascript.background.JavaScriptJob; import org.htmlunit.javascript.background.JavaScriptJobManager; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -191,7 +191,8 @@ public void webWindowClosed(final WebWindowEvent event) { window.setJobManager(mgr); final MockWebConnection conn = getMockWebConnection(); - conn.setDefaultResponse(""); + conn.setDefaultResponse(DOCTYPE_HTML + + ""); client.getPage(URL_FIRST); assertEquals(1, jobCount.intValue()); @@ -210,10 +211,13 @@ public void history() throws Exception { final History history = window.getHistory(); final MockWebConnection conn = getMockWebConnection(); - conn.setResponse(URL_FIRST, "foo\n" - + "bar"); - conn.setResponse(URL_SECOND, "foo"); - conn.setResponse(URL_THIRD, "foo"); + conn.setResponse(URL_FIRST, DOCTYPE_HTML + + "foo\n" + + "bar"); + conn.setResponse(URL_SECOND, DOCTYPE_HTML + + "foo"); + conn.setResponse(URL_THIRD, DOCTYPE_HTML + + "foo"); assertEquals(0, history.getLength()); assertEquals(-1, history.getIndex()); @@ -305,7 +309,7 @@ public void history() throws Exception { */ @Test public void onBeforeUnloadCalledOnClose() throws Exception { - final String html = "abc"; + final String html = DOCTYPE_HTML + "abc"; final List alerts = new ArrayList<>(); final HtmlPage page = loadPage(html, alerts); assertTrue(alerts.isEmpty()); @@ -323,7 +327,8 @@ public void onBeforeUnloadCalledOnClose() throws Exception { @Test @Alerts("closing") public void setTimeoutDuringOnUnload() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; + + final String[] expected = getExpectedAlerts(); + + setExpectedAlerts(); final HtmlPage page = loadPageWithAlerts(html); // verify that 1 background job exists - assertEquals(1, page.getEnclosingWindow().getJobManager().getJobCount()); + assertEquals(Integer.parseInt(expected[0]), page.getEnclosingWindow().getJobManager().getJobCount()); final byte[] bytes = SerializationUtils.serialize(page); page.getWebClient().close(); // deserialize page and verify that 1 background job exists final HtmlPage clonedPage = (HtmlPage) SerializationUtils.deserialize(bytes); - assertEquals(1, clonedPage.getEnclosingWindow().getJobManager().getJobCount()); + assertEquals(Integer.parseInt(expected[1]), clonedPage.getEnclosingWindow().getJobManager().getJobCount()); // configure a new CollectingAlertHandler (in fact it has surely already one and we could get and cast it) final List collectedAlerts = Collections.synchronizedList(new ArrayList()); @@ -172,7 +185,8 @@ public void serialization_withJSBackgroundTasks() throws Exception { clonedPage.getWebClient().waitForBackgroundJavaScriptStartingBefore(100); assertEquals(0, clonedPage.getEnclosingWindow().getJobManager().getJobCount()); - final String[] expectedAlerts = {"exiting"}; + + final String[] expectedAlerts = {expected[2]}; assertEquals(expectedAlerts, collectedAlerts); } @@ -185,7 +199,7 @@ public void serialization_withJSBackgroundTasks() throws Exception { FF = "en-US,en;q=0.5", FF_ESR = "en-US,en;q=0.5") public void acceptLanguage() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; loadPage(html); assertEquals(getExpectedAlerts()[0], getMockWebConnection().getLastAdditionalHeaders().get(HttpHeader.ACCEPT_LANGUAGE)); @@ -197,7 +211,7 @@ public void acceptLanguage() throws Exception { */ @Test public void acceptLanguageFr() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; final BrowserVersion frBrowser = new BrowserVersion.BrowserVersionBuilder(getBrowserVersion()) @@ -219,7 +233,7 @@ public void acceptLanguageFr() throws Exception { */ @Test public void newWindowScopeForAboutBlank() throws Exception { - final HtmlPage p = loadPage(""); + final HtmlPage p = loadPage(DOCTYPE_HTML + ""); p.executeJavaScript("top.foo = 'hello';"); final ScriptResult result = p.executeJavaScript("top.foo"); assertEquals("hello", result.getJavaScriptResult()); @@ -292,8 +306,8 @@ private void checkCookie(final String cookieString, final String name, final Str FF = {"loadExtraContent started at Page 1", " loadExtraContent finished at Page 2"}, FF_ESR = {"loadExtraContent started at Page 1", " loadExtraContent finished at Page 2"}) public void makeSureTheCurrentJobHasEndedBeforeReplaceWindowPage() throws Exception { - final String htmlContent1 - = "\n" + final String htmlContent1 = DOCTYPE_HTML + + "\n" + "" + " Page 1\n" + "\n" @@ -320,8 +334,8 @@ public void makeSureTheCurrentJobHasEndedBeforeReplaceWindowPage() throws Except + "\n" + ""; - final String htmlContent2 - = "\n" + final String htmlContent2 = DOCTYPE_HTML + + "\n" + "" + " Page 2\n" + "\n" @@ -345,7 +359,7 @@ public void makeSureTheCurrentJobHasEndedBeforeReplaceWindowPage() throws Except // Immediately load page 2. Timeout function was triggered already final HtmlPage page2 = client.getPage(URL_SECOND); verify(() -> page1.getEnclosingWindow().getName(), - getExpectedAlerts()[0] + getExpectedAlerts()[1], DEFAULT_WAIT_TIME * 4); + getExpectedAlerts()[0] + getExpectedAlerts()[1], DEFAULT_WAIT_TIME.multipliedBy(4)); // Fails: return 98 (about) instead of 1 // assertEquals(1, page.querySelectorAll("p").size()); @@ -356,8 +370,7 @@ public void makeSureTheCurrentJobHasEndedBeforeReplaceWindowPage() throws Except */ @Test public void toLocaleLowerCase() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + "\n" + "to second"; - final String secondContent = ""; + final String secondContent = DOCTYPE_HTML + ""; final MockWebConnection webConnection = getMockWebConnection(); webConnection.setResponse(URL_SECOND, secondContent); @@ -185,7 +191,8 @@ public void clickReturnsWhenThePageHasBeenCompleteLoaded() throws Exception { @Test @Alerts({"open", "first", "second"}) public void windowOpenedByAnchorTargetIsAttachedToJavascriptEventLoop() throws Exception { - final String firstContent = "\n" + final String firstContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + ""; @@ -439,7 +461,8 @@ private void doTestDeflateCompression(final boolean gzipCompatibleCompression) t final MockWebConnection conn = getMockWebConnection(); conn.setResponse(URL_SECOND, content, 200, "OK", "text/javascript", headers); - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "Hello world\n" + "\n" + ""; @@ -525,7 +548,11 @@ public void javascriptContentDetectorContentTypeTextPlain() throws Exception { * @throws Exception if something goes wrong */ @Test - @NotYetImplemented + @Alerts({}) + @HtmlUnitNYI(CHROME = "executed", + EDGE = "executed", + FF = "executed", + FF_ESR = "executed") public void javascriptContentDetectorContentTypeApplicationJavascript() throws Exception { final MockWebConnection conn = getMockWebConnection(); conn.setDefaultResponse("", 200, "OK", MimeType.TEXT_JAVASCRIPT); @@ -558,8 +585,8 @@ public void encodingCharsetGBK() throws Exception { private void encodingCharset(final String title, final String metaCharset, final String responseCharset) throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "" + title + "\n" + "\n" @@ -589,8 +616,8 @@ private void encodingCharset(final String title, @Test @Alerts({"en-US", "en-US,en"}) public void language() throws Exception { - final String html - = "\n" @@ -247,7 +257,8 @@ public void script() throws Exception { */ @Test public void link() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " foo\n" + " \n" @@ -271,7 +282,8 @@ public void link() throws Exception { */ @Test public void object() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " foo\n" + "\n" @@ -295,7 +307,8 @@ public void object() throws Exception { */ @Test public void svgScript() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " foo\n" + "\n" @@ -316,7 +329,8 @@ public void svgScript() throws Exception { */ @Test public void invalidElementEventWithNoJS() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + + "" + "" + " foo" + "" @@ -334,7 +348,8 @@ public void invalidElementEventWithNoJS() throws Exception { */ @Test public void checkingWithNoJS() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + + "" + "" + " foo" + "" @@ -362,7 +377,8 @@ public void checkingWithNoJS() throws Exception { */ @Test public void frameSetWithNoJS() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " foo\n" + "\n" @@ -384,7 +400,8 @@ public void frameSetWithNoJS() throws Exception { */ @Test public void imageEventHandlersWithNoJs() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " \n" @@ -402,7 +419,8 @@ public void imageEventHandlersWithNoJs() throws Exception { */ @Test public void clickWithNoJs() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " \n" diff --git a/src/test/java/org/htmlunit/WebClient9Test.java b/src/test/java/org/htmlunit/WebClient9Test.java index 90802dac309..b61568444a9 100644 --- a/src/test/java/org/htmlunit/WebClient9Test.java +++ b/src/test/java/org/htmlunit/WebClient9Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -141,6 +141,9 @@ public void flow1_2() { } } + /** + * @throws Exception if the test fails + */ @Test public void multithreading() throws InterruptedException { final String css = "body { background-color: green; }"; diff --git a/src/test/java/org/htmlunit/WebClientOptionsTest.java b/src/test/java/org/htmlunit/WebClientOptionsTest.java index ce12272e638..8c5a7490f76 100644 --- a/src/test/java/org/htmlunit/WebClientOptionsTest.java +++ b/src/test/java/org/htmlunit/WebClientOptionsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,13 @@ */ package org.htmlunit; +import java.security.KeyStore; + import javax.net.ssl.SSLContext; import org.apache.commons.lang3.SerializationUtils; import org.htmlunit.junit.BrowserRunner; +import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; @@ -42,12 +45,37 @@ public void serialization() throws Exception { assertEquals(original.isJavaScriptEnabled(), deserialized.isJavaScriptEnabled()); assertEquals(original.isCssEnabled(), deserialized.isCssEnabled()); - assertEquals(original.isPrintContentOnFailingStatusCode(), deserialized.isPrintContentOnFailingStatusCode()); + assertEquals(original.isPrintContentOnFailingStatusCode(), + deserialized.isPrintContentOnFailingStatusCode()); assertEquals(original.isThrowExceptionOnFailingStatusCode(), deserialized.isThrowExceptionOnFailingStatusCode()); - assertEquals(original.isThrowExceptionOnScriptError(), deserialized.isThrowExceptionOnScriptError()); - assertEquals(original.isPopupBlockerEnabled(), deserialized.isPopupBlockerEnabled()); - assertEquals(original.isRedirectEnabled(), deserialized.isRedirectEnabled()); + assertEquals(original.isThrowExceptionOnScriptError(), + deserialized.isThrowExceptionOnScriptError()); + assertEquals(original.isPopupBlockerEnabled(), + deserialized.isPopupBlockerEnabled()); + assertEquals(original.isRedirectEnabled(), + deserialized.isRedirectEnabled()); + + assertEquals(original.isGeolocationEnabled(), + deserialized.isGeolocationEnabled()); + assertEquals(original.getGeolocation(), + deserialized.getGeolocation()); + + assertEquals(original.getNekoReaderBufferSize(), + deserialized.getNekoReaderBufferSize()); + + assertEquals(original.isWebSocketEnabled(), + deserialized.isWebSocketEnabled()); + assertEquals(original.getWebSocketMaxTextMessageSize(), + deserialized.getWebSocketMaxTextMessageSize()); + assertEquals(original.getWebSocketMaxTextMessageBufferSize(), + deserialized.getWebSocketMaxTextMessageBufferSize()); + assertEquals(original.getWebSocketMaxBinaryMessageSize(), + deserialized.getWebSocketMaxBinaryMessageSize()); + assertEquals(original.getWebSocketMaxBinaryMessageBufferSize(), + deserialized.getWebSocketMaxBinaryMessageBufferSize()); + + assertEquals(original.isFetchPolyfillEnabled(), deserialized.isFetchPolyfillEnabled()); } /** @@ -65,6 +93,19 @@ public void serializationChanged() throws Exception { original.setPopupBlockerEnabled(true); original.setRedirectEnabled(false); + original.setGeolocationEnabled(true); + original.setGeolocation(new WebClientOptions.Geolocation(1d, 2d, 3d, 4d, 5d, 6d, 7d)); + + original.setNekoReaderBufferSize(1234567); + + original.setWebSocketEnabled(false); + original.setWebSocketMaxTextMessageSize(77); + original.setWebSocketMaxTextMessageBufferSize(771); + original.setWebSocketMaxBinaryMessageSize(44); + original.setWebSocketMaxBinaryMessageBufferSize(441); + + original.setFetchPolyfillEnabled(true); + final byte[] bytes = SerializationUtils.serialize(original); final WebClientOptions deserialized = (WebClientOptions) SerializationUtils.deserialize(bytes); @@ -77,6 +118,31 @@ public void serializationChanged() throws Exception { assertEquals(original.isThrowExceptionOnScriptError(), deserialized.isThrowExceptionOnScriptError()); assertEquals(original.isPopupBlockerEnabled(), deserialized.isPopupBlockerEnabled()); assertEquals(original.isRedirectEnabled(), deserialized.isRedirectEnabled()); + + assertEquals(original.isGeolocationEnabled(), deserialized.isGeolocationEnabled()); + assertEquals(original.getGeolocation().getAccuracy(), deserialized.getGeolocation().getAccuracy()); + assertEquals(original.getGeolocation().getLatitude(), deserialized.getGeolocation().getLatitude()); + assertEquals(original.getGeolocation().getLongitude(), deserialized.getGeolocation().getLongitude()); + assertEquals(original.getGeolocation().getAltitude(), deserialized.getGeolocation().getAltitude()); + assertEquals(original.getGeolocation().getAltitudeAccuracy(), + deserialized.getGeolocation().getAltitudeAccuracy()); + assertEquals(original.getGeolocation().getHeading(), deserialized.getGeolocation().getHeading()); + assertEquals(original.getGeolocation().getSpeed(), deserialized.getGeolocation().getSpeed()); + + assertEquals(original.getNekoReaderBufferSize(), deserialized.getNekoReaderBufferSize()); + + assertEquals(original.isWebSocketEnabled(), + deserialized.isWebSocketEnabled()); + assertEquals(original.getWebSocketMaxTextMessageSize(), + deserialized.getWebSocketMaxTextMessageSize()); + assertEquals(original.getWebSocketMaxTextMessageBufferSize(), + deserialized.getWebSocketMaxTextMessageBufferSize()); + assertEquals(original.getWebSocketMaxBinaryMessageSize(), + deserialized.getWebSocketMaxBinaryMessageSize()); + assertEquals(original.getWebSocketMaxBinaryMessageBufferSize(), + deserialized.getWebSocketMaxBinaryMessageBufferSize()); + + assertEquals(original.isFetchPolyfillEnabled(), deserialized.isFetchPolyfillEnabled()); } /** @@ -92,4 +158,37 @@ public void serializationSSLContextProvider() throws Exception { assertNull(deserialized.getSSLContext()); } + + /** + * @throws Exception if an error occurs + */ + @Test + public void serializationSSLTrustStore() throws Exception { + final WebClientOptions original = new WebClientOptions(); + + final KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + original.setSSLTrustStore(keyStore); + + final byte[] bytes = SerializationUtils.serialize(original); + final WebClientOptions deserialized = (WebClientOptions) SerializationUtils.deserialize(bytes); + + assertNull(deserialized.getSSLTrustStore()); + } + + /** + * @throws Exception if an error occurs + */ + @Test + public void sslClientCertificateStore() throws Exception { + final WebClientOptions original = new WebClientOptions(); + + final KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + original.setSSLClientCertificateKeyStore(keyStore, "secret".toCharArray()); + + final byte[] bytes = SerializationUtils.serialize(original); + final WebClientOptions deserialized = (WebClientOptions) SerializationUtils.deserialize(bytes); + + assertNull(deserialized.getSSLClientCertificateStore()); + Assert.assertArrayEquals("secret".toCharArray(), deserialized.getSSLClientCertificatePassword()); + } } diff --git a/src/test/java/org/htmlunit/WebClientTest.java b/src/test/java/org/htmlunit/WebClientTest.java index f0a2afac0f5..2aa04f408dd 100644 --- a/src/test/java/org/htmlunit/WebClientTest.java +++ b/src/test/java/org/htmlunit/WebClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,13 +45,12 @@ import org.htmlunit.html.HtmlElement; import org.htmlunit.html.HtmlInlineFrame; import org.htmlunit.html.HtmlPage; -import org.htmlunit.html.HtmlPageTest; import org.htmlunit.html.parser.HTMLParser; import org.htmlunit.html.parser.neko.HtmlUnitNekoHtmlParser; import org.htmlunit.http.HttpStatus; import org.htmlunit.javascript.host.html.HTMLStyleElement; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.htmlunit.util.MimeType; import org.htmlunit.util.NameValuePair; import org.htmlunit.util.UrlUtils; @@ -87,7 +86,8 @@ public class WebClientTest extends SimpleWebTestCase { */ @Test public void credentialProvider_NoCredentials() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "No access"; final WebClient client = getWebClient(); client.getOptions().setPrintContentOnFailingStatusCode(false); @@ -113,7 +113,8 @@ public void credentialProvider_NoCredentials() throws Exception { */ @Test public void htmlWindowEvents_changed() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "link to foo2\n" + ""; final WebClient client = getWebClient(); @@ -164,12 +165,13 @@ public void webWindowClosed(final WebWindowEvent event) { */ @Test public void htmlWindowEvents_opened() throws Exception { - final String page1Content = "foo\n" + final String page1Content = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + "link to foo2\n" + ""; - final String page2Content = "foo"; + final String page2Content = DOCTYPE_HTML + "foo"; final WebClient client = getWebClient(); final List events = new LinkedList<>(); @@ -219,12 +221,13 @@ public void webWindowClosed(final WebWindowEvent event) { */ @Test public void htmlWindowEvents_closedFromFrame() throws Exception { - final String firstContent = "first\n" + final String firstContent = DOCTYPE_HTML + + "first\n" + "\n" + "link to foo2\n" + ""; - final String secondContent = "second"; - final String thirdContent = "third"; + final String secondContent = DOCTYPE_HTML + "second"; + final String thirdContent = DOCTYPE_HTML + "third"; final WebClient client = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); @@ -289,8 +292,8 @@ public void redirection301_MovedPermanently_GetMethod() throws Exception { * @throws Exception if the test fails */ private void doTestRedirectionSameUrlAfterPost(final int statusCode) throws Exception { - final String firstContent = "First"; - final String secondContent = "Second"; + final String firstContent = DOCTYPE_HTML + "First"; + final String secondContent = DOCTYPE_HTML + "Second"; final WebClient webClient = getWebClient(); @@ -436,7 +439,7 @@ public void redirection307_TemporaryRedirect_PostMethod() throws Exception { * @param statusCode the code to return from the initial request * @param initialRequestMethod the initial request * @param expectedRedirectedRequestMethod the submit method of the second (redirected) request - * If a redirect is not expected to happen then this must be null + * If a redirect is not expected to happen then this must be null * @param newLocation the Location set in the redirection header * @throws Exception if the test fails */ @@ -470,8 +473,8 @@ public void redirectionSameURL() throws Exception { } private HtmlPage getPageWithRedirectionsSameURL(final int nbRedirections) throws Exception { - final String firstContent = "First"; - final String secondContent = "Second"; + final String firstContent = DOCTYPE_HTML + "First"; + final String secondContent = DOCTYPE_HTML + "Second"; final WebClient webClient = getWebClient(); @@ -523,7 +526,7 @@ private void redirection_AdditionalHeadersMaintained(final int statusCode) throw final List headers = asList(new NameValuePair("Location", URL_SECOND.toString())); conn.setResponse(URL_FIRST, "", statusCode, "", MimeType.TEXT_HTML, headers); - conn.setResponse(URL_SECOND, "abc"); + conn.setResponse(URL_SECOND, DOCTYPE_HTML + "abc"); final WebRequest request = new WebRequest(URL_FIRST); request.setAdditionalHeader("foo", "bar"); @@ -539,7 +542,7 @@ private void redirection_AdditionalHeadersMaintained(final int statusCode) throw * @param statusCode the code to return from the initial request * @param initialRequestMethod the initial request * @param expectedRedirectedRequestMethod the submit method of the second (redirected) request - * If a redirect is not expected to happen then this must be null + * If a redirect is not expected to happen then this must be null * @param newLocation the Location set in the redirection header * @param useProxy indicates if the test should be performed with a proxy * @throws Exception if the test fails @@ -553,8 +556,8 @@ private void doTestRedirection( final boolean useProxy) throws Exception { - final String firstContent = "First"; - final String secondContent = "Second"; + final String firstContent = DOCTYPE_HTML + "First"; + final String secondContent = DOCTYPE_HTML + "Second"; final WebClient webClient; final String proxyHost; @@ -644,7 +647,8 @@ public void setPageCreator_null() { */ @Test public void setPageCreator() throws Exception { - final String page1Content = "foo\n" + final String page1Content = DOCTYPE_HTML + + "foo\n" + "\n" + "link to foo2\n" + ""; @@ -706,7 +710,8 @@ public HTMLParser getHtmlParser() { */ @Test public void loadPage_PostWithParameters() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + ""; final WebClient client = getWebClient(); @@ -727,7 +732,8 @@ public void loadPage_PostWithParameters() throws Exception { */ @Test public void loadPage_SlashesInQueryString() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "to page 2\n" + ""; @@ -754,7 +760,7 @@ public void loadFilePage() throws Exception { // It could be useful to have existing files to test in a special location in filesystem. // It will be really needed when we have to test binary files using the file protocol. - final String htmlContent = "foo"; + final String htmlContent = DOCTYPE_HTML + "foo"; final File currentDirectory = new File((new File("")).getAbsolutePath()); final File tmpFile = File.createTempFile("test", ".html", currentDirectory); tmpFile.deleteOnExit(); @@ -873,10 +879,12 @@ public void loadFilePageXml() throws Exception { */ @Test public void redirectViaJavaScriptDuringInitialPageLoad() throws Exception { - final String firstContent = "First"; - final String secondContent = "Second"; + final String secondContent = DOCTYPE_HTML + + "Second"; final WebClient webClient = getWebClient(); @@ -900,7 +908,7 @@ public void redirectViaJavaScriptDuringInitialPageLoad() throws Exception { public void loadWebResponseInto() throws Exception { final WebClient webClient = getWebClient(); final WebResponse webResponse = new StringWebResponse( - "first", URL_FIRST); + DOCTYPE_HTML + "first", URL_FIRST); final Page page = webClient.loadWebResponseInto(webResponse, webClient.getCurrentWindow()); assertTrue(HtmlPage.class.isInstance(page)); @@ -917,7 +925,7 @@ public void loadWebResponseInto() throws Exception { */ @Test public void getPageFailingStatusCode() throws Exception { - final String firstContent = "Hello World"; + final String firstContent = DOCTYPE_HTML + "Hello World"; final WebClient webClient = getWebClient(); @@ -951,7 +959,7 @@ public void proxyConfig() throws Exception { defaultProxyHost, defaultProxyPort)) { // Configure the mock web connection. - final String html = "Hello World"; + final String html = DOCTYPE_HTML + "Hello World"; final MockWebConnection webConnection = new MockWebConnection(); webConnection.setResponse(URL_FIRST, html); webClient.setWebConnection(webConnection); @@ -1021,7 +1029,7 @@ public void proxyConfig() throws Exception { public void proxyConfigWithRedirect() throws Exception { final String defaultProxyHost = "defaultProxyHost"; final int defaultProxyPort = 777; - final String html = "Hello World"; + final String html = DOCTYPE_HTML + "Hello World"; try (WebClient webClient = new WebClient(getBrowserVersion(), defaultProxyHost, defaultProxyPort)) { webClient.getOptions().getProxyConfig().addHostsToProxyBypass("hostToByPass"); @@ -1030,7 +1038,8 @@ public void proxyConfigWithRedirect() throws Exception { final List headers = Collections.singletonList(new NameValuePair("Location", location2)); final MockWebConnection webConnection = new MockWebConnection(); webConnection.setResponse(URL_FIRST, html, 302, "Some error", MimeType.TEXT_HTML, headers); - webConnection.setResponse(new URL(location2), "2nd page"); + webConnection.setResponse(new URL(location2), + DOCTYPE_HTML + "2nd page"); webClient.setWebConnection(webConnection); final Page page2 = webClient.getPage(URL_FIRST); @@ -1060,7 +1069,8 @@ public void proxyConfigWithRedirect() throws Exception { public void proxyConfigForJS() throws Exception { final String defaultProxyHost = "defaultProxyHost"; final int defaultProxyPort = 777; - final String html = "Hello World\n" + final String html = DOCTYPE_HTML + + "Hello World\n" + "\n" + ""; try (WebClient webClient = new WebClient(getBrowserVersion(), defaultProxyHost, defaultProxyPort)) { @@ -1137,7 +1147,8 @@ public void refreshHandlerAccessors() { */ @Test public void badCharset() throws Exception { - final String page1Content = "foo\n" + final String page1Content = DOCTYPE_HTML + + "foo\n" + ""; final WebClient client = getWebClient(); @@ -1167,12 +1178,14 @@ public void expandUrlHandlesColonsInRelativeUrl() throws Exception { */ @Test public void reusingHtmlPageToSubmitFormMultipleTimes() throws Exception { - final String firstContent = "First\n" + final String firstContent = DOCTYPE_HTML + + "First\n" + "\n" + "
\n" + "\n" + "
"; - final String secondContent = "SecondSecond"; + final String secondContent = DOCTYPE_HTML + + "SecondSecond"; final WebClient webClient = getWebClient(); @@ -1195,11 +1208,13 @@ public void reusingHtmlPageToSubmitFormMultipleTimes() throws Exception { */ @Test public void openerInFrameset() throws Exception { - final String firstContent = "\n" + final String firstContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + ""; - final String secondContent = "to top"; + final String secondContent = DOCTYPE_HTML + + "to top"; final WebClient webClient = getWebClient(); @@ -1212,7 +1227,7 @@ public void openerInFrameset() throws Exception { webClient.setAlertHandler(new CollectingAlertHandler(collectedAlerts)); final HtmlPage page = webClient.getPage(URL_FIRST); - final HtmlPage pageInFrame = (HtmlPage) ((WebWindow) page.getFrames().get(0)).getEnclosedPage(); + final HtmlPage pageInFrame = (HtmlPage) page.getFrames().get(0).getEnclosedPage(); pageInFrame.getAnchors().get(0).click(); final String[] expectedAlerts = {"null", "null"}; @@ -1301,7 +1316,7 @@ private File getTestFile(final String fileName) throws Exception { */ @Test public void requestHeader() throws Exception { - final String content = ""; + final String content = DOCTYPE_HTML + ""; final WebClient client = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); @@ -1330,7 +1345,7 @@ public void requestHeaderOverwritesClient() throws Exception { final String fromRequest = "from request"; final String fromClient = "from client"; - final String content = ""; + final String content = DOCTYPE_HTML + ""; final WebClient client = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); @@ -1364,7 +1379,7 @@ public void requestHeaderOverwritesClient() throws Exception { public void clientHeaderOverwritesDefault() throws Exception { final String fromClient = "from client"; - final String content = ""; + final String content = DOCTYPE_HTML + ""; final WebClient client = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); @@ -1385,7 +1400,7 @@ public void clientHeaderOverwritesDefault() throws Exception { */ @Test public void requestHeaderDoNotOverwriteWebRequestAcceptHeader() throws Exception { - final String content = ""; + final String content = DOCTYPE_HTML + ""; final WebClient webClient = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); @@ -1419,7 +1434,7 @@ public void requestHeaderDoNotOverwriteWebRequestAcceptHeader() throws Exception */ @Test public void requestHeaderDoNotOverwriteWebRequestAcceptHeader2() throws Exception { - final String content = ""; + final String content = DOCTYPE_HTML + ""; final WebClient client = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); @@ -1457,7 +1472,8 @@ public void requestHeaderDoNotOverwriteWebRequestAcceptHeader2() throws Exceptio */ @Test public void contentTypeCaseInsensitive() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + ""; final WebClient client = getWebClient(); @@ -1504,7 +1520,8 @@ public void loadFilePageWithExternalJS() throws Exception { FileUtils.writeStringToFile(tmpFileJS, "alert('foo')", encoding); // HTML file - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; final File tmpFile = File.createTempFile("test", ".html", currentDirectory); @@ -1528,7 +1545,7 @@ public void loadFilePageWithExternalJS() throws Exception { */ @Test public void onBeforeUnloadCalledOnCorrectPage() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; final List alerts = new ArrayList<>(); loadPage(html, alerts); assertTrue(alerts.isEmpty()); @@ -1542,7 +1559,7 @@ public void onBeforeUnloadCalledOnCorrectPage() throws Exception { @Test public void urlEncoding() throws Exception { final URL url = new URL("http://host/x+y\u00E9/a\u00E9 b?c \u00E9 d"); - final HtmlPage page = loadPage(BrowserVersion.FIREFOX, "", new ArrayList<>(), url); + final HtmlPage page = loadPage(BrowserVersion.FIREFOX, DOCTYPE_HTML + "", new ArrayList<>(), url); final WebRequest wrs = page.getWebResponse().getWebRequest(); assertEquals("http://host/x+y%C3%A9/a%C3%A9%20b?c%20%C3%A9%20d", wrs.getUrl()); } @@ -1555,7 +1572,8 @@ public void urlEncoding() throws Exception { @Test public void urlEncoding2() throws Exception { final URL url = new URL("http://host/x+y\u00E9/a\u00E9 b?c \u00E9 d"); - final HtmlPage page = loadPage(BrowserVersion.BEST_SUPPORTED, "", new ArrayList<>(), url); + final HtmlPage page = loadPage(BrowserVersion.BEST_SUPPORTED, + DOCTYPE_HTML + "", new ArrayList<>(), url); final WebRequest wrs = page.getWebResponse().getWebRequest(); assertEquals("http://host/x+y%C3%A9/a%C3%A9%20b?c%20%C3%A9%20d", wrs.getUrl()); } @@ -1567,7 +1585,7 @@ public void urlEncoding2() throws Exception { @Test public void plusNotEncodedInUrl() throws Exception { final URL url = new URL("http://host/search/my+category/"); - final HtmlPage page = loadPage("", new ArrayList<>(), url); + final HtmlPage page = loadPage(DOCTYPE_HTML + "", new ArrayList<>(), url); final WebRequest wrs = page.getWebResponse().getWebRequest(); assertEquals("http://host/search/my+category/", wrs.getUrl()); } @@ -1581,8 +1599,8 @@ public void cssEnablementControlsCssLoading() throws Exception { final MockWebConnection conn = new MockWebConnection(); client.setWebConnection(conn); - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" + " \n" @@ -1619,7 +1637,7 @@ public void cssEnablementControlsCssLoading() throws Exception { public void getPageDataProtocol() throws Exception { final WebClient webClient = getWebClient(); - final String html = "DataUrl Test"; + final String html = DOCTYPE_HTML + "DataUrl Test"; final Page page = webClient.getPage("data:text/html;charset=utf-8," + html); assertEquals("DataUrl Test", ((HtmlPage) page).asNormalizedText()); @@ -1632,7 +1650,8 @@ public void getPageDataProtocol() throws Exception { public void getPageJavascriptProtocol() throws Exception { final WebClient webClient = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); - webConnection.setDefaultResponse("Hello World"); + webConnection.setDefaultResponse(DOCTYPE_HTML + + "Hello World"); webClient.setWebConnection(webConnection); final List collectedAlerts = new ArrayList<>(); @@ -1686,7 +1705,7 @@ public void javaScriptTimeout() throws Exception { try { client.getOptions().setThrowExceptionOnScriptError(false); - final String content = ""; + final String content = DOCTYPE_HTML + ""; final MockWebConnection webConnection = new MockWebConnection(); webConnection.setDefaultResponse(content); client.setWebConnection(webConnection); @@ -1737,7 +1756,7 @@ public void openWindowWithNullUrl() throws Exception { public void basicWindowTracking() throws Exception { // Create mock web connection. final MockWebConnection conn = new MockWebConnection(); - conn.setDefaultResponse("First\n" + "
\n" + "\n" + "
"; conn.setResponse(URL_FIRST, html1); - final String html2 = "Second\n" + final String html2 = DOCTYPE_HTML + + "Second\n" + "\n" + ""; @@ -1853,13 +1876,15 @@ public void windowTracking_SpecialCase3() throws Exception { final List collectedAlerts = new ArrayList<>(); webClient.setAlertHandler(new CollectingAlertHandler(collectedAlerts)); - final String html1 = "First\n" + final String html1 = DOCTYPE_HTML + + "First\n" + "\n" + "\n" + ""; conn.setResponse(URL_FIRST, html1); - final String html2 = "Second\n" + final String html2 = DOCTYPE_HTML + + "Second\n" + "\n" + "
\n" + "
\n" @@ -1874,7 +1899,8 @@ public void windowTracking_SpecialCase3() throws Exception { + ""; conn.setResponse(URL_SECOND, html2); - final String html3 = "Third\n" + final String html3 = DOCTYPE_HTML + + "Third\n" + "\n" + "\n" @@ -2052,12 +2081,13 @@ public void currentWindow() throws Exception { final WebClient client = getWebClient(); final MockWebConnection conn = new MockWebConnection(); - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; conn.setResponse(URL_FIRST, html); final URL frameUrl = new URL(URL_FIRST, "frame.html"); - conn.setResponse(frameUrl, ""); - conn.setResponse(URL_SECOND, ""); + conn.setResponse(frameUrl, DOCTYPE_HTML + ""); + conn.setResponse(URL_SECOND, DOCTYPE_HTML + ""); client.setWebConnection(conn); client.getPage(URL_FIRST); @@ -2076,7 +2106,8 @@ public void currentWindow() throws Exception { */ @Test public void currentWindow2() throws Exception { - final String html = "\n" + ""; - final String html2 = "\n" @@ -2272,7 +2306,8 @@ public void close() throws Exception { */ @Test public void test() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" @@ -2376,7 +2411,8 @@ public void webSocketDisabled() throws Exception { */ @Test public void loadHtmlCodeIntoCurrentWindow() throws Exception { - final String htmlCode = "" + final String htmlCode = DOCTYPE_HTML + + "" + " " + " Title" + " " @@ -2416,11 +2452,13 @@ public void loadXHtmlCodeIntoCurrentWindow() throws Exception { */ @Test public void reset() throws Exception { - final String html = "testpage\n" + final String html = DOCTYPE_HTML + + "testpage\n" + "\n" + ""; - final String html2 = "testpage\n" + final String html2 = DOCTYPE_HTML + + "testpage\n" + "\n" + "\n" + ""; @@ -2481,8 +2519,7 @@ public void reset() throws Exception { */ @Test public void loginFlowClickSubmitRedirect() throws Exception { - final String startPage = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String startPage = DOCTYPE_HTML + "Start page" + "
" + " " @@ -2492,8 +2529,7 @@ public void loginFlowClickSubmitRedirect() throws Exception { int reqCount = getMockWebConnection().getRequestCount(); - final String submitPage = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String submitPage = DOCTYPE_HTML + "Submit page" + "" + "" @@ -2508,8 +2544,7 @@ public void loginFlowClickSubmitRedirect() throws Exception { final URL urlRedirectPage = new URL(URL_FIRST, "redirect.html"); getMockWebConnection().setResponse(urlRedirectPage, "", 302, "Found", null, headers); - final String landingPage = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String landingPage = DOCTYPE_HTML + "Landing page" + ""; final URL urlLandingPage = new URL(URL_FIRST, "landing.html"); @@ -2543,7 +2578,8 @@ public void loginFlowClickSubmitRedirect() throws Exception { */ @Test public void getPageInSeparateThread() throws Exception { - final String html = "testpage\n" + final String html = DOCTYPE_HTML + + "testpage\n" + "\n" + ""; diff --git a/src/test/java/org/htmlunit/WebClientWaitForBackgroundJobsTest.java b/src/test/java/org/htmlunit/WebClientWaitForBackgroundJobsTest.java index 81e79ea3a8e..5406e14d3e6 100644 --- a/src/test/java/org/htmlunit/WebClientWaitForBackgroundJobsTest.java +++ b/src/test/java/org/htmlunit/WebClientWaitForBackgroundJobsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import org.htmlunit.html.HtmlPage; import org.htmlunit.javascript.background.JavaScriptJobManager; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Tries; +import org.htmlunit.junit.annotation.Tries; import org.junit.Test; import org.junit.runner.RunWith; @@ -59,7 +59,8 @@ private void assertMaxTestRunTime(final long maxRunTimeMilliseconds) { */ @Test public void dontWaitWhenUnnecessary() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + " test\n" + " \n" + ""; - final String page3 = ""; diff --git a/src/test/java/org/htmlunit/WebDriverTestCase.java b/src/test/java/org/htmlunit/WebDriverTestCase.java index e1c2e2f09a6..96277ceeef6 100644 --- a/src/test/java/org/htmlunit/WebDriverTestCase.java +++ b/src/test/java/org/htmlunit/WebDriverTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ import static java.nio.charset.StandardCharsets.ISO_8859_1; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.junit.Assert.fail; import java.io.File; import java.io.FileInputStream; @@ -24,6 +23,7 @@ import java.net.URISyntaxException; import java.net.URL; import java.nio.charset.Charset; +import java.time.Duration; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -67,7 +67,6 @@ import org.eclipse.jetty.webapp.WebAppContext; import org.htmlunit.MockWebConnection.RawResponseData; import org.htmlunit.html.HtmlElement; -import org.htmlunit.html.HtmlPageTest; import org.htmlunit.javascript.JavaScriptEngine; import org.htmlunit.util.NameValuePair; import org.junit.After; @@ -90,7 +89,7 @@ import org.openqa.selenium.chrome.ChromeDriverService; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.devtools.DevTools; -import org.openqa.selenium.devtools.v85.emulation.Emulation; +import org.openqa.selenium.devtools.v136.emulation.Emulation; import org.openqa.selenium.edge.EdgeDriver; import org.openqa.selenium.edge.EdgeDriverService; import org.openqa.selenium.edge.EdgeOptions; @@ -145,11 +144,33 @@ */ public abstract class WebDriverTestCase extends WebTestCase { + private static final String LOG_EX_FUNCTION = + " function logEx(e) {\n" + + " let toStr = null;\n" + + " if (toStr === null && e instanceof EvalError) { toStr = ''; }\n" + + " if (toStr === null && e instanceof RangeError) { toStr = ''; }\n" + + " if (toStr === null && e instanceof ReferenceError) { toStr = ''; }\n" + + " if (toStr === null && e instanceof SyntaxError) { toStr = ''; }\n" + + " if (toStr === null && e instanceof TypeError) { toStr = ''; }\n" + + " if (toStr === null && e instanceof URIError) { toStr = ''; }\n" + + " if (toStr === null && e instanceof AggregateError) { toStr = '/AggregateError'; }\n" + + " if (toStr === null && typeof InternalError == 'function' " + + "&& e instanceof InternalError) { toStr = '/InternalError'; }\n" + + " if (toStr === null) {\n" + + " let rx = /\\[object (.*)\\]/;\n" + + " toStr = Object.prototype.toString.call(e);\n" + + " let match = rx.exec(toStr);\n" + + " if (match != null) { toStr = '/' + match[1]; }\n" + + " }" + + " log(e.name + toStr);\n" + + "}\n"; + /** * Function used in many tests. */ public static final String LOG_TITLE_FUNCTION = - " function log(msg) { window.document.title += msg + '\\u00a7'; }\n"; + " function log(msg) { window.document.title += msg + '\\u00a7'; }\n" + + LOG_EX_FUNCTION; /** * Function used in many tests. @@ -162,13 +183,17 @@ public abstract class WebDriverTestCase extends WebTestCase { + "msg = msg.replace(/\\r/g, '\\\\r'); " + "msg = msg.replace(/\\t/g, '\\\\t'); " + "msg = msg.replace(/\\u001e/g, '\\\\u001e'); " - + "window.document.title += msg + '\u00A7';}\n"; + + "window.document.title += msg + '\u00A7';}\n" + + + LOG_EX_FUNCTION; /** * Function used in many tests. */ public static final String LOG_WINDOW_NAME_FUNCTION = - " function log(msg) { window.top.name += msg + '\\u00a7'; }\n window.top.name = '';"; + " function log(msg) { window.top.name += msg + '\\u00a7'; }\n" + + " window.top.name = '';" + + LOG_EX_FUNCTION; /** * Function used in many tests. @@ -182,7 +207,8 @@ public abstract class WebDriverTestCase extends WebTestCase { * Function used in many tests. */ public static final String LOG_TEXTAREA_FUNCTION = " function log(msg) { " - + "document.getElementById('myLog').value += msg + '\u00A7';}\n"; + + "document.getElementById('myLog').value += msg + '\u00A7';}\n" + + LOG_EX_FUNCTION; /** * HtmlSniped to insert text area used for logging. @@ -241,7 +267,6 @@ public abstract class WebDriverTestCase extends WebTestCase { private static final Executor EXECUTOR_POOL = Executors.newFixedThreadPool(4); private boolean useRealBrowser_; - private Boolean useStandards_; /** * The HtmlUnitDriver. @@ -256,6 +281,9 @@ protected boolean needThreeConnections() { return false; } + /** + * @return the browser properties (and initializes them lazy) + */ public static Set getBrowsersProperties() { if (BROWSERS_PROPERTIES_ == null) { try { @@ -477,14 +505,6 @@ public void setUseRealBrowser(final boolean useRealBrowser) { useRealBrowser_ = useRealBrowser; } - /** - * Sets whether to use {@code Standards Mode} or not. - * @param useStandards whether to use {@code Standards Mode} or not - */ - public void setUseStandards(final boolean useStandards) { - useStandards_ = useStandards; - } - /** * Builds a new WebDriver instance. * @return the instance @@ -506,7 +526,7 @@ protected WebDriver buildWebDriver() throws IOException { final EdgeOptions options = new EdgeOptions(); // BiDi - options.setCapability("webSocketUrl", true); + // options.setCapability("webSocketUrl", true); options.addArguments("--lang=" + locale); options.addArguments("--remote-allow-origins=*"); @@ -542,7 +562,7 @@ protected WebDriver buildWebDriver() throws IOException { final ChromeOptions options = new ChromeOptions(); // BiDi - options.setCapability("webSocketUrl", true); + // options.setCapability("webSocketUrl", true); options.addArguments("--lang=" + locale); options.addArguments("--remote-allow-origins=*"); @@ -597,7 +617,7 @@ private FirefoxDriver createFirefoxDriver(final String geckodriverBinary, final final FirefoxOptions options = new FirefoxOptions(); // BiDi - options.setCapability("webSocketUrl", true); + // options.setCapability("webSocketUrl", true); options.setBinary(binary); @@ -614,16 +634,6 @@ private FirefoxDriver createFirefoxDriver(final String geckodriverBinary, final return new FirefoxDriver(service, options); } - private static String getBrowserName(final BrowserVersion browserVersion) { - if (browserVersion == BrowserVersion.FIREFOX) { - return browserVersion.getNickname() + '-' + browserVersion.getBrowserVersionNumeric(); - } - if (browserVersion == BrowserVersion.FIREFOX_ESR) { - return browserVersion.getNickname() + '-' + browserVersion.getBrowserVersionNumeric(); - } - return browserVersion.getNickname(); - } - /** * Starts the web server delivering response from the provided connection. * @param mockConnection the sources for responses @@ -951,18 +961,9 @@ protected final WebDriver loadPage2(final String html, final URL url, * @return the web driver * @throws Exception if something goes wrong */ - protected final WebDriver loadPage2(String html, final URL url, + protected final WebDriver loadPage2(final String html, final URL url, final String contentType, final Charset charset, final Charset serverCharset) throws Exception { - if (useStandards_ != null) { - if (html.startsWith(HtmlPageTest.STANDARDS_MODE_PREFIX_)) { - fail("HTML must not be prefixed with Standards Mode."); - } - if (useStandards_) { - html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + html; - } - } getMockWebConnection().setResponse(url, html, contentType, charset); - return loadPage2(url, serverCharset); } @@ -1095,20 +1096,30 @@ protected final WebDriver loadPageVerifyTitle2(final String html, final String.. return verifyTitle2(driver, expectedAlerts); } - protected final WebDriver verifyTitle2(final long maxWaitTime, final WebDriver driver, + protected final WebDriver verifyTitle2(final Duration maxWaitTime, final WebDriver driver, final String... expectedAlerts) throws Exception { - final long maxWait = System.currentTimeMillis() + maxWaitTime; + + final StringBuilder expected = new StringBuilder(); + for (int i = 0; i < expectedAlerts.length; i++) { + expected.append(expectedAlerts[i]).append('\u00A7'); + } + final String expectedTitle = expected.toString(); + + final long maxWait = System.currentTimeMillis() + maxWaitTime.toMillis(); while (System.currentTimeMillis() < maxWait) { try { - return verifyTitle2(driver, expectedAlerts); + final String title = driver.getTitle(); + assertEquals(expectedTitle, title); + return driver; } catch (final AssertionError e) { // ignore and wait } } - return verifyTitle2(driver, expectedAlerts); + assertEquals(expectedTitle, driver.getTitle()); + return driver; } protected final WebDriver verifyTitle2(final WebDriver driver, @@ -1152,14 +1163,14 @@ protected final WebDriver verifyTextArea2(final WebDriver driver, final WebElement textArea = driver.findElement(By.id("myLog")); if (expectedAlerts.length == 0) { - assertEquals("", textArea.getAttribute("value")); + assertEquals("", textArea.getDomProperty("value")); return driver; } if (!useRealBrowser() && expectedAlerts.length == 1 && expectedAlerts[0].startsWith("data:image/png;base64,")) { - String value = textArea.getAttribute("value"); + String value = textArea.getDomProperty("value"); if (value.endsWith("\u00A7")) { value = value.substring(0, value.length() - 1); } @@ -1171,7 +1182,7 @@ protected final WebDriver verifyTextArea2(final WebDriver driver, for (int i = 0; i < expectedAlerts.length; i++) { expected.append(expectedAlerts[i]).append('\u00A7'); } - verify(() -> textArea.getAttribute("value"), expected.toString()); + verify(() -> textArea.getDomProperty("value"), expected.toString()); return driver; } @@ -1191,9 +1202,9 @@ protected final WebDriver verifyJsVariable(final WebDriver driver, final String return driver; } - protected final WebDriver verifyWindowName2(final long maxWaitTime, final WebDriver driver, + protected final WebDriver verifyWindowName2(final Duration maxWaitTime, final WebDriver driver, final String... expectedAlerts) throws Exception { - final long maxWait = System.currentTimeMillis() + maxWaitTime; + final long maxWait = System.currentTimeMillis() + maxWaitTime.toMillis(); while (System.currentTimeMillis() < maxWait) { try { @@ -1236,7 +1247,7 @@ protected final WebDriver verifySessionStorage2(final WebDriver driver, * @return the web driver * @throws Exception if something goes wrong */ - protected final WebDriver loadPageWithAlerts2(final String html, final long maxWaitTime) throws Exception { + protected final WebDriver loadPageWithAlerts2(final String html, final Duration maxWaitTime) throws Exception { return loadPageWithAlerts2(html, URL_FIRST, maxWaitTime); } @@ -1259,7 +1270,7 @@ protected final WebDriver loadPageWithAlerts2(final String html, final URL url) * @return the web driver * @throws Exception if something goes wrong */ - protected final WebDriver loadPageWithAlerts2(final String html, final URL url, final long maxWaitTime) + protected final WebDriver loadPageWithAlerts2(final String html, final URL url, final Duration maxWaitTime) throws Exception { final WebDriver driver = loadPage2(html, url); @@ -1285,7 +1296,7 @@ protected void verifyAlerts(final WebDriver driver, final String... expectedAler * @param expected the expected alerts * @throws Exception in case of failure */ - protected void verifyAlerts(final long maxWaitTime, final WebDriver driver, final String... expected) + protected void verifyAlerts(final Duration maxWaitTime, final WebDriver driver, final String... expected) throws Exception { final List actualAlerts = getCollectedAlerts(maxWaitTime, driver, expected.length); @@ -1333,7 +1344,7 @@ protected final WebDriver loadPageWithAlerts2(final String html, * @return the web driver * @throws Exception if something goes wrong */ - protected final WebDriver loadPageWithAlerts2(final String html, final URL url, final long maxWaitTime, + protected final WebDriver loadPageWithAlerts2(final String html, final URL url, final Duration maxWaitTime, final Map> servlets) throws Exception { expandExpectedAlertsVariables(URL_FIRST); @@ -1362,7 +1373,7 @@ protected final WebDriver loadPageWithAlerts2(final URL url) throws Exception { * @return the web driver * @throws Exception if something goes wrong */ - protected final WebDriver loadPageWithAlerts2(final URL url, final long maxWaitTime) throws Exception { + protected final WebDriver loadPageWithAlerts2(final URL url, final Duration maxWaitTime) throws Exception { startWebServer(getMockWebConnection(), null); final WebDriver driver = getWebDriver(); @@ -1404,11 +1415,11 @@ protected List getCollectedAlerts(final WebDriver driver, final int aler * @return the collected alerts * @throws Exception in case of problem */ - protected List getCollectedAlerts(final long maxWaitTime, final WebDriver driver, final int alertsLength) - throws Exception { + protected List getCollectedAlerts(final Duration maxWaitTime, + final WebDriver driver, final int alertsLength) throws Exception { final List collectedAlerts = new ArrayList<>(); - long maxWait = System.currentTimeMillis() + maxWaitTime; + long maxWait = System.currentTimeMillis() + maxWaitTime.toMillis(); while (collectedAlerts.size() < alertsLength && System.currentTimeMillis() < maxWait) { try { @@ -1558,7 +1569,7 @@ public void beforeTest() throws InterruptedException { * @throws Exception in case of failure */ protected void assertTitle(final WebDriver webdriver, final String expected) throws Exception { - final long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME; + final long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME.toMillis(); while (true) { final String title = webdriver.getTitle(); diff --git a/src/test/java/org/htmlunit/WebRequest2Test.java b/src/test/java/org/htmlunit/WebRequest2Test.java index 6a776fc3dc3..e83cd11acea 100644 --- a/src/test/java/org/htmlunit/WebRequest2Test.java +++ b/src/test/java/org/htmlunit/WebRequest2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -186,6 +186,9 @@ public void getParametersFromQueryAndUrlEncodedBodyPost() throws Exception { assertEquals("d", parameters.get(1).getValue()); } + /** + * @throws Exception if the test fails + */ @Test public void getParametersFromQueryAndUrlEncodedBodyPostWhenEncodingTypeIsMultipart() throws Exception { final URL url = new URL(URL_FIRST, "?a=b"); @@ -206,6 +209,9 @@ public void getParametersFromQueryAndUrlEncodedBodyPostWhenEncodingTypeIsMultipa assertEquals("d", parameters.get(1).getValue()); } + /** + * @throws Exception if the test fails + */ @Test public void getParametersUrlEncodedPostNoBody() throws Exception { final URL url = new URL(URL_FIRST, "?a=b"); @@ -223,6 +229,9 @@ public void getParametersUrlEncodedPostNoBody() throws Exception { assertEquals("b", parameters.get(0).getValue()); } + /** + * @throws Exception if the test fails + */ @Test public void getParametersTextEncodedPostNoBody() throws Exception { final URL url = new URL(URL_FIRST, "?a=b"); @@ -240,6 +249,9 @@ public void getParametersTextEncodedPostNoBody() throws Exception { assertEquals("b", parameters.get(0).getValue()); } + /** + * @throws Exception if the test fails + */ @Test public void getParametersTextEncodedPostBody() throws Exception { final URL url = new URL(URL_FIRST, "?a=b"); diff --git a/src/test/java/org/htmlunit/WebRequestTest.java b/src/test/java/org/htmlunit/WebRequestTest.java index ac07ae40c53..ec9d572e1e1 100644 --- a/src/test/java/org/htmlunit/WebRequestTest.java +++ b/src/test/java/org/htmlunit/WebRequestTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/WebResponse2Test.java b/src/test/java/org/htmlunit/WebResponse2Test.java index 79f6c434fe4..ecc87406cef 100644 --- a/src/test/java/org/htmlunit/WebResponse2Test.java +++ b/src/test/java/org/htmlunit/WebResponse2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,13 +42,13 @@ public class WebResponse2Test extends SimpleWebTestCase { */ @Test public void charsetInMetaTag() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "foo\n" + ""; final HtmlPage page = loadPage(html); - assertSame(UTF_8, page.getWebResponse().getContentCharsetOrNull()); + assertSame(UTF_8, page.getWebResponse().getContentCharset()); assertEquals(html, page.getWebResponse().getContentAsString()); } diff --git a/src/test/java/org/htmlunit/WebResponseData2Test.java b/src/test/java/org/htmlunit/WebResponseData2Test.java index ba2687af019..00dca7c4bda 100644 --- a/src/test/java/org/htmlunit/WebResponseData2Test.java +++ b/src/test/java/org/htmlunit/WebResponseData2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/WebResponseDataTest.java b/src/test/java/org/htmlunit/WebResponseDataTest.java index 5b082206cae..1e3c7993252 100644 --- a/src/test/java/org/htmlunit/WebResponseDataTest.java +++ b/src/test/java/org/htmlunit/WebResponseDataTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/WebResponseTest.java b/src/test/java/org/htmlunit/WebResponseTest.java index 276be329ecb..c0db0a16024 100644 --- a/src/test/java/org/htmlunit/WebResponseTest.java +++ b/src/test/java/org/htmlunit/WebResponseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,8 +59,8 @@ public class WebResponseTest extends WebServerTestCase { @Test public void encodingCharsetUtf8() throws Exception { final String title = "\u6211\u662F\u6211\u7684FOCUS"; - final String content = - "\n" + final String content = DOCTYPE_HTML + + "\n" + "" + title + "\n" + "\n" + "\n" @@ -178,7 +178,8 @@ public void getContentAsStringIllegalCharset() throws Exception { * Servlet for {@link #binaryResponseHeaders()}. */ public static class BinaryResponseHeadersServlet extends HttpServlet { - private static final String RESPONSE = "FooThis is foo!"; + private static final String RESPONSE = DOCTYPE_HTML + + "FooThis is foo!"; /** * {@inheritDoc} @@ -218,7 +219,7 @@ public void binaryResponseHeaders() throws Exception { page.getWebResponse().getContentAsString(UTF_8)); assertEquals("gzip", page.getWebResponse().getResponseHeaderValue("Content-Encoding")); - assertEquals("73", page.getWebResponse().getResponseHeaderValue(HttpHeader.CONTENT_LENGTH)); + assertEquals("85", page.getWebResponse().getResponseHeaderValue(HttpHeader.CONTENT_LENGTH)); } /** diff --git a/src/test/java/org/htmlunit/WebServerTestCase.java b/src/test/java/org/htmlunit/WebServerTestCase.java index 86721dab290..70f36b0efda 100644 --- a/src/test/java/org/htmlunit/WebServerTestCase.java +++ b/src/test/java/org/htmlunit/WebServerTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import java.net.BindException; import java.net.URL; import java.nio.charset.Charset; +import java.time.Duration; import java.util.List; import java.util.Map; @@ -256,7 +257,7 @@ public void tearDown() throws Exception { */ protected final HtmlPage loadPageWithAlerts(final String html, final URL url) throws Exception { - return loadPageWithAlerts(html, url, 0); + return loadPageWithAlerts(html, url, Duration.ofSeconds(0)); } /** @@ -267,7 +268,7 @@ protected final HtmlPage loadPageWithAlerts(final String html, final URL url) * @return the page * @throws Exception if something goes wrong */ - protected final HtmlPage loadPageWithAlerts(final String html, final URL url, final long maxWaitTime) + protected final HtmlPage loadPageWithAlerts(final String html, final URL url, final Duration maxWaitTime) throws Exception { alertHandler_.clear(); expandExpectedAlertsVariables(URL_FIRST); @@ -276,7 +277,7 @@ protected final HtmlPage loadPageWithAlerts(final String html, final URL url, fi final HtmlPage page = loadPage(html, url); List actualAlerts = getCollectedAlerts(page); - final long maxWait = System.currentTimeMillis() + maxWaitTime; + final long maxWait = System.currentTimeMillis() + maxWaitTime.toMillis(); while (actualAlerts.size() < expectedAlerts.length && System.currentTimeMillis() < maxWait) { Thread.sleep(30); actualAlerts = getCollectedAlerts(page); @@ -493,7 +494,7 @@ protected SslConnectionFactory getSslConnectionFactory() { * Returns the WebClient instance for the current test with the current {@link BrowserVersion}. * @return a WebClient with the current {@link BrowserVersion} */ - protected final WebClient getWebClient() { + protected WebClient getWebClient() { if (webClient_ == null) { webClient_ = new WebClient(getBrowserVersion()); webClient_.setAlertHandler(alertHandler_); diff --git a/src/test/java/org/htmlunit/WebTestCase.java b/src/test/java/org/htmlunit/WebTestCase.java index c1cb0b1fa47..356a6606118 100644 --- a/src/test/java/org/htmlunit/WebTestCase.java +++ b/src/test/java/org/htmlunit/WebTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,8 +27,10 @@ import java.net.URL; import java.nio.file.Files; import java.nio.file.Paths; +import java.time.Duration; import java.util.ArrayList; import java.util.Arrays; +import java.util.Base64; import java.util.List; import java.util.Locale; import java.util.Objects; @@ -36,7 +38,6 @@ import javax.imageio.ImageIO; -import org.apache.commons.codec.binary.Base64; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.SerializationUtils; import org.htmlunit.junit.RetryRule; @@ -67,6 +68,9 @@ */ public abstract class WebTestCase { + /** The html5 doctype. */ + public static final String DOCTYPE_HTML = "\n"; + /** * Make the test method name available to the tests. */ @@ -79,9 +83,7 @@ public abstract class WebTestCase { @Rule public final RetryRule retryRule_ = new RetryRule(4); - - - /** Logging support. */ + // /** Logging support. */ // private static final Log LOG = LogFactory.getLog(WebTestCase.class); /** save the environment */ @@ -114,7 +116,7 @@ public abstract class WebTestCase { public static final String SOCKS_PROXY_HOST = System.getProperty("htmlunit.test.socksproxy.host", "localhost"); /** The default time used to wait for the expected alerts. */ - protected static final long DEFAULT_WAIT_TIME = 1000; + protected static final Duration DEFAULT_WAIT_TIME = Duration.ofSeconds(1); /** Constant for the URL which is used in the tests. */ public static final URL URL_FIRST; @@ -484,8 +486,8 @@ protected void verify(final Supplier func, final String expected) throws * @throws Exception in case of failure */ protected void verify(final Supplier func, final String expected, - final long maxWaitTime) throws Exception { - final long maxWait = System.currentTimeMillis() + maxWaitTime; + final Duration maxWaitTime) throws Exception { + final long maxWait = System.currentTimeMillis() + maxWaitTime.toMillis(); String actual = null; while (System.currentTimeMillis() < maxWait) { @@ -553,7 +555,7 @@ protected String getFileContent(final String fileName) throws IOException { protected void compareImages(final String expected, final String current) throws IOException { final String currentBase64Image = current.split(",")[1]; - final byte[] currentImageBytes = Base64.decodeBase64(currentBase64Image); + final byte[] currentImageBytes = Base64.getDecoder().decode(currentBase64Image); try (ByteArrayInputStream currentBis = new ByteArrayInputStream(currentImageBytes)) { final BufferedImage currentImage = ImageIO.read(currentBis); @@ -565,7 +567,7 @@ protected void compareImages(final String expected, final String current) throws protected void compareImages(final String expected, final String current, final BufferedImage currentImage) throws IOException { final String expectedBase64Image = expected.split(",")[1]; - final byte[] expectedImageBytes = Base64.decodeBase64(expectedBase64Image); + final byte[] expectedImageBytes = Base64.getDecoder().decode(expectedBase64Image); try (ByteArrayInputStream expectedBis = new ByteArrayInputStream(expectedImageBytes)) { final BufferedImage expectedImage = ImageIO.read(expectedBis); diff --git a/src/test/java/org/htmlunit/WebWindowListenerTest.java b/src/test/java/org/htmlunit/WebWindowListenerTest.java index 72c8b61350a..ca46007d2f2 100644 --- a/src/test/java/org/htmlunit/WebWindowListenerTest.java +++ b/src/test/java/org/htmlunit/WebWindowListenerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,11 @@ */ package org.htmlunit; +import org.apache.commons.lang3.StringUtils; import org.htmlunit.html.HtmlPage; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.NotYetImplemented; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; @@ -34,10 +36,19 @@ public class WebWindowListenerTest extends SimpleWebTestCase { * @throws Exception if the test fails */ @Test - @NotYetImplemented + @Alerts("changed '(null)' - 'Test 1 [org.htmlunit.TopLevelWindow]'; " + + "changed 'Test 1 [org.htmlunit.TopLevelWindow]' - 'Test 2 [org.htmlunit.TopLevelWindow]'; ") + @HtmlUnitNYI(CHROME = "changed 'Test 1 [org.htmlunit.TopLevelWindow]' - 'Test 2 [org.htmlunit.TopLevelWindow]'; " + + "changed '(null)' - 'Test 1 [org.htmlunit.TopLevelWindow]'; ", + EDGE = "changed 'Test 1 [org.htmlunit.TopLevelWindow]' - 'Test 2 [org.htmlunit.TopLevelWindow]'; " + + "changed '(null)' - 'Test 1 [org.htmlunit.TopLevelWindow]'; ", + FF = "changed 'Test 1 [org.htmlunit.TopLevelWindow]' - 'Test 2 [org.htmlunit.TopLevelWindow]'; " + + "changed '(null)' - 'Test 1 [org.htmlunit.TopLevelWindow]'; ", + FF_ESR = "changed 'Test 1 [org.htmlunit.TopLevelWindow]' - 'Test 2 [org.htmlunit.TopLevelWindow]'; " + + "changed '(null)' - 'Test 1 [org.htmlunit.TopLevelWindow]'; ") public void eventOrder() throws Exception { - final String firstHtml - = "\n" + final String firstHtml = DOCTYPE_HTML + + "\n" + "Test 1\n" + "\n" + "\n" + " " + " \n"; final String workerJs = "onmessage = function(e) {\n" @@ -55,7 +56,7 @@ private void test(final String className) throws Exception { // normalize FF output + " clsName = clsName.replace('{\\n [native code]\\n}', '{ [native code] }');\n" + " workerResult += clsName;\n" - + " } catch(e) {workerResult = 'exception'}\n" + + " } catch(e) {workerResult = e.name}\n" + " postMessage(workerResult);\n" + "}\n"; @@ -69,7 +70,7 @@ private void test(final String className) throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void abstractList() throws Exception { test("AbstractList"); } @@ -78,7 +79,7 @@ public void abstractList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void abstractRange() throws Exception { test("AbstractRange"); } @@ -87,7 +88,7 @@ public void abstractRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void abstractWorker() throws Exception { test("AbstractWorker"); } @@ -98,7 +99,7 @@ public void abstractWorker() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void activeXObject() throws Exception { test("ActiveXObject"); } @@ -107,7 +108,7 @@ public void activeXObject() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ambientLightSensor() throws Exception { test("AmbientLightSensor"); } @@ -116,7 +117,7 @@ public void ambientLightSensor() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ambientLightSensorReading() throws Exception { test("AmbientLightSensorReading"); } @@ -127,7 +128,7 @@ public void ambientLightSensorReading() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void analyserNode() throws Exception { test("AnalyserNode"); } @@ -136,7 +137,7 @@ public void analyserNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void angle_instanced_arrays() throws Exception { test("ANGLE_instanced_arrays"); } @@ -145,7 +146,7 @@ public void angle_instanced_arrays() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animation() throws Exception { test("Animation"); } @@ -154,7 +155,7 @@ public void animation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationEffectReadOnly() throws Exception { test("AnimationEffectReadOnly"); } @@ -163,7 +164,7 @@ public void animationEffectReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationEffectTiming() throws Exception { test("AnimationEffectTiming"); } @@ -172,7 +173,7 @@ public void animationEffectTiming() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationEffectTimingProperties() throws Exception { test("AnimationEffectTimingProperties"); } @@ -181,7 +182,7 @@ public void animationEffectTimingProperties() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationEffectTimingReadOnly() throws Exception { test("AnimationEffectTimingReadOnly"); } @@ -190,7 +191,7 @@ public void animationEffectTimingReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationEvent() throws Exception { test("AnimationEvent"); } @@ -199,7 +200,7 @@ public void animationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationPlaybackEvent() throws Exception { test("AnimationPlaybackEvent"); } @@ -208,7 +209,7 @@ public void animationPlaybackEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationPlayer() throws Exception { test("AnimationPlayer"); } @@ -217,7 +218,7 @@ public void animationPlayer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationTimeline() throws Exception { test("AnimationTimeline"); } @@ -226,7 +227,7 @@ public void animationTimeline() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void appBannerPromptResult() throws Exception { test("AppBannerPromptResult"); } @@ -237,7 +238,7 @@ public void appBannerPromptResult() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void applicationCache() throws Exception { test("ApplicationCache"); } @@ -246,7 +247,7 @@ public void applicationCache() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void applicationCacheErrorEvent() throws Exception { test("ApplicationCacheErrorEvent"); } @@ -255,7 +256,7 @@ public void applicationCacheErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void apps_mgmt() throws Exception { test("Apps.mgmt"); } @@ -297,7 +298,7 @@ public void arrayBuffer() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void arrayBufferView() throws Exception { test("ArrayBufferView"); } @@ -308,7 +309,7 @@ public void arrayBufferView() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void arrayBufferViewBase() throws Exception { test("ArrayBufferViewBase"); } @@ -317,7 +318,7 @@ public void arrayBufferViewBase() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void asyncFunction() throws Exception { test("AsyncFunction"); } @@ -337,7 +338,7 @@ public void atomics() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void attr() throws Exception { test("Attr"); } @@ -346,7 +347,7 @@ public void attr() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audio() throws Exception { test("Audio"); } @@ -355,7 +356,7 @@ public void audio() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audioBuffer() throws Exception { test("AudioBuffer"); } @@ -364,7 +365,7 @@ public void audioBuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audioBufferSourceNode() throws Exception { test("AudioBufferSourceNode"); } @@ -373,7 +374,7 @@ public void audioBufferSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audioChannelManager() throws Exception { test("AudioChannelManager"); } @@ -382,7 +383,7 @@ public void audioChannelManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audioContext() throws Exception { test("AudioContext"); } @@ -391,7 +392,7 @@ public void audioContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audioDestinationNode() throws Exception { test("AudioDestinationNode"); } @@ -400,7 +401,7 @@ public void audioDestinationNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audioListener() throws Exception { test("AudioListener"); } @@ -409,7 +410,7 @@ public void audioListener() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audioNode() throws Exception { test("AudioNode"); } @@ -420,7 +421,7 @@ public void audioNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audioParam() throws Exception { test("AudioParam"); } @@ -429,7 +430,7 @@ public void audioParam() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audioProcessingEvent() throws Exception { test("AudioProcessingEvent"); } @@ -438,7 +439,7 @@ public void audioProcessingEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audioScheduledSourceNode() throws Exception { test("AudioScheduledSourceNode"); } @@ -447,7 +448,7 @@ public void audioScheduledSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void autocompleteErrorEvent() throws Exception { test("AutocompleteErrorEvent"); } @@ -456,7 +457,7 @@ public void autocompleteErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void barProp() throws Exception { test("BarProp"); } @@ -465,7 +466,7 @@ public void barProp() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void baseAudioContext() throws Exception { test("BaseAudioContext"); } @@ -474,7 +475,7 @@ public void baseAudioContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void batteryManager() throws Exception { test("BatteryManager"); } @@ -483,7 +484,7 @@ public void batteryManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void beforeInstallPrompt() throws Exception { test("BeforeInstallPrompt"); } @@ -492,7 +493,7 @@ public void beforeInstallPrompt() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void beforeInstallPromptEvent() throws Exception { test("BeforeInstallPromptEvent"); } @@ -503,7 +504,7 @@ public void beforeInstallPromptEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void beforeUnloadEvent() throws Exception { test("BeforeUnloadEvent"); } @@ -512,7 +513,16 @@ public void beforeUnloadEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("function BigInt() { [native code] }") + public void bigInt() throws Exception { + test("BigInt"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("ReferenceError") public void biquadFilterNode() throws Exception { test("BiquadFilterNode"); } @@ -530,7 +540,7 @@ public void blob() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void blobBuilder() throws Exception { test("BlobBuilder"); } @@ -539,7 +549,7 @@ public void blobBuilder() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void blobEvent() throws Exception { test("BlobEvent"); } @@ -548,7 +558,7 @@ public void blobEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetooth() throws Exception { test("Bluetooth"); } @@ -557,7 +567,7 @@ public void bluetooth() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothAdapter() throws Exception { test("BluetoothAdapter"); } @@ -566,7 +576,7 @@ public void bluetoothAdapter() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothAdvertisingData() throws Exception { test("BluetoothAdvertisingData"); } @@ -575,7 +585,7 @@ public void bluetoothAdvertisingData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothCharacteristicProperties() throws Exception { test("BluetoothCharacteristicProperties"); } @@ -584,7 +594,7 @@ public void bluetoothCharacteristicProperties() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothDevice() throws Exception { test("BluetoothDevice"); } @@ -593,7 +603,7 @@ public void bluetoothDevice() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothDeviceEvent() throws Exception { test("BluetoothDeviceEvent"); } @@ -602,7 +612,7 @@ public void bluetoothDeviceEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothGATTRemoteServer() throws Exception { test("BluetoothGATTRemoteServer"); } @@ -611,7 +621,7 @@ public void bluetoothGATTRemoteServer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothGATTService() throws Exception { test("BluetoothGATTService"); } @@ -620,7 +630,7 @@ public void bluetoothGATTService() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothManager() throws Exception { test("BluetoothManager"); } @@ -629,7 +639,7 @@ public void bluetoothManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothRemoteGATTCharacteristic() throws Exception { test("BluetoothRemoteGATTCharacteristic"); } @@ -638,7 +648,7 @@ public void bluetoothRemoteGATTCharacteristic() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothRemoteGATTServer() throws Exception { test("BluetoothRemoteGATTServer"); } @@ -647,7 +657,7 @@ public void bluetoothRemoteGATTServer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothStatusChangedEvent() throws Exception { test("BluetoothStatusChangedEvent"); } @@ -656,7 +666,7 @@ public void bluetoothStatusChangedEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void body() throws Exception { test("Body"); } @@ -665,7 +675,7 @@ public void body() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void boxObject() throws Exception { test("BoxObject"); } @@ -683,7 +693,7 @@ public void broadcastChannel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void budgetService() throws Exception { test("BudgetService"); } @@ -692,7 +702,7 @@ public void budgetService() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void budgetState() throws Exception { test("BudgetState"); } @@ -701,7 +711,7 @@ public void budgetState() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bufferSource() throws Exception { test("BufferSource"); } @@ -710,7 +720,7 @@ public void bufferSource() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void byteString() throws Exception { test("ByteString"); } @@ -737,7 +747,7 @@ public void cacheStorage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void callEvent() throws Exception { test("CallEvent"); } @@ -746,7 +756,7 @@ public void callEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cameraCapabilities() throws Exception { test("CameraCapabilities"); } @@ -755,7 +765,7 @@ public void cameraCapabilities() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cameraControl() throws Exception { test("CameraControl"); } @@ -764,7 +774,7 @@ public void cameraControl() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cameraManager() throws Exception { test("CameraManager"); } @@ -773,7 +783,7 @@ public void cameraManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void canvasCaptureMediaStream() throws Exception { test("CanvasCaptureMediaStream"); } @@ -782,7 +792,7 @@ public void canvasCaptureMediaStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void canvasCaptureMediaStreamTrack() throws Exception { test("CanvasCaptureMediaStreamTrack"); } @@ -800,7 +810,7 @@ public void canvasGradient() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void canvasImageSource() throws Exception { test("CanvasImageSource"); } @@ -820,7 +830,7 @@ public void canvasPattern() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void canvasRenderingContext2D() throws Exception { test("CanvasRenderingContext2D"); } @@ -829,7 +839,7 @@ public void canvasRenderingContext2D() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void caretPosition() throws Exception { test("CaretPosition"); } @@ -840,7 +850,7 @@ public void caretPosition() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cdataSection() throws Exception { test("CDATASection"); } @@ -851,7 +861,7 @@ public void cdataSection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void channelMergerNode() throws Exception { test("ChannelMergerNode"); } @@ -860,7 +870,7 @@ public void channelMergerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void channelSplitterNode() throws Exception { test("ChannelSplitterNode"); } @@ -869,7 +879,7 @@ public void channelSplitterNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void characterData() throws Exception { test("CharacterData"); } @@ -880,7 +890,7 @@ public void characterData() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void characterDataImpl() throws Exception { test("CharacterDataImpl"); } @@ -889,7 +899,7 @@ public void characterDataImpl() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void childNode() throws Exception { test("ChildNode"); } @@ -898,7 +908,7 @@ public void childNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void chromeWorker() throws Exception { test("ChromeWorker"); } @@ -907,36 +917,16 @@ public void chromeWorker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void client() throws Exception { test("Client"); } - /** - * Test {@link org.htmlunit.javascript.host.ClientRect}. - * - * @throws Exception if an error occurs - */ - @Test - @Alerts("exception") - public void clientRect() throws Exception { - test("ClientRect"); - } - - /** - * @throws Exception if an error occurs - */ - @Test - @Alerts("exception") - public void clientRectList() throws Exception { - test("ClientRectList"); - } - /** * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void clients() throws Exception { test("Clients"); } @@ -945,7 +935,7 @@ public void clients() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void clipboardData() throws Exception { test("ClipboardData"); } @@ -954,7 +944,7 @@ public void clipboardData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void clipboardEvent() throws Exception { test("ClipboardEvent"); } @@ -974,7 +964,7 @@ public void closeEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void comment() throws Exception { test("Comment"); } @@ -983,7 +973,7 @@ public void comment() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void compositionEvent() throws Exception { test("CompositionEvent"); } @@ -994,7 +984,7 @@ public void compositionEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void computedCSSStyleDeclaration() throws Exception { test("ComputedCSSStyleDeclaration"); } @@ -1003,7 +993,7 @@ public void computedCSSStyleDeclaration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void connection() throws Exception { test(HttpHeader.CONNECTION); } @@ -1014,7 +1004,7 @@ public void connection() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void console() throws Exception { test("Console"); } @@ -1023,7 +1013,7 @@ public void console() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void constantSourceNode() throws Exception { test("ConstantSourceNode"); } @@ -1032,7 +1022,7 @@ public void constantSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void constrainBoolean() throws Exception { test("ConstrainBoolean"); } @@ -1041,7 +1031,7 @@ public void constrainBoolean() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void constrainDOMString() throws Exception { test("ConstrainDOMString"); } @@ -1050,7 +1040,7 @@ public void constrainDOMString() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void constrainDouble() throws Exception { test("ConstrainDouble"); } @@ -1059,7 +1049,7 @@ public void constrainDouble() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void constrainLong() throws Exception { test("ConstrainLong"); } @@ -1068,7 +1058,7 @@ public void constrainLong() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void contactManager() throws Exception { test("ContactManager"); } @@ -1077,7 +1067,7 @@ public void contactManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void convolverNode() throws Exception { test("ConvolverNode"); } @@ -1088,7 +1078,7 @@ public void convolverNode() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void coordinates() throws Exception { test("Coordinates"); } @@ -1097,7 +1087,7 @@ public void coordinates() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void credential() throws Exception { test("Credential"); } @@ -1106,7 +1096,7 @@ public void credential() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void credentialsContainer() throws Exception { test("CredentialsContainer"); } @@ -1133,7 +1123,7 @@ public void cryptoKey() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void css() throws Exception { test("CSS"); } @@ -1144,7 +1134,7 @@ public void css() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void css2Properties() throws Exception { test("CSS2Properties"); } @@ -1155,7 +1145,7 @@ public void css2Properties() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssPageDescriptors() throws Exception { test("CSSPageDescriptors"); } @@ -1164,7 +1154,7 @@ public void cssPageDescriptors() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssCharsetRule() throws Exception { test("CSSCharsetRule"); } @@ -1173,7 +1163,7 @@ public void cssCharsetRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssConditionRule() throws Exception { test("CSSConditionRule"); } @@ -1182,7 +1172,7 @@ public void cssConditionRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssCounterStyleRule() throws Exception { test("CSSCounterStyleRule"); } @@ -1193,7 +1183,7 @@ public void cssCounterStyleRule() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssFontFaceRule() throws Exception { test("CSSFontFaceRule"); } @@ -1202,7 +1192,7 @@ public void cssFontFaceRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssGroupingRule() throws Exception { test("CSSGroupingRule"); } @@ -1213,7 +1203,7 @@ public void cssGroupingRule() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssImportRule() throws Exception { test("CSSImportRule"); } @@ -1222,7 +1212,7 @@ public void cssImportRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssKeyframeRule() throws Exception { test("CSSKeyframeRule"); } @@ -1231,7 +1221,7 @@ public void cssKeyframeRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssKeyframesRule() throws Exception { test("CSSKeyframesRule"); } @@ -1240,7 +1230,7 @@ public void cssKeyframesRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssMatrix() throws Exception { test("CSSMatrix"); } @@ -1251,7 +1241,7 @@ public void cssMatrix() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssMediaRule() throws Exception { test("CSSMediaRule"); } @@ -1260,7 +1250,7 @@ public void cssMediaRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssNamespaceRule() throws Exception { test("CSSNamespaceRule"); } @@ -1269,7 +1259,7 @@ public void cssNamespaceRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssPageRule() throws Exception { test("CSSPageRule"); } @@ -1280,7 +1270,7 @@ public void cssPageRule() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssPrimitiveValue() throws Exception { test("CSSPrimitiveValue"); } @@ -1291,7 +1281,7 @@ public void cssPrimitiveValue() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssRule() throws Exception { test("CSSRule"); } @@ -1302,7 +1292,7 @@ public void cssRule() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssRuleList() throws Exception { test("CSSRuleList"); } @@ -1313,7 +1303,7 @@ public void cssRuleList() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssStyleDeclaration() throws Exception { test("CSSStyleDeclaration"); } @@ -1324,7 +1314,7 @@ public void cssStyleDeclaration() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssStyleRule() throws Exception { test("CSSStyleRule"); } @@ -1335,7 +1325,7 @@ public void cssStyleRule() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssStyleSheet() throws Exception { test("CSSStyleSheet"); } @@ -1344,7 +1334,7 @@ public void cssStyleSheet() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssSupportsRule() throws Exception { test("CSSSupportsRule"); } @@ -1353,7 +1343,7 @@ public void cssSupportsRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssUnknownRule() throws Exception { test("CSSUnknownRule"); } @@ -1364,7 +1354,7 @@ public void cssUnknownRule() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssValue() throws Exception { test("CSSValue"); } @@ -1373,7 +1363,7 @@ public void cssValue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssValueList() throws Exception { test("CSSValueList"); } @@ -1382,7 +1372,7 @@ public void cssValueList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssViewportRule() throws Exception { test("CSSViewportRule"); } @@ -1391,7 +1381,7 @@ public void cssViewportRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void customElementRegistry() throws Exception { test("CustomElementRegistry"); } @@ -1409,7 +1399,7 @@ public void customEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dataStore() throws Exception { test("DataStore"); } @@ -1418,7 +1408,7 @@ public void dataStore() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dataStoreChangeEvent() throws Exception { test("DataStoreChangeEvent"); } @@ -1427,7 +1417,7 @@ public void dataStoreChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dataStoreCursor() throws Exception { test("DataStoreCursor"); } @@ -1436,7 +1426,7 @@ public void dataStoreCursor() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dataStoreTask() throws Exception { test("DataStoreTask"); } @@ -1445,7 +1435,7 @@ public void dataStoreTask() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dataTransfer() throws Exception { test("DataTransfer"); } @@ -1454,7 +1444,7 @@ public void dataTransfer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dataTransferItem() throws Exception { test("DataTransferItem"); } @@ -1463,7 +1453,7 @@ public void dataTransferItem() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dataTransferItemList() throws Exception { test("DataTransferItemList"); } @@ -1519,7 +1509,7 @@ public void dedicatedWorkerGlobalScope() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void delayNode() throws Exception { test("DelayNode"); } @@ -1528,7 +1518,7 @@ public void delayNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceAcceleration() throws Exception { test("DeviceAcceleration"); } @@ -1537,7 +1527,7 @@ public void deviceAcceleration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceLightEvent() throws Exception { test("DeviceLightEvent"); } @@ -1546,7 +1536,7 @@ public void deviceLightEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceMotionEvent() throws Exception { test("DeviceMotionEvent"); } @@ -1555,7 +1545,7 @@ public void deviceMotionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceOrientationEvent() throws Exception { test("DeviceOrientationEvent"); } @@ -1564,7 +1554,7 @@ public void deviceOrientationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceProximityEvent() throws Exception { test("DeviceProximityEvent"); } @@ -1573,7 +1563,7 @@ public void deviceProximityEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceRotationRate() throws Exception { test("DeviceRotationRate"); } @@ -1582,7 +1572,7 @@ public void deviceRotationRate() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceStorage() throws Exception { test("DeviceStorage"); } @@ -1591,7 +1581,7 @@ public void deviceStorage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceStorageChangeEvent() throws Exception { test("DeviceStorageChangeEvent"); } @@ -1600,7 +1590,7 @@ public void deviceStorageChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void directoryEntry() throws Exception { test("DirectoryEntry"); } @@ -1609,7 +1599,7 @@ public void directoryEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void directoryEntrySync() throws Exception { test("DirectoryEntrySync"); } @@ -1618,7 +1608,7 @@ public void directoryEntrySync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void directoryReader() throws Exception { test("DirectoryReader"); } @@ -1627,7 +1617,7 @@ public void directoryReader() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void directoryReaderSync() throws Exception { test("DirectoryReaderSync"); } @@ -1638,7 +1628,7 @@ public void directoryReaderSync() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void document() throws Exception { test("Document"); } @@ -1649,7 +1639,7 @@ public void document() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void documentFragment() throws Exception { test("DocumentFragment"); } @@ -1658,7 +1648,7 @@ public void documentFragment() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void documentOrShadowRoot() throws Exception { test("DocumentOrShadowRoot"); } @@ -1667,7 +1657,7 @@ public void documentOrShadowRoot() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void documentTimeline() throws Exception { test("DocumentTimeline"); } @@ -1676,7 +1666,7 @@ public void documentTimeline() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void documentTouch() throws Exception { test("DocumentTouch"); } @@ -1687,7 +1677,7 @@ public void documentTouch() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void documentType() throws Exception { test("DocumentType"); } @@ -1696,7 +1686,7 @@ public void documentType() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domApplication() throws Exception { test("DOMApplication"); } @@ -1705,7 +1695,7 @@ public void domApplication() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domApplicationsManager() throws Exception { test("DOMApplicationsManager"); } @@ -1714,7 +1704,7 @@ public void domApplicationsManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domApplicationsRegistry() throws Exception { test("DOMApplicationsRegistry"); } @@ -1723,7 +1713,7 @@ public void domApplicationsRegistry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domConfiguration() throws Exception { test("DOMConfiguration"); } @@ -1734,7 +1724,7 @@ public void domConfiguration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domCursor() throws Exception { test("DOMCursor"); } @@ -1743,7 +1733,7 @@ public void domCursor() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domError() throws Exception { test("DOMError"); } @@ -1752,7 +1742,7 @@ public void domError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domErrorHandler() throws Exception { test("DOMErrorHandler"); } @@ -1772,7 +1762,7 @@ public void domException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domHighResTimeStamp() throws Exception { test("DOMHighResTimeStamp"); } @@ -1783,7 +1773,7 @@ public void domHighResTimeStamp() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domImplementation() throws Exception { test("DOMImplementation"); } @@ -1792,7 +1782,7 @@ public void domImplementation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domImplementationList() throws Exception { test("DOMImplementationList"); } @@ -1801,7 +1791,7 @@ public void domImplementationList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domImplementationRegistry() throws Exception { test("DOMImplementationRegistry"); } @@ -1810,7 +1800,7 @@ public void domImplementationRegistry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domImplementationSource() throws Exception { test("DOMImplementationSource"); } @@ -1819,7 +1809,7 @@ public void domImplementationSource() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domLocator() throws Exception { test("DOMLocator"); } @@ -1846,7 +1836,7 @@ public void domMatrixReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domObject() throws Exception { test("DOMObject"); } @@ -1857,7 +1847,7 @@ public void domObject() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domParser() throws Exception { test("DOMParser"); } @@ -1881,7 +1871,7 @@ public void domPointReadOnly() throws Exception { } /** - * Test {@link org.htmlunit.javascript.host.ClientRect}. + * Test {@link org.htmlunit.javascript.host.DOMRect}. * * @throws Exception if an error occurs */ @@ -1895,7 +1885,7 @@ public void domRect() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domRectList() throws Exception { test("DOMRectList"); } @@ -1913,7 +1903,7 @@ public void domRectReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domRequest() throws Exception { test("DOMRequest"); } @@ -1922,7 +1912,7 @@ public void domRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domSettableTokenList() throws Exception { test("DOMSettableTokenList"); } @@ -1931,7 +1921,7 @@ public void domSettableTokenList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domString() throws Exception { test("DOMString"); } @@ -1951,7 +1941,7 @@ public void domStringList() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domStringMap() throws Exception { test("DOMStringMap"); } @@ -1960,7 +1950,7 @@ public void domStringMap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domTimeStamp() throws Exception { test("DOMTimeStamp"); } @@ -1971,7 +1961,7 @@ public void domTimeStamp() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domTokenList() throws Exception { test("DOMTokenList"); } @@ -1980,7 +1970,7 @@ public void domTokenList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domUserData() throws Exception { test("DOMUserData"); } @@ -1989,7 +1979,7 @@ public void domUserData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void doubleRange() throws Exception { test("DoubleRange"); } @@ -1998,7 +1988,7 @@ public void doubleRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dragEvent() throws Exception { test("DragEvent"); } @@ -2007,7 +1997,7 @@ public void dragEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dynamicsCompressorNode() throws Exception { test("DynamicsCompressorNode"); } @@ -2018,7 +2008,7 @@ public void dynamicsCompressorNode() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void element() throws Exception { test("Element"); } @@ -2027,7 +2017,7 @@ public void element() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void elementTraversal() throws Exception { test("ElementTraversal"); } @@ -2054,7 +2044,7 @@ public void encodeURIComponent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void entity() throws Exception { test("Entity"); } @@ -2063,7 +2053,7 @@ public void entity() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void entityReference() throws Exception { test("EntityReference"); } @@ -2072,7 +2062,7 @@ public void entityReference() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void entry() throws Exception { test("Entry"); } @@ -2081,7 +2071,7 @@ public void entry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void entrySync() throws Exception { test("EntrySync"); } @@ -2092,7 +2082,7 @@ public void entrySync() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void enumerator() throws Exception { test("Enumerator"); } @@ -2157,7 +2147,7 @@ public void event() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void eventListener() throws Exception { test("EventListener"); } @@ -2166,7 +2156,7 @@ public void eventListener() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void eventNode() throws Exception { test("EventNode"); } @@ -2193,7 +2183,7 @@ public void eventTarget() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_blend_minmax() throws Exception { test("EXT_blend_minmax"); } @@ -2202,7 +2192,7 @@ public void ext_blend_minmax() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_color_buffer_float() throws Exception { test("EXT_color_buffer_float"); } @@ -2211,7 +2201,7 @@ public void ext_color_buffer_float() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_color_buffer_half_float() throws Exception { test("EXT_color_buffer_half_float"); } @@ -2220,7 +2210,7 @@ public void ext_color_buffer_half_float() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_disjoint_timer_query() throws Exception { test("EXT_disjoint_timer_query"); } @@ -2229,7 +2219,7 @@ public void ext_disjoint_timer_query() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_frag_depth() throws Exception { test("EXT_frag_depth"); } @@ -2238,7 +2228,7 @@ public void ext_frag_depth() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_shader_texture_lod() throws Exception { test("EXT_shader_texture_lod"); } @@ -2247,7 +2237,7 @@ public void ext_shader_texture_lod() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_sRGB() throws Exception { test("EXT_sRGB"); } @@ -2256,7 +2246,7 @@ public void ext_sRGB() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_texture_filter_anisotropic() throws Exception { test("EXT_texture_filter_anisotropic"); } @@ -2265,7 +2255,7 @@ public void ext_texture_filter_anisotropic() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void extendableEvent() throws Exception { test("ExtendableEvent"); } @@ -2274,7 +2264,7 @@ public void extendableEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void extendableMessageEvent() throws Exception { test("ExtendableMessageEvent"); } @@ -2285,7 +2275,7 @@ public void extendableMessageEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void external() throws Exception { test("External"); } @@ -2294,7 +2284,7 @@ public void external() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void federatedCredential() throws Exception { test("FederatedCredential"); } @@ -2303,7 +2293,7 @@ public void federatedCredential() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fetchEvent() throws Exception { test("FetchEvent"); } @@ -2321,7 +2311,7 @@ public void file() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileEntry() throws Exception { test("FileEntry"); } @@ -2330,7 +2320,7 @@ public void fileEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileEntrySync() throws Exception { test("FileEntrySync"); } @@ -2339,7 +2329,7 @@ public void fileEntrySync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileError() throws Exception { test("FileError"); } @@ -2348,7 +2338,7 @@ public void fileError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileException() throws Exception { test("FileException"); } @@ -2357,7 +2347,7 @@ public void fileException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileHandle() throws Exception { test("FileHandle"); } @@ -2385,7 +2375,7 @@ public void fileReader() throws Exception { */ @Test @Alerts("function FileReaderSync() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", EDGE = "exception", FF = "exception", FF_ESR = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", EDGE = "ReferenceError", FF = "ReferenceError", FF_ESR = "ReferenceError") public void fileReaderSync() throws Exception { test("FileReaderSync"); } @@ -2394,7 +2384,7 @@ public void fileReaderSync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileRequest() throws Exception { test("FileRequest"); } @@ -2403,7 +2393,7 @@ public void fileRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileSystem() throws Exception { test("FileSystem"); } @@ -2412,7 +2402,7 @@ public void fileSystem() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileSystemDirectoryEntry() throws Exception { test("FileSystemDirectoryEntry"); } @@ -2421,7 +2411,7 @@ public void fileSystemDirectoryEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileSystemDirectoryReader() throws Exception { test("FileSystemDirectoryReader"); } @@ -2430,7 +2420,7 @@ public void fileSystemDirectoryReader() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileSystemEntry() throws Exception { test("FileSystemEntry"); } @@ -2439,7 +2429,7 @@ public void fileSystemEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileSystemFileEntry() throws Exception { test("FileSystemFileEntry"); } @@ -2448,7 +2438,7 @@ public void fileSystemFileEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileSystemFlags() throws Exception { test("FileSystemFlags"); } @@ -2457,7 +2447,7 @@ public void fileSystemFlags() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileSystemSync() throws Exception { test("FileSystemSync"); } @@ -2488,7 +2478,7 @@ public void float64Array() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fMRadio() throws Exception { test("FMRadio"); } @@ -2497,7 +2487,7 @@ public void fMRadio() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void focusEvent() throws Exception { test("FocusEvent"); } @@ -2515,7 +2505,7 @@ public void fontFace() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function FontFaceSet() { [native code] }", FF_ESR = "function FontFaceSet() { [native code] }") public void fontFaceSet() throws Exception { @@ -2526,7 +2516,7 @@ public void fontFaceSet() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void formChild() throws Exception { test("FormChild"); } @@ -2546,7 +2536,7 @@ public void formData() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void formField() throws Exception { test("FormField"); } @@ -2564,7 +2554,7 @@ public void function() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void gainNode() throws Exception { test("GainNode"); } @@ -2573,7 +2563,7 @@ public void gainNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void gamepad() throws Exception { test("Gamepad"); } @@ -2582,7 +2572,7 @@ public void gamepad() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void gamepadButton() throws Exception { test("GamepadButton"); } @@ -2591,7 +2581,7 @@ public void gamepadButton() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void gamepadEvent() throws Exception { test("GamepadEvent"); } @@ -2600,7 +2590,7 @@ public void gamepadEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void generator() throws Exception { test("Generator"); } @@ -2609,7 +2599,7 @@ public void generator() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void generatorFunction() throws Exception { test("GeneratorFunction"); } @@ -2620,7 +2610,7 @@ public void generatorFunction() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void geolocation() throws Exception { test("Geolocation"); } @@ -2631,7 +2621,7 @@ public void geolocation() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void geolocationCoordinates() throws Exception { test("GeolocationCoordinates"); } @@ -2642,7 +2632,7 @@ public void geolocationCoordinates() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void geolocationPosition() throws Exception { test("GeolocationPosition"); } @@ -2653,7 +2643,7 @@ public void geolocationPosition() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void geolocationPositionError() throws Exception { test("GeolocationPositionError"); } @@ -2662,7 +2652,7 @@ public void geolocationPositionError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void gestureEvent() throws Exception { test("GestureEvent"); } @@ -2671,7 +2661,7 @@ public void gestureEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void globalEventHandlers() throws Exception { test("GlobalEventHandlers"); } @@ -2680,7 +2670,7 @@ public void globalEventHandlers() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void globalFetch() throws Exception { test("GlobalFetch"); } @@ -2691,7 +2681,7 @@ public void globalFetch() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void hashChangeEvent() throws Exception { test("HashChangeEvent"); } @@ -2711,7 +2701,7 @@ public void headers() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void history() throws Exception { test("History"); } @@ -2720,7 +2710,7 @@ public void history() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void hMDVRDevice() throws Exception { test("HMDVRDevice"); } @@ -2731,7 +2721,7 @@ public void hMDVRDevice() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlAllCollection() throws Exception { test("HTMLAllCollection"); } @@ -2742,7 +2732,7 @@ public void htmlAllCollection() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlAnchorElement() throws Exception { test("HTMLAnchorElement"); } @@ -2753,7 +2743,7 @@ public void htmlAnchorElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlAppletElement() throws Exception { test("HTMLAppletElement"); } @@ -2764,7 +2754,7 @@ public void htmlAppletElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlAreaElement() throws Exception { test("HTMLAreaElement"); } @@ -2775,7 +2765,7 @@ public void htmlAreaElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlAudioElement() throws Exception { test("HTMLAudioElement"); } @@ -2786,7 +2776,7 @@ public void htmlAudioElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlBaseElement() throws Exception { test("HTMLBaseElement"); } @@ -2797,7 +2787,7 @@ public void htmlBaseElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlBaseFontElement() throws Exception { test("HTMLBaseFontElement"); } @@ -2808,7 +2798,7 @@ public void htmlBaseFontElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlBGSoundElement() throws Exception { test("HTMLBGSoundElement"); } @@ -2819,7 +2809,7 @@ public void htmlBGSoundElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlBlockElement() throws Exception { test("HTMLBlockElement"); } @@ -2830,7 +2820,7 @@ public void htmlBlockElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlBlockQuoteElement() throws Exception { test("HTMLBlockQuoteElement"); } @@ -2841,7 +2831,7 @@ public void htmlBlockQuoteElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlBodyElement() throws Exception { test("HTMLBodyElement"); } @@ -2852,7 +2842,7 @@ public void htmlBodyElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlBRElement() throws Exception { test("HTMLBRElement"); } @@ -2863,7 +2853,7 @@ public void htmlBRElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlButtonElement() throws Exception { test("HTMLButtonElement"); } @@ -2874,7 +2864,7 @@ public void htmlButtonElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlCanvasElement() throws Exception { test("HTMLCanvasElement"); } @@ -2885,7 +2875,7 @@ public void htmlCanvasElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlCollection() throws Exception { test("HTMLCollection"); } @@ -2896,7 +2886,7 @@ public void htmlCollection() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlCommentElement() throws Exception { test("HTMLCommentElement"); } @@ -2905,7 +2895,7 @@ public void htmlCommentElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlContentElement() throws Exception { test("HTMLContentElement"); } @@ -2914,7 +2904,7 @@ public void htmlContentElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDataElement() throws Exception { test("HTMLDataElement"); } @@ -2925,7 +2915,7 @@ public void htmlDataElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDataListElement() throws Exception { test("HTMLDataListElement"); } @@ -2936,7 +2926,7 @@ public void htmlDataListElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDDElement() throws Exception { test("HTMLDDElement"); } @@ -2947,7 +2937,7 @@ public void htmlDDElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDefinitionDescriptionElement() throws Exception { test("HTMLDefinitionDescriptionElement"); } @@ -2958,7 +2948,7 @@ public void htmlDefinitionDescriptionElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDefinitionTermElement() throws Exception { test("HTMLDefinitionTermElement"); } @@ -2969,7 +2959,7 @@ public void htmlDefinitionTermElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDetailsElement() throws Exception { test("HTMLDetailsElement"); } @@ -2980,7 +2970,7 @@ public void htmlDetailsElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDialogElement() throws Exception { test("HTMLDialogElement"); } @@ -2991,7 +2981,7 @@ public void htmlDialogElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDirectoryElement() throws Exception { test("HTMLDirectoryElement"); } @@ -3002,7 +2992,7 @@ public void htmlDirectoryElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDivElement() throws Exception { test("HTMLDivElement"); } @@ -3013,7 +3003,7 @@ public void htmlDivElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDListElement() throws Exception { test("HTMLDListElement"); } @@ -3024,7 +3014,7 @@ public void htmlDListElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDocument() throws Exception { test("HTMLDocument"); } @@ -3035,7 +3025,7 @@ public void htmlDocument() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDTElement() throws Exception { test("HTMLDTElement"); } @@ -3046,7 +3036,7 @@ public void htmlDTElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlElement() throws Exception { test("HTMLElement"); } @@ -3057,7 +3047,7 @@ public void htmlElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlEmbedElement() throws Exception { test("HTMLEmbedElement"); } @@ -3068,7 +3058,7 @@ public void htmlEmbedElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlFieldSetElement() throws Exception { test("HTMLFieldSetElement"); } @@ -3079,7 +3069,7 @@ public void htmlFieldSetElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlFontElement() throws Exception { test("HTMLFontElement"); } @@ -3088,7 +3078,7 @@ public void htmlFontElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlFormControlsCollection() throws Exception { test("HTMLFormControlsCollection"); } @@ -3099,7 +3089,7 @@ public void htmlFormControlsCollection() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlFormElement() throws Exception { test("HTMLFormElement"); } @@ -3110,7 +3100,7 @@ public void htmlFormElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlFrameElement() throws Exception { test("HTMLFrameElement"); } @@ -3121,7 +3111,7 @@ public void htmlFrameElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlFrameSetElement() throws Exception { test("HTMLFrameSetElement"); } @@ -3132,7 +3122,7 @@ public void htmlFrameSetElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlGenericElement() throws Exception { test("HTMLGenericElement"); } @@ -3143,7 +3133,7 @@ public void htmlGenericElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlHeadElement() throws Exception { test("HTMLHeadElement"); } @@ -3154,7 +3144,7 @@ public void htmlHeadElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlHeadingElement() throws Exception { test("HTMLHeadingElement"); } @@ -3165,7 +3155,7 @@ public void htmlHeadingElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlHRElement() throws Exception { test("HTMLHRElement"); } @@ -3176,7 +3166,7 @@ public void htmlHRElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlHtmlElement() throws Exception { test("HTMLHtmlElement"); } @@ -3185,7 +3175,7 @@ public void htmlHtmlElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlHyperlinkElementUtils() throws Exception { test("HTMLHyperlinkElementUtils"); } @@ -3196,7 +3186,7 @@ public void htmlHyperlinkElementUtils() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlIFrameElement() throws Exception { test("HTMLIFrameElement"); } @@ -3207,7 +3197,7 @@ public void htmlIFrameElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlImageElement() throws Exception { test("HTMLImageElement"); } @@ -3218,7 +3208,7 @@ public void htmlImageElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlInlineQuotationElement() throws Exception { test("HTMLInlineQuotationElement"); } @@ -3229,7 +3219,7 @@ public void htmlInlineQuotationElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlInputElement() throws Exception { test("HTMLInputElement"); } @@ -3240,7 +3230,7 @@ public void htmlInputElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlIsIndexElement() throws Exception { test("HTMLIsIndexElement"); } @@ -3249,7 +3239,7 @@ public void htmlIsIndexElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlKeygenElement() throws Exception { test("HTMLKeygenElement"); } @@ -3260,7 +3250,7 @@ public void htmlKeygenElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlLabelElement() throws Exception { test("HTMLLabelElement"); } @@ -3271,7 +3261,7 @@ public void htmlLabelElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlLegendElement() throws Exception { test("HTMLLegendElement"); } @@ -3282,7 +3272,7 @@ public void htmlLegendElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlLIElement() throws Exception { test("HTMLLIElement"); } @@ -3293,7 +3283,7 @@ public void htmlLIElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlLinkElement() throws Exception { test("HTMLLinkElement"); } @@ -3304,7 +3294,7 @@ public void htmlLinkElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlListElement() throws Exception { test("HTMLListElement"); } @@ -3315,7 +3305,7 @@ public void htmlListElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlMapElement() throws Exception { test("HTMLMapElement"); } @@ -3326,7 +3316,7 @@ public void htmlMapElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlMarqueeElement() throws Exception { test("HTMLMarqueeElement"); } @@ -3337,7 +3327,7 @@ public void htmlMarqueeElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlMediaElement() throws Exception { test("HTMLMediaElement"); } @@ -3348,7 +3338,7 @@ public void htmlMediaElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlMenuElement() throws Exception { test("HTMLMenuElement"); } @@ -3357,7 +3347,7 @@ public void htmlMenuElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlMenuItemElement() throws Exception { test("HTMLMenuItemElement"); } @@ -3368,7 +3358,7 @@ public void htmlMenuItemElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlMetaElement() throws Exception { test("HTMLMetaElement"); } @@ -3379,7 +3369,7 @@ public void htmlMetaElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlMeterElement() throws Exception { test("HTMLMeterElement"); } @@ -3390,7 +3380,7 @@ public void htmlMeterElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlModElement() throws Exception { test("HTMLModElement"); } @@ -3401,7 +3391,7 @@ public void htmlModElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlNextIdElement() throws Exception { test("HTMLNextIdElement"); } @@ -3410,7 +3400,7 @@ public void htmlNextIdElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlNoShowElement() throws Exception { test("HTMLNoShowElement"); } @@ -3421,7 +3411,7 @@ public void htmlNoShowElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlObjectElement() throws Exception { test("HTMLObjectElement"); } @@ -3432,7 +3422,7 @@ public void htmlObjectElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlOListElement() throws Exception { test("HTMLOListElement"); } @@ -3443,7 +3433,7 @@ public void htmlOListElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlOptGroupElement() throws Exception { test("HTMLOptGroupElement"); } @@ -3454,7 +3444,7 @@ public void htmlOptGroupElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlOptionElement() throws Exception { test("HTMLOptionElement"); } @@ -3465,7 +3455,7 @@ public void htmlOptionElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlOptionsCollection() throws Exception { test("HTMLOptionsCollection"); } @@ -3476,7 +3466,7 @@ public void htmlOptionsCollection() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlOutputElement() throws Exception { test("HTMLOutputElement"); } @@ -3487,7 +3477,7 @@ public void htmlOutputElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlParagraphElement() throws Exception { test("HTMLParagraphElement"); } @@ -3498,7 +3488,7 @@ public void htmlParagraphElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlParamElement() throws Exception { test("HTMLParamElement"); } @@ -3509,7 +3499,7 @@ public void htmlParamElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlPhraseElement() throws Exception { test("HTMLPhraseElement"); } @@ -3518,7 +3508,7 @@ public void htmlPhraseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlPictureElement() throws Exception { test("HTMLPictureElement"); } @@ -3529,7 +3519,7 @@ public void htmlPictureElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlPreElement() throws Exception { test("HTMLPreElement"); } @@ -3540,7 +3530,7 @@ public void htmlPreElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlProgressElement() throws Exception { test("HTMLProgressElement"); } @@ -3551,7 +3541,7 @@ public void htmlProgressElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlQuoteElement() throws Exception { test("HTMLQuoteElement"); } @@ -3562,7 +3552,7 @@ public void htmlQuoteElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlScriptElement() throws Exception { test("HTMLScriptElement"); } @@ -3573,7 +3563,7 @@ public void htmlScriptElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlSelectElement() throws Exception { test("HTMLSelectElement"); } @@ -3584,7 +3574,7 @@ public void htmlSelectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlShadowElement() throws Exception { test("HTMLShadowElement"); } @@ -3593,7 +3583,7 @@ public void htmlShadowElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlSlotElement() throws Exception { test("HTMLSlotElement"); } @@ -3604,7 +3594,7 @@ public void htmlSlotElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlSourceElement() throws Exception { test("HTMLSourceElement"); } @@ -3615,7 +3605,7 @@ public void htmlSourceElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlSpanElement() throws Exception { test("HTMLSpanElement"); } @@ -3626,7 +3616,7 @@ public void htmlSpanElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlStyleElement() throws Exception { test("HTMLStyleElement"); } @@ -3637,7 +3627,7 @@ public void htmlStyleElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableCaptionElement() throws Exception { test("HTMLTableCaptionElement"); } @@ -3648,7 +3638,7 @@ public void htmlTableCaptionElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableCellElement() throws Exception { test("HTMLTableCellElement"); } @@ -3659,7 +3649,7 @@ public void htmlTableCellElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableColElement() throws Exception { test("HTMLTableColElement"); } @@ -3670,7 +3660,7 @@ public void htmlTableColElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableComponent() throws Exception { test("HTMLTableComponent"); } @@ -3681,7 +3671,7 @@ public void htmlTableComponent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableDataCellElement() throws Exception { test("HTMLTableDataCellElement"); } @@ -3692,7 +3682,7 @@ public void htmlTableDataCellElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableElement() throws Exception { test("HTMLTableElement"); } @@ -3703,7 +3693,7 @@ public void htmlTableElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableHeaderCellElement() throws Exception { test("HTMLTableHeaderCellElement"); } @@ -3714,7 +3704,7 @@ public void htmlTableHeaderCellElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableRowElement() throws Exception { test("HTMLTableRowElement"); } @@ -3725,7 +3715,7 @@ public void htmlTableRowElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableSectionElement() throws Exception { test("HTMLTableSectionElement"); } @@ -3734,7 +3724,7 @@ public void htmlTableSectionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTemplateElement() throws Exception { test("HTMLTemplateElement"); } @@ -3745,7 +3735,7 @@ public void htmlTemplateElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTextAreaElement() throws Exception { test("HTMLTextAreaElement"); } @@ -3754,7 +3744,7 @@ public void htmlTextAreaElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTextElement() throws Exception { test("HTMLTextElement"); } @@ -3765,7 +3755,7 @@ public void htmlTextElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTimeElement() throws Exception { test("HTMLTimeElement"); } @@ -3776,7 +3766,7 @@ public void htmlTimeElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTitleElement() throws Exception { test("HTMLTitleElement"); } @@ -3787,7 +3777,7 @@ public void htmlTitleElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTrackElement() throws Exception { test("HTMLTrackElement"); } @@ -3798,7 +3788,7 @@ public void htmlTrackElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlUListElement() throws Exception { test("HTMLUListElement"); } @@ -3809,7 +3799,7 @@ public void htmlUListElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlUnknownElement() throws Exception { test("HTMLUnknownElement"); } @@ -3820,7 +3810,7 @@ public void htmlUnknownElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlVideoElement() throws Exception { test("HTMLVideoElement"); } @@ -3829,7 +3819,7 @@ public void htmlVideoElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlWBRElement() throws Exception { test("HTMLWBRElement"); } @@ -3847,7 +3837,7 @@ public void idbCursor() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbCursorSync() throws Exception { test("IDBCursorSync"); } @@ -3874,7 +3864,7 @@ public void idbDatabase() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbDatabaseException() throws Exception { test("IDBDatabaseException"); } @@ -3883,7 +3873,7 @@ public void idbDatabaseException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbDatabaseSync() throws Exception { test("IDBDatabaseSync"); } @@ -3892,7 +3882,7 @@ public void idbDatabaseSync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbEnvironment() throws Exception { test("IDBEnvironment"); } @@ -3901,7 +3891,7 @@ public void idbEnvironment() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbEnvironmentSync() throws Exception { test("IDBEnvironmentSync"); } @@ -3919,7 +3909,7 @@ public void idbFactory() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbFactorySync() throws Exception { test("IDBFactorySync"); } @@ -3937,7 +3927,7 @@ public void idbIndex() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbIndexSync() throws Exception { test("IDBIndexSync"); } @@ -3955,7 +3945,7 @@ public void idbKeyRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbLocaleAwareKeyRange() throws Exception { test("IDBLocaleAwareKeyRange"); } @@ -3964,7 +3954,7 @@ public void idbLocaleAwareKeyRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbMutableFile() throws Exception { test("IDBMutableFile"); } @@ -3982,7 +3972,7 @@ public void idbObjectStore() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbObjectStoreSync() throws Exception { test("IDBObjectStoreSync"); } @@ -4018,7 +4008,7 @@ public void idbTransaction() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbTransactionSync() throws Exception { test("IDBTransactionSync"); } @@ -4036,7 +4026,7 @@ public void idbVersionChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbVersionChangeRequest() throws Exception { test("IDBVersionChangeRequest"); } @@ -4045,7 +4035,7 @@ public void idbVersionChangeRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void identityManager() throws Exception { test("IdentityManager"); } @@ -4054,7 +4044,7 @@ public void identityManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idleDeadline() throws Exception { test("IdleDeadline"); } @@ -4063,7 +4053,7 @@ public void idleDeadline() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void iirFilterNode() throws Exception { test("IIRFilterNode"); } @@ -4074,7 +4064,7 @@ public void iirFilterNode() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void image() throws Exception { test("Image"); } @@ -4092,7 +4082,7 @@ public void imageBitmap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void imageBitmapFactories() throws Exception { test("ImageBitmapFactories"); } @@ -4119,7 +4109,7 @@ public void imageData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void index() throws Exception { test("Index"); } @@ -4128,7 +4118,7 @@ public void index() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void indexedDB() throws Exception { test("IndexedDB"); } @@ -4146,7 +4136,7 @@ public void infinity() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void inputDeviceCapabilities() throws Exception { test("InputDeviceCapabilities"); } @@ -4155,7 +4145,7 @@ public void inputDeviceCapabilities() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void inputEvent() throws Exception { test("InputEvent"); } @@ -4164,7 +4154,7 @@ public void inputEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void inputMethodContext() throws Exception { test("InputMethodContext"); } @@ -4173,7 +4163,7 @@ public void inputMethodContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void installEvent() throws Exception { test("InstallEvent"); } @@ -4182,7 +4172,7 @@ public void installEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void installTrigger() throws Exception { test("InstallTrigger"); } @@ -4191,7 +4181,7 @@ public void installTrigger() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void installTriggerImpl() throws Exception { test("InstallTriggerImpl"); } @@ -4233,7 +4223,7 @@ public void int8Array() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function InternalError() { [native code] }", FF_ESR = "function InternalError() { [native code] }") @HtmlUnitNYI(CHROME = "function InternalError() { [native code] }", @@ -4246,7 +4236,7 @@ public void internalError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void intersectionObserver() throws Exception { test("IntersectionObserver"); } @@ -4255,7 +4245,7 @@ public void intersectionObserver() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void intersectionObserverEntry() throws Exception { test("IntersectionObserverEntry"); } @@ -4321,7 +4311,7 @@ public void isNaN() throws Exception { */ @Test @Alerts(DEFAULT = "function Iterator() { [native code] }", - FF_ESR = "exception") + FF_ESR = "ReferenceError") public void iterator() throws Exception { test("Iterator"); } @@ -4341,7 +4331,7 @@ public void json() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void keyboardEvent() throws Exception { test("KeyboardEvent"); } @@ -4350,7 +4340,7 @@ public void keyboardEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void keyframeEffect() throws Exception { test("KeyframeEffect"); } @@ -4359,7 +4349,7 @@ public void keyframeEffect() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void keyframeEffectReadOnly() throws Exception { test("KeyframeEffectReadOnly"); } @@ -4368,7 +4358,7 @@ public void keyframeEffectReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n() throws Exception { test("L10n"); } @@ -4377,7 +4367,7 @@ public void l10n() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_formatValue() throws Exception { test("L10n.formatValue"); } @@ -4386,7 +4376,7 @@ public void l10n_formatValue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_get() throws Exception { test("L10n.get"); } @@ -4395,7 +4385,7 @@ public void l10n_get() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_language_code() throws Exception { test("L10n.language.code"); } @@ -4404,7 +4394,7 @@ public void l10n_language_code() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_language_direction() throws Exception { test("L10n.language.direction"); } @@ -4413,7 +4403,7 @@ public void l10n_language_direction() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_once() throws Exception { test("L10n.once"); } @@ -4422,7 +4412,7 @@ public void l10n_once() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_ready() throws Exception { test("L10n.ready"); } @@ -4431,7 +4421,7 @@ public void l10n_ready() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_readyState() throws Exception { test("L10n.readyState"); } @@ -4440,7 +4430,7 @@ public void l10n_readyState() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_setAttributes() throws Exception { test("L10n.setAttributes"); } @@ -4449,7 +4439,7 @@ public void l10n_setAttributes() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void linkStyle() throws Exception { test("LinkStyle"); } @@ -4458,7 +4448,7 @@ public void linkStyle() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void localFileSystem() throws Exception { test("LocalFileSystem"); } @@ -4467,7 +4457,7 @@ public void localFileSystem() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void localFileSystemSync() throws Exception { test("LocalFileSystemSync"); } @@ -4478,7 +4468,7 @@ public void localFileSystemSync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void localMediaStream() throws Exception { test("LocalMediaStream"); } @@ -4489,7 +4479,7 @@ public void localMediaStream() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void location() throws Exception { test("Location"); } @@ -4498,7 +4488,7 @@ public void location() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void lockedFile() throws Exception { test("LockedFile"); } @@ -4507,7 +4497,7 @@ public void lockedFile() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void longRange() throws Exception { test("LongRange"); } @@ -4534,7 +4524,7 @@ public void math() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaDeviceInfo() throws Exception { test("MediaDeviceInfo"); } @@ -4543,7 +4533,7 @@ public void mediaDeviceInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaDevices() throws Exception { test("MediaDevices"); } @@ -4552,7 +4542,7 @@ public void mediaDevices() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaElementAudioSourceNode() throws Exception { test("MediaElementAudioSourceNode"); } @@ -4561,7 +4551,7 @@ public void mediaElementAudioSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaEncryptedEvent() throws Exception { test("MediaEncryptedEvent"); } @@ -4570,7 +4560,7 @@ public void mediaEncryptedEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaError() throws Exception { test("MediaError"); } @@ -4579,7 +4569,7 @@ public void mediaError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaKeyError() throws Exception { test("MediaKeyError"); } @@ -4588,7 +4578,7 @@ public void mediaKeyError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaKeyEvent() throws Exception { test("MediaKeyEvent"); } @@ -4597,7 +4587,7 @@ public void mediaKeyEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaKeyMessageEvent() throws Exception { test("MediaKeyMessageEvent"); } @@ -4606,7 +4596,7 @@ public void mediaKeyMessageEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaKeys() throws Exception { test("MediaKeys"); } @@ -4615,7 +4605,7 @@ public void mediaKeys() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaKeySession() throws Exception { test("MediaKeySession"); } @@ -4624,7 +4614,7 @@ public void mediaKeySession() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaKeyStatusMap() throws Exception { test("MediaKeyStatusMap"); } @@ -4633,7 +4623,7 @@ public void mediaKeyStatusMap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaKeySystemAccess() throws Exception { test("MediaKeySystemAccess"); } @@ -4642,7 +4632,7 @@ public void mediaKeySystemAccess() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaKeySystemConfiguration() throws Exception { test("MediaKeySystemConfiguration"); } @@ -4653,7 +4643,7 @@ public void mediaKeySystemConfiguration() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaList() throws Exception { test("MediaList"); } @@ -4662,7 +4652,7 @@ public void mediaList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaQueryList() throws Exception { test("MediaQueryList"); } @@ -4671,7 +4661,7 @@ public void mediaQueryList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaQueryListEvent() throws Exception { test("MediaQueryListEvent"); } @@ -4680,7 +4670,7 @@ public void mediaQueryListEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaQueryListListener() throws Exception { test("MediaQueryListListener"); } @@ -4689,7 +4679,7 @@ public void mediaQueryListListener() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaRecorder() throws Exception { test("MediaRecorder"); } @@ -4699,8 +4689,8 @@ public void mediaRecorder() throws Exception { */ @Test @Alerts(DEFAULT = "function MediaSource() { [native code] }", - FF = "exception", - FF_ESR = "exception") + FF = "ReferenceError", + FF_ESR = "ReferenceError") public void mediaSource() throws Exception { test("MediaSource"); } @@ -4709,7 +4699,7 @@ public void mediaSource() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaStream() throws Exception { test("MediaStream"); } @@ -4718,7 +4708,7 @@ public void mediaStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaStreamAudioDestinationNode() throws Exception { test("MediaStreamAudioDestinationNode"); } @@ -4727,7 +4717,7 @@ public void mediaStreamAudioDestinationNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaStreamAudioSourceNode() throws Exception { test("MediaStreamAudioSourceNode"); } @@ -4736,7 +4726,7 @@ public void mediaStreamAudioSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaStreamConstraints() throws Exception { test("MediaStreamConstraints"); } @@ -4745,7 +4735,7 @@ public void mediaStreamConstraints() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaStreamEvent() throws Exception { test("MediaStreamEvent"); } @@ -4754,7 +4744,7 @@ public void mediaStreamEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaStreamTrack() throws Exception { test("MediaStreamTrack"); } @@ -4763,7 +4753,7 @@ public void mediaStreamTrack() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaStreamTrackEvent() throws Exception { test("MediaStreamTrackEvent"); } @@ -4772,7 +4762,7 @@ public void mediaStreamTrackEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaTrackConstraints() throws Exception { test("MediaTrackConstraints"); } @@ -4781,7 +4771,7 @@ public void mediaTrackConstraints() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaTrackSettings() throws Exception { test("MediaTrackSettings"); } @@ -4790,7 +4780,7 @@ public void mediaTrackSettings() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaTrackSupportedConstraints() throws Exception { test("MediaTrackSupportedConstraints"); } @@ -4832,7 +4822,7 @@ public void messagePort() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void metadata() throws Exception { test("Metadata"); } @@ -4841,7 +4831,7 @@ public void metadata() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void midiAccess() throws Exception { test("MIDIAccess"); } @@ -4850,7 +4840,7 @@ public void midiAccess() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void midiConnectionEvent() throws Exception { test("MIDIConnectionEvent"); } @@ -4859,7 +4849,7 @@ public void midiConnectionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void midiInput() throws Exception { test("MIDIInput"); } @@ -4868,7 +4858,7 @@ public void midiInput() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void midiInputMap() throws Exception { test("MIDIInputMap"); } @@ -4877,7 +4867,7 @@ public void midiInputMap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void midiMessageEvent() throws Exception { test("MIDIMessageEvent"); } @@ -4886,7 +4876,7 @@ public void midiMessageEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void midiOutput() throws Exception { test("MIDIOutput"); } @@ -4895,7 +4885,7 @@ public void midiOutput() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void midiOutputMap() throws Exception { test("MIDIOutputMap"); } @@ -4904,7 +4894,7 @@ public void midiOutputMap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void midiPort() throws Exception { test("MIDIPort"); } @@ -4915,7 +4905,7 @@ public void midiPort() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mimeType() throws Exception { test("MimeType"); } @@ -4926,7 +4916,7 @@ public void mimeType() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mimeTypeArray() throws Exception { test("MimeTypeArray"); } @@ -4937,7 +4927,7 @@ public void mimeTypeArray() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mouseEvent() throws Exception { test("MouseEvent"); } @@ -4946,7 +4936,7 @@ public void mouseEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mouseScrollEvent() throws Exception { test("MouseScrollEvent"); } @@ -4955,7 +4945,7 @@ public void mouseScrollEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mouseWheelEvent() throws Exception { test("MouseWheelEvent"); } @@ -4964,7 +4954,7 @@ public void mouseWheelEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozActivity() throws Exception { test("MozActivity"); } @@ -4973,7 +4963,7 @@ public void mozActivity() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozActivityOptions() throws Exception { test("MozActivityOptions"); } @@ -4982,7 +4972,7 @@ public void mozActivityOptions() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozActivityRequestHandler() throws Exception { test("MozActivityRequestHandler"); } @@ -4991,7 +4981,7 @@ public void mozActivityRequestHandler() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozAlarmsManager() throws Exception { test("MozAlarmsManager"); } @@ -5000,7 +4990,7 @@ public void mozAlarmsManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozContact() throws Exception { test("MozContact"); } @@ -5009,7 +4999,7 @@ public void mozContact() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozContactChangeEvent() throws Exception { test("MozContactChangeEvent"); } @@ -5018,7 +5008,7 @@ public void mozContactChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozCSSKeyframesRule() throws Exception { test("MozCSSKeyframesRule"); } @@ -5027,7 +5017,7 @@ public void mozCSSKeyframesRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozIccManager() throws Exception { test("MozIccManager"); } @@ -5036,7 +5026,7 @@ public void mozIccManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMmsEvent() throws Exception { test("MozMmsEvent"); } @@ -5045,7 +5035,7 @@ public void mozMmsEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMmsMessage() throws Exception { test("MozMmsMessage"); } @@ -5054,7 +5044,7 @@ public void mozMmsMessage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileCellInfo() throws Exception { test("MozMobileCellInfo"); } @@ -5063,7 +5053,7 @@ public void mozMobileCellInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileCFInfo() throws Exception { test("MozMobileCFInfo"); } @@ -5072,7 +5062,7 @@ public void mozMobileCFInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileConnection() throws Exception { test("MozMobileConnection"); } @@ -5081,7 +5071,7 @@ public void mozMobileConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileConnectionInfo() throws Exception { test("MozMobileConnectionInfo"); } @@ -5090,7 +5080,7 @@ public void mozMobileConnectionInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileICCInfo() throws Exception { test("MozMobileICCInfo"); } @@ -5099,7 +5089,7 @@ public void mozMobileICCInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileMessageManager() throws Exception { test("MozMobileMessageManager"); } @@ -5108,7 +5098,7 @@ public void mozMobileMessageManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileMessageThread() throws Exception { test("MozMobileMessageThread"); } @@ -5117,7 +5107,7 @@ public void mozMobileMessageThread() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileNetworkInfo() throws Exception { test("MozMobileNetworkInfo"); } @@ -5126,7 +5116,7 @@ public void mozMobileNetworkInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNDEFRecord() throws Exception { test("MozNDEFRecord"); } @@ -5135,7 +5125,7 @@ public void mozNDEFRecord() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNetworkStats() throws Exception { test("MozNetworkStats"); } @@ -5144,7 +5134,7 @@ public void mozNetworkStats() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNetworkStatsData() throws Exception { test("MozNetworkStatsData"); } @@ -5153,7 +5143,7 @@ public void mozNetworkStatsData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNetworkStatsManager() throws Exception { test("MozNetworkStatsManager"); } @@ -5162,7 +5152,7 @@ public void mozNetworkStatsManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNFC() throws Exception { test("MozNFC"); } @@ -5171,7 +5161,7 @@ public void mozNFC() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNFCPeer() throws Exception { test("MozNFCPeer"); } @@ -5180,7 +5170,7 @@ public void mozNFCPeer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNFCTag() throws Exception { test("MozNFCTag"); } @@ -5189,7 +5179,7 @@ public void mozNFCTag() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozPowerManager() throws Exception { test("MozPowerManager"); } @@ -5198,7 +5188,7 @@ public void mozPowerManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozRTCIceCandidate() throws Exception { test("mozRTCIceCandidate"); } @@ -5207,7 +5197,7 @@ public void mozRTCIceCandidate() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozRTCPeerConnection() throws Exception { test("mozRTCPeerConnection"); } @@ -5216,7 +5206,7 @@ public void mozRTCPeerConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozRTCSessionDescription() throws Exception { test("mozRTCSessionDescription"); } @@ -5225,7 +5215,7 @@ public void mozRTCSessionDescription() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSettingsEvent() throws Exception { test("MozSettingsEvent"); } @@ -5234,7 +5224,7 @@ public void mozSettingsEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSmsEvent() throws Exception { test("MozSmsEvent"); } @@ -5243,7 +5233,7 @@ public void mozSmsEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSmsFilter() throws Exception { test("MozSmsFilter"); } @@ -5252,7 +5242,7 @@ public void mozSmsFilter() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSmsManager() throws Exception { test("MozSmsManager"); } @@ -5261,7 +5251,7 @@ public void mozSmsManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSmsMessage() throws Exception { test("MozSmsMessage"); } @@ -5270,7 +5260,7 @@ public void mozSmsMessage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSmsSegmentInfo() throws Exception { test("MozSmsSegmentInfo"); } @@ -5279,7 +5269,7 @@ public void mozSmsSegmentInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSocial() throws Exception { test("MozSocial"); } @@ -5288,7 +5278,7 @@ public void mozSocial() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozTimeManager() throws Exception { test("MozTimeManager"); } @@ -5297,7 +5287,7 @@ public void mozTimeManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozVoicemail() throws Exception { test("MozVoicemail"); } @@ -5306,7 +5296,7 @@ public void mozVoicemail() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozVoicemailEvent() throws Exception { test("MozVoicemailEvent"); } @@ -5315,7 +5305,7 @@ public void mozVoicemailEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozVoicemailStatus() throws Exception { test("MozVoicemailStatus"); } @@ -5324,7 +5314,7 @@ public void mozVoicemailStatus() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozWifiConnectionInfoEvent() throws Exception { test("MozWifiConnectionInfoEvent"); } @@ -5333,7 +5323,7 @@ public void mozWifiConnectionInfoEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozWifiP2pGroupOwner() throws Exception { test("MozWifiP2pGroupOwner"); } @@ -5342,7 +5332,7 @@ public void mozWifiP2pGroupOwner() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozWifiP2pManager() throws Exception { test("MozWifiP2pManager"); } @@ -5351,7 +5341,7 @@ public void mozWifiP2pManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozWifiStatusChangeEvent() throws Exception { test("MozWifiStatusChangeEvent"); } @@ -5362,7 +5352,7 @@ public void mozWifiStatusChangeEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void msCurrentStyleCSSProperties() throws Exception { test("MSCurrentStyleCSSProperties"); } @@ -5371,7 +5361,7 @@ public void msCurrentStyleCSSProperties() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void msGestureEvent() throws Exception { test("MSGestureEvent"); } @@ -5382,7 +5372,7 @@ public void msGestureEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void msStyleCSSProperties() throws Exception { test("MSStyleCSSProperties"); } @@ -5393,7 +5383,7 @@ public void msStyleCSSProperties() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mutationEvent() throws Exception { test("MutationEvent"); } @@ -5402,7 +5392,7 @@ public void mutationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mutationObserver() throws Exception { test("MutationObserver"); } @@ -5411,7 +5401,7 @@ public void mutationObserver() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mutationRecord() throws Exception { test("MutationRecord"); } @@ -5422,7 +5412,7 @@ public void mutationRecord() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void namedNodeMap() throws Exception { test("NamedNodeMap"); } @@ -5431,7 +5421,7 @@ public void namedNodeMap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void nameList() throws Exception { test("NameList"); } @@ -5442,7 +5432,7 @@ public void nameList() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void namespace() throws Exception { test("Namespace"); } @@ -5453,7 +5443,7 @@ public void namespace() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void namespaceCollection() throws Exception { test("NamespaceCollection"); } @@ -5473,7 +5463,7 @@ public void naN() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void nativeXPathNSResolver() throws Exception { test("NativeXPathNSResolver"); } @@ -5484,7 +5474,7 @@ public void nativeXPathNSResolver() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigator() throws Exception { test("Navigator"); } @@ -5493,7 +5483,7 @@ public void navigator() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorConcurrentHardware() throws Exception { test("NavigatorConcurrentHardware"); } @@ -5502,7 +5492,7 @@ public void navigatorConcurrentHardware() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorGeolocation() throws Exception { test("NavigatorGeolocation"); } @@ -5511,7 +5501,7 @@ public void navigatorGeolocation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorID() throws Exception { test("NavigatorID"); } @@ -5520,7 +5510,7 @@ public void navigatorID() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorLanguage() throws Exception { test("NavigatorLanguage"); } @@ -5529,7 +5519,7 @@ public void navigatorLanguage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorOnLine() throws Exception { test("NavigatorOnLine"); } @@ -5538,7 +5528,7 @@ public void navigatorOnLine() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorPlugins() throws Exception { test("NavigatorPlugins"); } @@ -5547,7 +5537,7 @@ public void navigatorPlugins() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorStorage() throws Exception { test("NavigatorStorage"); } @@ -5559,8 +5549,8 @@ public void navigatorStorage() throws Exception { */ @Test @Alerts(DEFAULT = "function NetworkInformation() { [native code] }", - FF = "exception", - FF_ESR = "exception") + FF = "ReferenceError", + FF_ESR = "ReferenceError") public void networkInformation() throws Exception { test("NetworkInformation"); } @@ -5571,7 +5561,7 @@ public void networkInformation() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void node() throws Exception { test("Node"); } @@ -5582,7 +5572,7 @@ public void node() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void nodeFilter() throws Exception { test("NodeFilter"); } @@ -5591,7 +5581,7 @@ public void nodeFilter() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void nodeIterator() throws Exception { test("NodeIterator"); } @@ -5602,7 +5592,7 @@ public void nodeIterator() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void nodeList() throws Exception { test("NodeList"); } @@ -5611,7 +5601,7 @@ public void nodeList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void nonDocumentTypeChildNode() throws Exception { test("NonDocumentTypeChildNode"); } @@ -5620,7 +5610,7 @@ public void nonDocumentTypeChildNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void notation() throws Exception { test("Notation"); } @@ -5640,7 +5630,7 @@ public void notification() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void notificationEvent() throws Exception { test("NotificationEvent"); } @@ -5649,7 +5639,7 @@ public void notificationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void notifyAudioAvailableEvent() throws Exception { test("NotifyAudioAvailableEvent"); } @@ -5676,7 +5666,7 @@ public void object() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_element_index_uint() throws Exception { test("OES_element_index_uint"); } @@ -5685,7 +5675,7 @@ public void oes_element_index_uint() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_standard_derivatives() throws Exception { test("OES_standard_derivatives"); } @@ -5694,7 +5684,7 @@ public void oes_standard_derivatives() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_texture_float() throws Exception { test("OES_texture_float"); } @@ -5703,7 +5693,7 @@ public void oes_texture_float() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_texture_float_linear() throws Exception { test("OES_texture_float_linear"); } @@ -5712,7 +5702,7 @@ public void oes_texture_float_linear() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_texture_half_float() throws Exception { test("OES_texture_half_float"); } @@ -5721,7 +5711,7 @@ public void oes_texture_half_float() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_texture_half_float_linear() throws Exception { test("OES_texture_half_float_linear"); } @@ -5730,7 +5720,7 @@ public void oes_texture_half_float_linear() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_vertex_array_object() throws Exception { test("OES_vertex_array_object"); } @@ -5739,7 +5729,7 @@ public void oes_vertex_array_object() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void offlineAudioCompletionEvent() throws Exception { test("OfflineAudioCompletionEvent"); } @@ -5748,7 +5738,7 @@ public void offlineAudioCompletionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void offlineAudioContext() throws Exception { test("OfflineAudioContext"); } @@ -5759,7 +5749,7 @@ public void offlineAudioContext() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void offlineResourceList() throws Exception { test("OfflineResourceList"); } @@ -5769,7 +5759,7 @@ public void offlineResourceList() throws Exception { */ @Test @Alerts("function OffscreenCanvas() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", EDGE = "exception", FF = "exception", FF_ESR = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", EDGE = "ReferenceError", FF = "ReferenceError", FF_ESR = "ReferenceError") public void offscreenCanvas() throws Exception { test("OffscreenCanvas"); } @@ -5780,7 +5770,7 @@ public void offscreenCanvas() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void option() throws Exception { test("Option"); } @@ -5789,7 +5779,7 @@ public void option() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oscillatorNode() throws Exception { test("OscillatorNode"); } @@ -5798,7 +5788,7 @@ public void oscillatorNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void overflowEvent() throws Exception { test("OverflowEvent"); } @@ -5807,7 +5797,7 @@ public void overflowEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void pageTransitionEvent() throws Exception { test("PageTransitionEvent"); } @@ -5816,7 +5806,7 @@ public void pageTransitionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void pannerNode() throws Exception { test("PannerNode"); } @@ -5825,7 +5815,7 @@ public void pannerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void parallelArray() throws Exception { test("ParallelArray"); } @@ -5834,7 +5824,7 @@ public void parallelArray() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void parentNode() throws Exception { test("ParentNode"); } @@ -5861,7 +5851,7 @@ public void parseInt() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void passwordCredential() throws Exception { test("PasswordCredential"); } @@ -5881,7 +5871,7 @@ public void path2D() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void paymentAddress() throws Exception { test("PaymentAddress"); } @@ -5890,7 +5880,7 @@ public void paymentAddress() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void paymentRequest() throws Exception { test("PaymentRequest"); } @@ -5899,7 +5889,7 @@ public void paymentRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void paymentResponse() throws Exception { test("PaymentResponse"); } @@ -5926,7 +5916,7 @@ public void performanceEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void performanceFrameTiming() throws Exception { test("PerformanceFrameTiming"); } @@ -5953,7 +5943,7 @@ public void performanceMeasure() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void performanceNavigation() throws Exception { test("PerformanceNavigation"); } @@ -5962,7 +5952,7 @@ public void performanceNavigation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void performanceNavigationTiming() throws Exception { test("PerformanceNavigationTiming"); } @@ -5998,7 +5988,7 @@ public void performanceResourceTiming() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void performanceTiming() throws Exception { test("PerformanceTiming"); } @@ -6007,7 +5997,7 @@ public void performanceTiming() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void periodicSyncEvent() throws Exception { test("PeriodicSyncEvent"); } @@ -6017,8 +6007,8 @@ public void periodicSyncEvent() throws Exception { */ @Test @Alerts(DEFAULT = "function PeriodicSyncManager() { [native code] }", - FF = "exception", - FF_ESR = "exception") + FF = "ReferenceError", + FF_ESR = "ReferenceError") public void periodicSyncManager() throws Exception { test("PeriodicSyncManager"); } @@ -6027,7 +6017,7 @@ public void periodicSyncManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void periodicSyncRegistration() throws Exception { test("PeriodicSyncRegistration"); } @@ -6036,7 +6026,7 @@ public void periodicSyncRegistration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void periodicWave() throws Exception { test("PeriodicWave"); } @@ -6046,7 +6036,7 @@ public void periodicWave() throws Exception { */ @Test @Alerts(DEFAULT = "function Permissions() { [native code] }", - FF_ESR = "exception") + FF_ESR = "ReferenceError") public void permissions() throws Exception { test("Permissions"); } @@ -6055,7 +6045,7 @@ public void permissions() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void permissionSettings() throws Exception { test("PermissionSettings"); } @@ -6065,7 +6055,7 @@ public void permissionSettings() throws Exception { */ @Test @Alerts(DEFAULT = "function PermissionStatus() { [native code] }", - FF_ESR = "exception") + FF_ESR = "ReferenceError") public void permissionStatus() throws Exception { test("PermissionStatus"); } @@ -6076,7 +6066,7 @@ public void permissionStatus() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void plugin() throws Exception { test("Plugin"); } @@ -6087,7 +6077,7 @@ public void plugin() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void pluginArray() throws Exception { test("PluginArray"); } @@ -6096,7 +6086,7 @@ public void pluginArray() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void point() throws Exception { test("Point"); } @@ -6107,7 +6097,7 @@ public void point() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void pointerEvent() throws Exception { test("PointerEvent"); } @@ -6116,7 +6106,7 @@ public void pointerEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void popStateEvent() throws Exception { test("PopStateEvent"); } @@ -6125,7 +6115,7 @@ public void popStateEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void popup() throws Exception { test("Popup"); } @@ -6134,7 +6124,7 @@ public void popup() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void portCollection() throws Exception { test("PortCollection"); } @@ -6145,7 +6135,7 @@ public void portCollection() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void position() throws Exception { test("Position"); } @@ -6154,7 +6144,7 @@ public void position() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void positionError() throws Exception { test("PositionError"); } @@ -6163,7 +6153,7 @@ public void positionError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void positionOptions() throws Exception { test("PositionOptions"); } @@ -6172,7 +6162,7 @@ public void positionOptions() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void positionSensorVRDevice() throws Exception { test("PositionSensorVRDevice"); } @@ -6181,7 +6171,7 @@ public void positionSensorVRDevice() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void powerManager() throws Exception { test("PowerManager"); } @@ -6190,7 +6180,7 @@ public void powerManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void presentation() throws Exception { test("Presentation"); } @@ -6199,7 +6189,7 @@ public void presentation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void presentationAvailability() throws Exception { test("PresentationAvailability"); } @@ -6208,7 +6198,7 @@ public void presentationAvailability() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void presentationConnection() throws Exception { test("PresentationConnection"); } @@ -6217,7 +6207,7 @@ public void presentationConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void presentationConnectionAvailableEvent() throws Exception { test("PresentationConnectionAvailableEvent"); } @@ -6226,7 +6216,7 @@ public void presentationConnectionAvailableEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void presentationConnectionClosedEvent() throws Exception { test("PresentationConnectionClosedEvent"); } @@ -6235,7 +6225,7 @@ public void presentationConnectionClosedEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void presentationConnectionCloseEvent() throws Exception { test("PresentationConnectionCloseEvent"); } @@ -6244,7 +6234,7 @@ public void presentationConnectionCloseEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void presentationConnectionList() throws Exception { test("PresentationConnectionList"); } @@ -6253,7 +6243,7 @@ public void presentationConnectionList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void presentationReceiver() throws Exception { test("PresentationReceiver"); } @@ -6262,7 +6252,7 @@ public void presentationReceiver() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void presentationRequest() throws Exception { test("PresentationRequest"); } @@ -6273,7 +6263,7 @@ public void presentationRequest() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void processingInstruction() throws Exception { test("ProcessingInstruction"); } @@ -6300,7 +6290,7 @@ public void promise() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void promiseRejection() throws Exception { test("PromiseRejection"); } @@ -6318,7 +6308,7 @@ public void promiseRejectionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void promiseResolver() throws Exception { test("PromiseResolver"); } @@ -6336,7 +6326,7 @@ public void proxy() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void pushEvent() throws Exception { test("PushEvent"); } @@ -6346,7 +6336,7 @@ public void pushEvent() throws Exception { */ @Test @Alerts(DEFAULT = "function PushManager() { [native code] }", - FF_ESR = "exception") + FF_ESR = "ReferenceError") public void pushManager() throws Exception { test("PushManager"); } @@ -6355,7 +6345,7 @@ public void pushManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void pushMessageData() throws Exception { test("PushMessageData"); } @@ -6364,7 +6354,7 @@ public void pushMessageData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void pushRegistrationManager() throws Exception { test("PushRegistrationManager"); } @@ -6374,7 +6364,7 @@ public void pushRegistrationManager() throws Exception { */ @Test @Alerts(DEFAULT = "function PushSubscription() { [native code] }", - FF_ESR = "exception") + FF_ESR = "ReferenceError") public void pushSubscription() throws Exception { test("PushSubscription"); } @@ -6384,7 +6374,7 @@ public void pushSubscription() throws Exception { */ @Test @Alerts(DEFAULT = "function PushSubscriptionOptions() { [native code] }", - FF_ESR = "exception") + FF_ESR = "ReferenceError") public void pushSubscriptionOptions() throws Exception { test("PushSubscriptionOptions"); } @@ -6393,7 +6383,7 @@ public void pushSubscriptionOptions() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void radioNodeList() throws Exception { test("RadioNodeList"); } @@ -6402,7 +6392,7 @@ public void radioNodeList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void randomSource() throws Exception { test("RandomSource"); } @@ -6413,7 +6403,7 @@ public void randomSource() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void range() throws Exception { test("Range"); } @@ -6431,7 +6421,7 @@ public void rangeError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void readableByteStream() throws Exception { test("ReadableByteStream"); } @@ -6476,7 +6466,7 @@ public void regExp() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void remotePlayback() throws Exception { test("RemotePlayback"); } @@ -6485,7 +6475,7 @@ public void remotePlayback() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void renderingContext() throws Exception { test("RenderingContext"); } @@ -6514,7 +6504,7 @@ public void response() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rowContainer() throws Exception { test("RowContainer"); } @@ -6523,7 +6513,7 @@ public void rowContainer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcCertificate() throws Exception { test("RTCCertificate"); } @@ -6532,7 +6522,7 @@ public void rtcCertificate() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcConfiguration() throws Exception { test("RTCConfiguration"); } @@ -6542,9 +6532,9 @@ public void rtcConfiguration() throws Exception { */ @Test @Alerts(DEFAULT = "function RTCDataChannel() { [native code] }", - FF = "exception", - FF_ESR = "exception") - @HtmlUnitNYI(CHROME = "exception", EDGE = "exception") + FF = "ReferenceError", + FF_ESR = "ReferenceError") + @HtmlUnitNYI(CHROME = "ReferenceError", EDGE = "ReferenceError") public void rtcDataChannel() throws Exception { test("RTCDataChannel"); } @@ -6553,7 +6543,7 @@ public void rtcDataChannel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcDataChannelEvent() throws Exception { test("RTCDataChannelEvent"); } @@ -6562,7 +6552,7 @@ public void rtcDataChannelEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcIceCandidate() throws Exception { test("RTCIceCandidate"); } @@ -6571,7 +6561,7 @@ public void rtcIceCandidate() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcIceServer() throws Exception { test("RTCIceServer"); } @@ -6580,7 +6570,7 @@ public void rtcIceServer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcIdentityAssertion() throws Exception { test("RTCIdentityAssertion"); } @@ -6589,7 +6579,7 @@ public void rtcIdentityAssertion() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcIdentityErrorEvent() throws Exception { test("RTCIdentityErrorEvent"); } @@ -6598,7 +6588,7 @@ public void rtcIdentityErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcIdentityEvent() throws Exception { test("RTCIdentityEvent"); } @@ -6607,7 +6597,7 @@ public void rtcIdentityEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcPeerConnection() throws Exception { test("RTCPeerConnection"); } @@ -6616,7 +6606,7 @@ public void rtcPeerConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcPeerConnectionIceEvent() throws Exception { test("RTCPeerConnectionIceEvent"); } @@ -6625,7 +6615,7 @@ public void rtcPeerConnectionIceEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcSctpTransport() throws Exception { test("RTCSctpTransport"); } @@ -6634,7 +6624,7 @@ public void rtcSctpTransport() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcSessionDescription() throws Exception { test("RTCSessionDescription"); } @@ -6643,7 +6633,7 @@ public void rtcSessionDescription() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcSessionDescriptionCallback() throws Exception { test("RTCSessionDescriptionCallback"); } @@ -6652,7 +6642,7 @@ public void rtcSessionDescriptionCallback() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcStatsReport() throws Exception { test("RTCStatsReport"); } @@ -6663,7 +6653,7 @@ public void rtcStatsReport() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void screen() throws Exception { test("Screen"); } @@ -6672,7 +6662,7 @@ public void screen() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void screenOrientation() throws Exception { test("ScreenOrientation"); } @@ -6681,7 +6671,7 @@ public void screenOrientation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void scriptProcessorNode() throws Exception { test("ScriptProcessorNode"); } @@ -6691,8 +6681,8 @@ public void scriptProcessorNode() throws Exception { */ @Test @Alerts(DEFAULT = "function SecurityPolicyViolationEvent() { [native code] }", - FF = "exception", - FF_ESR = "exception") + FF = "ReferenceError", + FF_ESR = "ReferenceError") public void securityPolicyViolationEvent() throws Exception { test("SecurityPolicyViolationEvent"); } @@ -6703,7 +6693,7 @@ public void securityPolicyViolationEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void selection() throws Exception { test("Selection"); } @@ -6712,9 +6702,9 @@ public void selection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function ServiceWorker() { [native code] }") - @HtmlUnitNYI(FF = "exception") + @HtmlUnitNYI(FF = "ReferenceError") public void serviceWorker() throws Exception { test("ServiceWorker"); } @@ -6723,9 +6713,9 @@ public void serviceWorker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function ServiceWorkerContainer() { [native code] }") - @HtmlUnitNYI(FF = "exception") + @HtmlUnitNYI(FF = "ReferenceError") public void serviceWorkerContainer() throws Exception { test("ServiceWorkerContainer"); } @@ -6734,7 +6724,7 @@ public void serviceWorkerContainer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void serviceWorkerGlobalScope() throws Exception { test("ServiceWorkerGlobalScope"); } @@ -6743,7 +6733,7 @@ public void serviceWorkerGlobalScope() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void serviceWorkerMessageEvent() throws Exception { test("ServiceWorkerMessageEvent"); } @@ -6753,7 +6743,7 @@ public void serviceWorkerMessageEvent() throws Exception { */ @Test @Alerts(DEFAULT = "function ServiceWorkerRegistration() { [native code] }", - FF_ESR = "exception") + FF_ESR = "ReferenceError") public void serviceWorkerRegistration() throws Exception { test("ServiceWorkerRegistration"); } @@ -6762,7 +6752,7 @@ public void serviceWorkerRegistration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void serviceWorkerState() throws Exception { test("ServiceWorkerState"); } @@ -6780,7 +6770,7 @@ public void set() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void settingsLock() throws Exception { test("SettingsLock"); } @@ -6789,7 +6779,7 @@ public void settingsLock() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void settingsManager() throws Exception { test("SettingsManager"); } @@ -6800,7 +6790,7 @@ public void settingsManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void shadowRoot() throws Exception { test("ShadowRoot"); } @@ -6809,7 +6799,7 @@ public void shadowRoot() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void sharedArrayBuffer() throws Exception { test("SharedArrayBuffer"); } @@ -6818,7 +6808,7 @@ public void sharedArrayBuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void sharedKeyframeList() throws Exception { test("SharedKeyframeList"); } @@ -6829,7 +6819,7 @@ public void sharedKeyframeList() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void sharedWorker() throws Exception { test("SharedWorker"); } @@ -6838,7 +6828,7 @@ public void sharedWorker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void sharedWorkerGlobalScope() throws Exception { test("SharedWorkerGlobalScope"); } @@ -6847,7 +6837,7 @@ public void sharedWorkerGlobalScope() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd() throws Exception { test("SIMD"); } @@ -6856,7 +6846,7 @@ public void simd() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool16x8() throws Exception { test("SIMD.Bool16x8"); } @@ -6865,7 +6855,7 @@ public void simd_Bool16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool32x4() throws Exception { test("SIMD.Bool32x4"); } @@ -6874,7 +6864,7 @@ public void simd_Bool32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool64x2() throws Exception { test("SIMD.Bool64x2"); } @@ -6883,7 +6873,7 @@ public void simd_Bool64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool8x16() throws Exception { test("SIMD.Bool8x16"); } @@ -6892,7 +6882,7 @@ public void simd_Bool8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_float32x4() throws Exception { test("SIMD.float32x4"); } @@ -6901,7 +6891,7 @@ public void simd_float32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Float32x4() throws Exception { test("SIMD.Float32x4"); } @@ -6910,7 +6900,7 @@ public void simd_Float32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_float64x2() throws Exception { test("SIMD.float64x2"); } @@ -6919,7 +6909,7 @@ public void simd_float64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Float64x2() throws Exception { test("SIMD.Float64x2"); } @@ -6928,7 +6918,7 @@ public void simd_Float64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int16x8() throws Exception { test("SIMD.int16x8"); } @@ -6937,7 +6927,7 @@ public void simd_int16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int16x8() throws Exception { test("SIMD.Int16x8"); } @@ -6946,7 +6936,7 @@ public void simd_Int16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int32x4() throws Exception { test("SIMD.int32x4"); } @@ -6955,7 +6945,7 @@ public void simd_int32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int32x4() throws Exception { test("SIMD.Int32x4"); } @@ -6964,7 +6954,7 @@ public void simd_Int32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int8x16() throws Exception { test("SIMD.int8x16"); } @@ -6973,7 +6963,7 @@ public void simd_int8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int8x16() throws Exception { test("SIMD.Int8x16"); } @@ -6982,7 +6972,7 @@ public void simd_Int8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint16x8() throws Exception { test("SIMD.Uint16x8"); } @@ -6991,7 +6981,7 @@ public void simd_Uint16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint32x4() throws Exception { test("SIMD.Uint32x4"); } @@ -7000,7 +6990,7 @@ public void simd_Uint32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint8x16() throws Exception { test("SIMD.Uint8x16"); } @@ -7011,7 +7001,7 @@ public void simd_Uint8x16() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simpleArray() throws Exception { test("SimpleArray"); } @@ -7020,7 +7010,7 @@ public void simpleArray() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void siteBoundCredential() throws Exception { test("SiteBoundCredential"); } @@ -7030,8 +7020,8 @@ public void siteBoundCredential() throws Exception { */ @Test @Alerts(DEFAULT = "function SourceBuffer() { [native code] }", - FF = "exception", - FF_ESR = "exception") + FF = "ReferenceError", + FF_ESR = "ReferenceError") public void sourceBuffer() throws Exception { test("SourceBuffer"); } @@ -7041,8 +7031,8 @@ public void sourceBuffer() throws Exception { */ @Test @Alerts(DEFAULT = "function SourceBufferList() { [native code] }", - FF = "exception", - FF_ESR = "exception") + FF = "ReferenceError", + FF_ESR = "ReferenceError") public void sourceBufferList() throws Exception { test("SourceBufferList"); } @@ -7051,7 +7041,7 @@ public void sourceBufferList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechGrammar() throws Exception { test("SpeechGrammar"); } @@ -7060,7 +7050,7 @@ public void speechGrammar() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechGrammarList() throws Exception { test("SpeechGrammarList"); } @@ -7069,7 +7059,7 @@ public void speechGrammarList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognition() throws Exception { test("SpeechRecognition"); } @@ -7078,7 +7068,7 @@ public void speechRecognition() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionAlternative() throws Exception { test("SpeechRecognitionAlternative"); } @@ -7087,7 +7077,7 @@ public void speechRecognitionAlternative() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionError() throws Exception { test("SpeechRecognitionError"); } @@ -7096,7 +7086,7 @@ public void speechRecognitionError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionErrorEvent() throws Exception { test("SpeechRecognitionErrorEvent"); } @@ -7105,7 +7095,7 @@ public void speechRecognitionErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionEvent() throws Exception { test("SpeechRecognitionEvent"); } @@ -7114,7 +7104,7 @@ public void speechRecognitionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionResult() throws Exception { test("SpeechRecognitionResult"); } @@ -7123,7 +7113,7 @@ public void speechRecognitionResult() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionResultList() throws Exception { test("SpeechRecognitionResultList"); } @@ -7132,7 +7122,7 @@ public void speechRecognitionResultList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechSynthesis() throws Exception { test("SpeechSynthesis"); } @@ -7141,7 +7131,7 @@ public void speechSynthesis() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechSynthesisErrorEvent() throws Exception { test("SpeechSynthesisErrorEvent"); } @@ -7150,7 +7140,7 @@ public void speechSynthesisErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechSynthesisEvent() throws Exception { test("SpeechSynthesisEvent"); } @@ -7159,7 +7149,7 @@ public void speechSynthesisEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechSynthesisUtterance() throws Exception { test("SpeechSynthesisUtterance"); } @@ -7168,7 +7158,7 @@ public void speechSynthesisUtterance() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechSynthesisVoice() throws Exception { test("SpeechSynthesisVoice"); } @@ -7177,7 +7167,7 @@ public void speechSynthesisVoice() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void staticNodeList() throws Exception { test("StaticNodeList"); } @@ -7186,7 +7176,7 @@ public void staticNodeList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void stereoPannerNode() throws Exception { test("StereoPannerNode"); } @@ -7197,7 +7187,7 @@ public void stereoPannerNode() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void stopIteration() throws Exception { test("StopIteration"); } @@ -7208,7 +7198,7 @@ public void stopIteration() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void storage() throws Exception { test("Storage"); } @@ -7217,7 +7207,7 @@ public void storage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void storageEstimate() throws Exception { test("StorageEstimate"); } @@ -7226,7 +7216,7 @@ public void storageEstimate() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void storageEvent() throws Exception { test("StorageEvent"); } @@ -7244,7 +7234,7 @@ public void storageManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void storageQuota() throws Exception { test("StorageQuota"); } @@ -7262,7 +7252,7 @@ public void string() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void styleMedia() throws Exception { test("StyleMedia"); } @@ -7271,7 +7261,7 @@ public void styleMedia() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void styleSheet() throws Exception { test("StyleSheet"); } @@ -7282,7 +7272,7 @@ public void styleSheet() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void styleSheetList() throws Exception { test("StyleSheetList"); } @@ -7291,7 +7281,7 @@ public void styleSheetList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void submitEvent() throws Exception { test("SubmitEvent"); } @@ -7311,7 +7301,7 @@ public void subtleCrypto() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAElement() throws Exception { test("SVGAElement"); } @@ -7320,7 +7310,7 @@ public void svgAElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAltGlyphElement() throws Exception { test("SVGAltGlyphElement"); } @@ -7331,7 +7321,7 @@ public void svgAltGlyphElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAngle() throws Exception { test("SVGAngle"); } @@ -7340,7 +7330,7 @@ public void svgAngle() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimateColorElement() throws Exception { test("SVGAnimateColorElement"); } @@ -7349,7 +7339,7 @@ public void svgAnimateColorElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedAngle() throws Exception { test("SVGAnimatedAngle"); } @@ -7358,7 +7348,7 @@ public void svgAnimatedAngle() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedBoolean() throws Exception { test("SVGAnimatedBoolean"); } @@ -7367,7 +7357,7 @@ public void svgAnimatedBoolean() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedEnumeration() throws Exception { test("SVGAnimatedEnumeration"); } @@ -7376,7 +7366,7 @@ public void svgAnimatedEnumeration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedInteger() throws Exception { test("SVGAnimatedInteger"); } @@ -7385,7 +7375,7 @@ public void svgAnimatedInteger() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedLength() throws Exception { test("SVGAnimatedLength"); } @@ -7394,7 +7384,7 @@ public void svgAnimatedLength() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedLengthList() throws Exception { test("SVGAnimatedLengthList"); } @@ -7403,7 +7393,7 @@ public void svgAnimatedLengthList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedNumber() throws Exception { test("SVGAnimatedNumber"); } @@ -7412,7 +7402,7 @@ public void svgAnimatedNumber() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedNumberList() throws Exception { test("SVGAnimatedNumberList"); } @@ -7421,7 +7411,7 @@ public void svgAnimatedNumberList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedPoints() throws Exception { test("SVGAnimatedPoints"); } @@ -7430,7 +7420,7 @@ public void svgAnimatedPoints() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedPreserveAspectRatio() throws Exception { test("SVGAnimatedPreserveAspectRatio"); } @@ -7439,7 +7429,7 @@ public void svgAnimatedPreserveAspectRatio() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedRect() throws Exception { test("SVGAnimatedRect"); } @@ -7448,7 +7438,7 @@ public void svgAnimatedRect() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedString() throws Exception { test("SVGAnimatedString"); } @@ -7457,7 +7447,7 @@ public void svgAnimatedString() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedTransformList() throws Exception { test("SVGAnimatedTransformList"); } @@ -7468,7 +7458,7 @@ public void svgAnimatedTransformList() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimateElement() throws Exception { test("SVGAnimateElement"); } @@ -7479,7 +7469,7 @@ public void svgAnimateElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimateMotionElement() throws Exception { test("SVGAnimateMotionElement"); } @@ -7490,7 +7480,7 @@ public void svgAnimateMotionElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimateTransformElement() throws Exception { test("SVGAnimateTransformElement"); } @@ -7499,7 +7489,7 @@ public void svgAnimateTransformElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimationElement() throws Exception { test("SVGAnimationElement"); } @@ -7510,7 +7500,7 @@ public void svgAnimationElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgCircleElement() throws Exception { test("SVGCircleElement"); } @@ -7521,7 +7511,7 @@ public void svgCircleElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgClipPathElement() throws Exception { test("SVGClipPathElement"); } @@ -7530,7 +7520,7 @@ public void svgClipPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgComponentTransferFunctionElement() throws Exception { test("SVGComponentTransferFunctionElement"); } @@ -7539,7 +7529,7 @@ public void svgComponentTransferFunctionElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgCursorElement() throws Exception { test("SVGCursorElement"); } @@ -7550,7 +7540,7 @@ public void svgCursorElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgDefsElement() throws Exception { test("SVGDefsElement"); } @@ -7561,7 +7551,7 @@ public void svgDefsElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgDescElement() throws Exception { test("SVGDescElement"); } @@ -7570,7 +7560,7 @@ public void svgDescElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgDiscardElement() throws Exception { test("SVGDiscardElement"); } @@ -7579,7 +7569,7 @@ public void svgDiscardElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgDocument() throws Exception { test("SVGDocument"); } @@ -7590,7 +7580,7 @@ public void svgDocument() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgElement() throws Exception { test("SVGElement"); } @@ -7601,7 +7591,7 @@ public void svgElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgEllipseElement() throws Exception { test("SVGEllipseElement"); } @@ -7610,7 +7600,7 @@ public void svgEllipseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgEvent() throws Exception { test("SVGEvent"); } @@ -7621,7 +7611,7 @@ public void svgEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEBlendElement() throws Exception { test("SVGFEBlendElement"); } @@ -7632,7 +7622,7 @@ public void svgFEBlendElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEColorMatrixElement() throws Exception { test("SVGFEColorMatrixElement"); } @@ -7643,7 +7633,7 @@ public void svgFEColorMatrixElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEComponentTransferElement() throws Exception { test("SVGFEComponentTransferElement"); } @@ -7654,7 +7644,7 @@ public void svgFEComponentTransferElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFECompositeElement() throws Exception { test("SVGFECompositeElement"); } @@ -7665,7 +7655,7 @@ public void svgFECompositeElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEConvolveMatrixElement() throws Exception { test("SVGFEConvolveMatrixElement"); } @@ -7676,7 +7666,7 @@ public void svgFEConvolveMatrixElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEDiffuseLightingElement() throws Exception { test("SVGFEDiffuseLightingElement"); } @@ -7687,7 +7677,7 @@ public void svgFEDiffuseLightingElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEDisplacementMapElement() throws Exception { test("SVGFEDisplacementMapElement"); } @@ -7698,7 +7688,7 @@ public void svgFEDisplacementMapElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEDistantLightElement() throws Exception { test("SVGFEDistantLightElement"); } @@ -7707,7 +7697,7 @@ public void svgFEDistantLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEDropShadowElement() throws Exception { test("SVGFEDropShadowElement"); } @@ -7718,7 +7708,7 @@ public void svgFEDropShadowElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEFloodElement() throws Exception { test("SVGFEFloodElement"); } @@ -7729,7 +7719,7 @@ public void svgFEFloodElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEFuncAElement() throws Exception { test("SVGFEFuncAElement"); } @@ -7740,7 +7730,7 @@ public void svgFEFuncAElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEFuncBElement() throws Exception { test("SVGFEFuncBElement"); } @@ -7751,7 +7741,7 @@ public void svgFEFuncBElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEFuncGElement() throws Exception { test("SVGFEFuncGElement"); } @@ -7762,7 +7752,7 @@ public void svgFEFuncGElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEFuncRElement() throws Exception { test("SVGFEFuncRElement"); } @@ -7773,7 +7763,7 @@ public void svgFEFuncRElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEGaussianBlurElement() throws Exception { test("SVGFEGaussianBlurElement"); } @@ -7784,7 +7774,7 @@ public void svgFEGaussianBlurElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEImageElement() throws Exception { test("SVGFEImageElement"); } @@ -7795,7 +7785,7 @@ public void svgFEImageElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEMergeElement() throws Exception { test("SVGFEMergeElement"); } @@ -7806,7 +7796,7 @@ public void svgFEMergeElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEMergeNodeElement() throws Exception { test("SVGFEMergeNodeElement"); } @@ -7817,7 +7807,7 @@ public void svgFEMergeNodeElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEMorphologyElement() throws Exception { test("SVGFEMorphologyElement"); } @@ -7828,7 +7818,7 @@ public void svgFEMorphologyElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEOffsetElement() throws Exception { test("SVGFEOffsetElement"); } @@ -7839,7 +7829,7 @@ public void svgFEOffsetElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFEPointLightElement() throws Exception { test("SVGFEPointLightElement"); } @@ -7850,7 +7840,7 @@ public void svgFEPointLightElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFESpecularLightingElement() throws Exception { test("SVGFESpecularLightingElement"); } @@ -7861,7 +7851,7 @@ public void svgFESpecularLightingElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFESpotLightElement() throws Exception { test("SVGFESpotLightElement"); } @@ -7872,7 +7862,7 @@ public void svgFESpotLightElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFETileElement() throws Exception { test("SVGFETileElement"); } @@ -7883,7 +7873,7 @@ public void svgFETileElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFETurbulenceElement() throws Exception { test("SVGFETurbulenceElement"); } @@ -7894,7 +7884,7 @@ public void svgFETurbulenceElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFilterElement() throws Exception { test("SVGFilterElement"); } @@ -7903,7 +7893,7 @@ public void svgFilterElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontElement() throws Exception { test("SVGFontElement"); } @@ -7912,7 +7902,7 @@ public void svgFontElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontFaceElement() throws Exception { test("SVGFontFaceElement"); } @@ -7921,7 +7911,7 @@ public void svgFontFaceElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontFaceFormatElement() throws Exception { test("SVGFontFaceFormatElement"); } @@ -7930,7 +7920,7 @@ public void svgFontFaceFormatElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontFaceNameElement() throws Exception { test("SVGFontFaceNameElement"); } @@ -7939,7 +7929,7 @@ public void svgFontFaceNameElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontFaceSrcElement() throws Exception { test("SVGFontFaceSrcElement"); } @@ -7948,7 +7938,7 @@ public void svgFontFaceSrcElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontFaceUriElement() throws Exception { test("SVGFontFaceUriElement"); } @@ -7959,7 +7949,7 @@ public void svgFontFaceUriElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgForeignObjectElement() throws Exception { test("SVGForeignObjectElement"); } @@ -7970,7 +7960,7 @@ public void svgForeignObjectElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgGElement() throws Exception { test("SVGGElement"); } @@ -7979,7 +7969,7 @@ public void svgGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgGeometryElement() throws Exception { test("SVGGeometryElement"); } @@ -7988,7 +7978,7 @@ public void svgGeometryElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgGlyphElement() throws Exception { test("SVGGlyphElement"); } @@ -7997,7 +7987,7 @@ public void svgGlyphElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgGradientElement() throws Exception { test("SVGGradientElement"); } @@ -8006,7 +7996,7 @@ public void svgGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgGraphicsElement() throws Exception { test("SVGGraphicsElement"); } @@ -8015,7 +8005,7 @@ public void svgGraphicsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgHKernElement() throws Exception { test("SVGHKernElement"); } @@ -8026,7 +8016,7 @@ public void svgHKernElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgImageElement() throws Exception { test("SVGImageElement"); } @@ -8035,7 +8025,7 @@ public void svgImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgLength() throws Exception { test("SVGLength"); } @@ -8044,7 +8034,7 @@ public void svgLength() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgLengthList() throws Exception { test("SVGLengthList"); } @@ -8055,7 +8045,7 @@ public void svgLengthList() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgLinearGradientElement() throws Exception { test("SVGLinearGradientElement"); } @@ -8066,7 +8056,7 @@ public void svgLinearGradientElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgLineElement() throws Exception { test("SVGLineElement"); } @@ -8077,7 +8067,7 @@ public void svgLineElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgMarkerElement() throws Exception { test("SVGMarkerElement"); } @@ -8088,7 +8078,7 @@ public void svgMarkerElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgMaskElement() throws Exception { test("SVGMaskElement"); } @@ -8099,7 +8089,7 @@ public void svgMaskElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgMatrix() throws Exception { test("SVGMatrix"); } @@ -8110,7 +8100,7 @@ public void svgMatrix() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgMetadataElement() throws Exception { test("SVGMetadataElement"); } @@ -8119,7 +8109,7 @@ public void svgMetadataElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgMissingGlyphElement() throws Exception { test("SVGMissingGlyphElement"); } @@ -8130,7 +8120,7 @@ public void svgMissingGlyphElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgMPathElement() throws Exception { test("SVGMPathElement"); } @@ -8139,7 +8129,7 @@ public void svgMPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgNumber() throws Exception { test("SVGNumber"); } @@ -8148,7 +8138,7 @@ public void svgNumber() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgNumberList() throws Exception { test("SVGNumberList"); } @@ -8159,7 +8149,7 @@ public void svgNumberList() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathElement() throws Exception { test("SVGPathElement"); } @@ -8168,7 +8158,7 @@ public void svgPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSeg() throws Exception { test("SVGPathSeg"); } @@ -8177,7 +8167,7 @@ public void svgPathSeg() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegArcAbs() throws Exception { test("SVGPathSegArcAbs"); } @@ -8186,7 +8176,7 @@ public void svgPathSegArcAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegArcRel() throws Exception { test("SVGPathSegArcRel"); } @@ -8195,7 +8185,7 @@ public void svgPathSegArcRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegClosePath() throws Exception { test("SVGPathSegClosePath"); } @@ -8204,7 +8194,7 @@ public void svgPathSegClosePath() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoCubicAbs() throws Exception { test("SVGPathSegCurvetoCubicAbs"); } @@ -8213,7 +8203,7 @@ public void svgPathSegCurvetoCubicAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoCubicRel() throws Exception { test("SVGPathSegCurvetoCubicRel"); } @@ -8222,7 +8212,7 @@ public void svgPathSegCurvetoCubicRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoCubicSmoothAbs() throws Exception { test("SVGPathSegCurvetoCubicSmoothAbs"); } @@ -8231,7 +8221,7 @@ public void svgPathSegCurvetoCubicSmoothAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoCubicSmoothRel() throws Exception { test("SVGPathSegCurvetoCubicSmoothRel"); } @@ -8240,7 +8230,7 @@ public void svgPathSegCurvetoCubicSmoothRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoQuadraticAbs() throws Exception { test("SVGPathSegCurvetoQuadraticAbs"); } @@ -8249,7 +8239,7 @@ public void svgPathSegCurvetoQuadraticAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoQuadraticRel() throws Exception { test("SVGPathSegCurvetoQuadraticRel"); } @@ -8258,7 +8248,7 @@ public void svgPathSegCurvetoQuadraticRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoQuadraticSmoothAbs() throws Exception { test("SVGPathSegCurvetoQuadraticSmoothAbs"); } @@ -8267,7 +8257,7 @@ public void svgPathSegCurvetoQuadraticSmoothAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoQuadraticSmoothRel() throws Exception { test("SVGPathSegCurvetoQuadraticSmoothRel"); } @@ -8276,7 +8266,7 @@ public void svgPathSegCurvetoQuadraticSmoothRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoAbs() throws Exception { test("SVGPathSegLinetoAbs"); } @@ -8285,7 +8275,7 @@ public void svgPathSegLinetoAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoHorizontalAbs() throws Exception { test("SVGPathSegLinetoHorizontalAbs"); } @@ -8294,7 +8284,7 @@ public void svgPathSegLinetoHorizontalAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoHorizontalRel() throws Exception { test("SVGPathSegLinetoHorizontalRel"); } @@ -8303,7 +8293,7 @@ public void svgPathSegLinetoHorizontalRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoRel() throws Exception { test("SVGPathSegLinetoRel"); } @@ -8312,7 +8302,7 @@ public void svgPathSegLinetoRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoVerticalAbs() throws Exception { test("SVGPathSegLinetoVerticalAbs"); } @@ -8321,7 +8311,7 @@ public void svgPathSegLinetoVerticalAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoVerticalRel() throws Exception { test("SVGPathSegLinetoVerticalRel"); } @@ -8330,7 +8320,7 @@ public void svgPathSegLinetoVerticalRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegList() throws Exception { test("SVGPathSegList"); } @@ -8339,7 +8329,7 @@ public void svgPathSegList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegMovetoAbs() throws Exception { test("SVGPathSegMovetoAbs"); } @@ -8348,7 +8338,7 @@ public void svgPathSegMovetoAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegMovetoRel() throws Exception { test("SVGPathSegMovetoRel"); } @@ -8359,7 +8349,7 @@ public void svgPathSegMovetoRel() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPatternElement() throws Exception { test("SVGPatternElement"); } @@ -8368,7 +8358,7 @@ public void svgPatternElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPoint() throws Exception { test("SVGPoint"); } @@ -8377,7 +8367,7 @@ public void svgPoint() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPointList() throws Exception { test("SVGPointList"); } @@ -8388,7 +8378,7 @@ public void svgPointList() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPolygonElement() throws Exception { test("SVGPolygonElement"); } @@ -8399,7 +8389,7 @@ public void svgPolygonElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPolylineElement() throws Exception { test("SVGPolylineElement"); } @@ -8408,7 +8398,7 @@ public void svgPolylineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPreserveAspectRatio() throws Exception { test("SVGPreserveAspectRatio"); } @@ -8419,7 +8409,7 @@ public void svgPreserveAspectRatio() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgRadialGradientElement() throws Exception { test("SVGRadialGradientElement"); } @@ -8430,7 +8420,7 @@ public void svgRadialGradientElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgRect() throws Exception { test("SVGRect"); } @@ -8441,7 +8431,7 @@ public void svgRect() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgRectElement() throws Exception { test("SVGRectElement"); } @@ -8450,7 +8440,7 @@ public void svgRectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgRenderingIntent() throws Exception { test("SVGRenderingIntent"); } @@ -8461,7 +8451,7 @@ public void svgRenderingIntent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgScriptElement() throws Exception { test("SVGScriptElement"); } @@ -8472,7 +8462,7 @@ public void svgScriptElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgSetElement() throws Exception { test("SVGSetElement"); } @@ -8483,7 +8473,7 @@ public void svgSetElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgStopElement() throws Exception { test("SVGStopElement"); } @@ -8492,7 +8482,7 @@ public void svgStopElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgStringList() throws Exception { test("SVGStringList"); } @@ -8501,7 +8491,7 @@ public void svgStringList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgStylable() throws Exception { test("SVGStylable"); } @@ -8512,7 +8502,7 @@ public void svgStylable() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgStyleElement() throws Exception { test("SVGStyleElement"); } @@ -8523,7 +8513,7 @@ public void svgStyleElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgSVGElement() throws Exception { test("SVGSVGElement"); } @@ -8534,7 +8524,7 @@ public void svgSVGElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgSwitchElement() throws Exception { test("SVGSwitchElement"); } @@ -8545,7 +8535,7 @@ public void svgSwitchElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgSymbolElement() throws Exception { test("SVGSymbolElement"); } @@ -8554,7 +8544,7 @@ public void svgSymbolElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTests() throws Exception { test("SVGTests"); } @@ -8563,7 +8553,7 @@ public void svgTests() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTextContentElement() throws Exception { test("SVGTextContentElement"); } @@ -8574,7 +8564,7 @@ public void svgTextContentElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTextElement() throws Exception { test("SVGTextElement"); } @@ -8585,7 +8575,7 @@ public void svgTextElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTextPathElement() throws Exception { test("SVGTextPathElement"); } @@ -8594,7 +8584,7 @@ public void svgTextPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTextPositioningElement() throws Exception { test("SVGTextPositioningElement"); } @@ -8605,7 +8595,7 @@ public void svgTextPositioningElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTitleElement() throws Exception { test("SVGTitleElement"); } @@ -8614,7 +8604,7 @@ public void svgTitleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTransform() throws Exception { test("SVGTransform"); } @@ -8623,7 +8613,7 @@ public void svgTransform() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTransformable() throws Exception { test("SVGTransformable"); } @@ -8632,7 +8622,7 @@ public void svgTransformable() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTransformList() throws Exception { test("SVGTransformList"); } @@ -8641,7 +8631,7 @@ public void svgTransformList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTRefElement() throws Exception { test("SVGTRefElement"); } @@ -8652,7 +8642,7 @@ public void svgTRefElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTSpanElement() throws Exception { test("SVGTSpanElement"); } @@ -8661,7 +8651,7 @@ public void svgTSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgUnitTypes() throws Exception { test("SVGUnitTypes"); } @@ -8672,7 +8662,7 @@ public void svgUnitTypes() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgUseElement() throws Exception { test("SVGUseElement"); } @@ -8683,7 +8673,7 @@ public void svgUseElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgViewElement() throws Exception { test("SVGViewElement"); } @@ -8692,7 +8682,7 @@ public void svgViewElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgViewSpec() throws Exception { test("SVGViewSpec"); } @@ -8701,7 +8691,7 @@ public void svgViewSpec() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgVKernElement() throws Exception { test("SVGVKernElement"); } @@ -8710,7 +8700,7 @@ public void svgVKernElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgZoomEvent() throws Exception { test("SVGZoomEvent"); } @@ -8728,7 +8718,7 @@ public void symbol() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void syncEvent() throws Exception { test("SyncEvent"); } @@ -8738,8 +8728,8 @@ public void syncEvent() throws Exception { */ @Test @Alerts(DEFAULT = "function SyncManager() { [native code] }", - FF = "exception", - FF_ESR = "exception") + FF = "ReferenceError", + FF_ESR = "ReferenceError") public void syncManager() throws Exception { test("SyncManager"); } @@ -8748,7 +8738,7 @@ public void syncManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void syncRegistration() throws Exception { test("SyncRegistration"); } @@ -8766,7 +8756,7 @@ public void syntaxError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void tcpServerSocket() throws Exception { test("TCPServerSocket"); } @@ -8775,7 +8765,7 @@ public void tcpServerSocket() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void tcpSocket() throws Exception { test("TCPSocket"); } @@ -8784,7 +8774,7 @@ public void tcpSocket() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void telephony() throws Exception { test("Telephony"); } @@ -8793,7 +8783,7 @@ public void telephony() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void telephonyCall() throws Exception { test("TelephonyCall"); } @@ -8802,7 +8792,7 @@ public void telephonyCall() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void telephonyCallGroup() throws Exception { test("TelephonyCallGroup"); } @@ -8813,7 +8803,7 @@ public void telephonyCallGroup() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void text() throws Exception { test("Text"); } @@ -8840,7 +8830,7 @@ public void textEncoder() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void textEvent() throws Exception { test("TextEvent"); } @@ -8860,7 +8850,7 @@ public void textMetrics() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void textRange() throws Exception { test("TextRange"); } @@ -8869,7 +8859,7 @@ public void textRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void textTrack() throws Exception { test("TextTrack"); } @@ -8878,7 +8868,7 @@ public void textTrack() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void textTrackCue() throws Exception { test("TextTrackCue"); } @@ -8887,7 +8877,7 @@ public void textTrackCue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void textTrackCueList() throws Exception { test("TextTrackCueList"); } @@ -8896,7 +8886,7 @@ public void textTrackCueList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void textTrackList() throws Exception { test("TextTrackList"); } @@ -8905,7 +8895,7 @@ public void textTrackList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void timeEvent() throws Exception { test("TimeEvent"); } @@ -8914,7 +8904,7 @@ public void timeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void timeRanges() throws Exception { test("TimeRanges"); } @@ -8923,7 +8913,7 @@ public void timeRanges() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void touch() throws Exception { test("Touch"); } @@ -8932,7 +8922,7 @@ public void touch() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void touchEvent() throws Exception { test("TouchEvent"); } @@ -8941,7 +8931,7 @@ public void touchEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void touchList() throws Exception { test("TouchList"); } @@ -8950,7 +8940,7 @@ public void touchList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void trackDefault() throws Exception { test("TrackDefault"); } @@ -8959,7 +8949,7 @@ public void trackDefault() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void trackDefaultList() throws Exception { test("TrackDefaultList"); } @@ -8968,7 +8958,7 @@ public void trackDefaultList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void trackEvent() throws Exception { test("TrackEvent"); } @@ -8977,7 +8967,7 @@ public void trackEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void transferable() throws Exception { test("Transferable"); } @@ -8986,7 +8976,7 @@ public void transferable() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void transitionEvent() throws Exception { test("TransitionEvent"); } @@ -8997,7 +8987,7 @@ public void transitionEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void treeWalker() throws Exception { test("TreeWalker"); } @@ -9006,7 +8996,7 @@ public void treeWalker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void typedArray() throws Exception { test("TypedArray"); } @@ -9024,7 +9014,7 @@ public void typeError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void typeInfo() throws Exception { test("TypeInfo"); } @@ -9033,7 +9023,7 @@ public void typeInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void uDPSocket() throws Exception { test("UDPSocket"); } @@ -9044,7 +9034,7 @@ public void uDPSocket() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void uiEvent() throws Exception { test("UIEvent"); } @@ -9115,7 +9105,7 @@ public void unescape() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void uneval() throws Exception { test("uneval"); } @@ -9153,7 +9143,7 @@ public void urlSearchParams() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void urlUtils() throws Exception { test("URLUtils"); } @@ -9162,7 +9152,7 @@ public void urlUtils() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void urlUtilsReadOnly() throws Exception { test("URLUtilsReadOnly"); } @@ -9171,7 +9161,7 @@ public void urlUtilsReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void userDataHandler() throws Exception { test("UserDataHandler"); } @@ -9180,7 +9170,7 @@ public void userDataHandler() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void userProximityEvent() throws Exception { test("UserProximityEvent"); } @@ -9189,7 +9179,7 @@ public void userProximityEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void uSVString() throws Exception { test("USVString"); } @@ -9198,7 +9188,7 @@ public void uSVString() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void validityState() throws Exception { test("ValidityState"); } @@ -9207,7 +9197,7 @@ public void validityState() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void videoPlaybackQuality() throws Exception { test("VideoPlaybackQuality"); } @@ -9216,7 +9206,7 @@ public void videoPlaybackQuality() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrDevice() throws Exception { test("VRDevice"); } @@ -9225,7 +9215,7 @@ public void vrDevice() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrDisplay() throws Exception { test("VRDisplay"); } @@ -9234,7 +9224,7 @@ public void vrDisplay() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrDisplayCapabilities() throws Exception { test("VRDisplayCapabilities"); } @@ -9243,7 +9233,7 @@ public void vrDisplayCapabilities() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrEyeParameters() throws Exception { test("VREyeParameters"); } @@ -9252,7 +9242,7 @@ public void vrEyeParameters() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrFieldOfView() throws Exception { test("VRFieldOfView"); } @@ -9261,7 +9251,7 @@ public void vrFieldOfView() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrFieldOfViewReadOnly() throws Exception { test("VRFieldOfViewReadOnly"); } @@ -9270,7 +9260,7 @@ public void vrFieldOfViewReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrLayer() throws Exception { test("VRLayer"); } @@ -9279,7 +9269,7 @@ public void vrLayer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrPose() throws Exception { test("VRPose"); } @@ -9288,7 +9278,7 @@ public void vrPose() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrPositionState() throws Exception { test("VRPositionState"); } @@ -9297,7 +9287,7 @@ public void vrPositionState() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrStageParameters() throws Exception { test("VRStageParameters"); } @@ -9306,7 +9296,7 @@ public void vrStageParameters() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vTTCue() throws Exception { test("VTTCue"); } @@ -9315,7 +9305,7 @@ public void vTTCue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void waveShaperNode() throws Exception { test("WaveShaperNode"); } @@ -9342,7 +9332,7 @@ public void weakSet() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL() throws Exception { test("WebGL"); } @@ -9351,7 +9341,7 @@ public void webGL() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_color_buffer_float() throws Exception { test("WEBGL_color_buffer_float"); } @@ -9360,7 +9350,7 @@ public void webGL_color_buffer_float() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_compressed_texture_atc() throws Exception { test("WEBGL_compressed_texture_atc"); } @@ -9369,7 +9359,7 @@ public void webGL_compressed_texture_atc() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_compressed_texture_es3() throws Exception { test("WEBGL_compressed_texture_es3"); } @@ -9378,7 +9368,7 @@ public void webGL_compressed_texture_es3() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void wEBGL_compressed_texture_etc() throws Exception { test("WEBGL_compressed_texture_etc"); } @@ -9387,7 +9377,7 @@ public void wEBGL_compressed_texture_etc() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_compressed_texture_etc1() throws Exception { test("WEBGL_compressed_texture_etc1"); } @@ -9396,7 +9386,7 @@ public void webGL_compressed_texture_etc1() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_compressed_texture_pvrtc() throws Exception { test("WEBGL_compressed_texture_pvrtc"); } @@ -9405,7 +9395,7 @@ public void webGL_compressed_texture_pvrtc() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_compressed_texture_s3tc() throws Exception { test("WEBGL_compressed_texture_s3tc"); } @@ -9414,7 +9404,7 @@ public void webGL_compressed_texture_s3tc() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_debug_renderer_info() throws Exception { test("WEBGL_debug_renderer_info"); } @@ -9423,7 +9413,7 @@ public void webGL_debug_renderer_info() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_debug_shaders() throws Exception { test("WEBGL_debug_shaders"); } @@ -9432,7 +9422,7 @@ public void webGL_debug_shaders() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_depth_texture() throws Exception { test("WEBGL_depth_texture"); } @@ -9441,7 +9431,7 @@ public void webGL_depth_texture() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_draw_buffers() throws Exception { test("WEBGL_draw_buffers"); } @@ -9450,7 +9440,7 @@ public void webGL_draw_buffers() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_lose_context() throws Exception { test("WEBGL_lose_context"); } @@ -9585,7 +9575,7 @@ public void webGLTexture() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGLTimerQueryEXT() throws Exception { test("WebGLTimerQueryEXT"); } @@ -9621,7 +9611,7 @@ public void webGLVertexArrayObject() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGLVertexArrayObjectOES() throws Exception { test("WebGLVertexArrayObjectOES"); } @@ -9630,7 +9620,7 @@ public void webGLVertexArrayObjectOES() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webKitAnimationEvent() throws Exception { test("WebKitAnimationEvent"); } @@ -9639,7 +9629,7 @@ public void webKitAnimationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitAudioContext() throws Exception { test("webkitAudioContext"); } @@ -9648,7 +9638,7 @@ public void webkitAudioContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webKitCSSMatrix() throws Exception { test("WebKitCSSMatrix"); } @@ -9657,7 +9647,7 @@ public void webKitCSSMatrix() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBCursor() throws Exception { test("webkitIDBCursor"); } @@ -9666,7 +9656,7 @@ public void webkitIDBCursor() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBDatabase() throws Exception { test("webkitIDBDatabase"); } @@ -9675,7 +9665,7 @@ public void webkitIDBDatabase() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBFactory() throws Exception { test("webkitIDBFactory"); } @@ -9684,7 +9674,7 @@ public void webkitIDBFactory() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBIndex() throws Exception { test("webkitIDBIndex"); } @@ -9693,7 +9683,7 @@ public void webkitIDBIndex() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBKeyRange() throws Exception { test("webkitIDBKeyRange"); } @@ -9702,7 +9692,7 @@ public void webkitIDBKeyRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBObjectStore() throws Exception { test("webkitIDBObjectStore"); } @@ -9711,7 +9701,7 @@ public void webkitIDBObjectStore() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBRequest() throws Exception { test("webkitIDBRequest"); } @@ -9720,7 +9710,7 @@ public void webkitIDBRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBTransaction() throws Exception { test("webkitIDBTransaction"); } @@ -9729,7 +9719,7 @@ public void webkitIDBTransaction() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitMediaStream() throws Exception { test("webkitMediaStream"); } @@ -9738,7 +9728,7 @@ public void webkitMediaStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webKitMutationObserver() throws Exception { test("WebKitMutationObserver"); } @@ -9747,7 +9737,7 @@ public void webKitMutationObserver() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitOfflineAudioContext() throws Exception { test("webkitOfflineAudioContext"); } @@ -9756,7 +9746,7 @@ public void webkitOfflineAudioContext() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitRTCPeerConnection() throws Exception { test("webkitRTCPeerConnection"); } @@ -9765,7 +9755,7 @@ public void webkitRTCPeerConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitRTCSessionDescription() throws Exception { test("webkitRTCSessionDescription"); } @@ -9774,7 +9764,7 @@ public void webkitRTCSessionDescription() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitSpeechGrammar() throws Exception { test("webkitSpeechGrammar"); } @@ -9783,7 +9773,7 @@ public void webkitSpeechGrammar() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitSpeechGrammarList() throws Exception { test("webkitSpeechGrammarList"); } @@ -9792,7 +9782,7 @@ public void webkitSpeechGrammarList() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitSpeechRecognition() throws Exception { test("webkitSpeechRecognition"); } @@ -9801,7 +9791,7 @@ public void webkitSpeechRecognition() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitSpeechRecognitionError() throws Exception { test("webkitSpeechRecognitionError"); } @@ -9810,7 +9800,7 @@ public void webkitSpeechRecognitionError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitSpeechRecognitionEvent() throws Exception { test("webkitSpeechRecognitionEvent"); } @@ -9819,7 +9809,7 @@ public void webkitSpeechRecognitionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webKitTransitionEvent() throws Exception { test("WebKitTransitionEvent"); } @@ -9828,7 +9818,7 @@ public void webKitTransitionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitURL() throws Exception { test("webkitURL"); } @@ -9837,7 +9827,7 @@ public void webkitURL() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webSMS() throws Exception { test("WebSMS"); } @@ -9857,7 +9847,7 @@ public void webSocket() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webSockets() throws Exception { test("WebSockets"); } @@ -9866,7 +9856,7 @@ public void webSockets() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webVTT() throws Exception { test("WebVTT"); } @@ -9875,7 +9865,7 @@ public void webVTT() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void wheelEvent() throws Exception { test("WheelEvent"); } @@ -9884,7 +9874,7 @@ public void wheelEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void wifiManager() throws Exception { test("WifiManager"); } @@ -9895,7 +9885,7 @@ public void wifiManager() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void window() throws Exception { test("Window"); } @@ -9904,7 +9894,7 @@ public void window() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowBase64() throws Exception { test("WindowBase64"); } @@ -9913,7 +9903,7 @@ public void windowBase64() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowClient() throws Exception { test("WindowClient"); } @@ -9922,7 +9912,7 @@ public void windowClient() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowEventHandlers() throws Exception { test("WindowEventHandlers"); } @@ -9931,7 +9921,7 @@ public void windowEventHandlers() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowEventHandlers_onbeforeprint() throws Exception { test("WindowEventHandlers.onbeforeprint"); } @@ -9940,7 +9930,7 @@ public void windowEventHandlers_onbeforeprint() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowOrWorkerGlobalScope() throws Exception { test("WindowOrWorkerGlobalScope"); } @@ -9949,7 +9939,7 @@ public void windowOrWorkerGlobalScope() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowProperties() throws Exception { test("WindowProperties"); } @@ -9958,7 +9948,7 @@ public void windowProperties() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowTimers() throws Exception { test("WindowTimers"); } @@ -10005,7 +9995,7 @@ public void workerNavigator() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xDomainRequest() throws Exception { test("XDomainRequest"); } @@ -10016,7 +10006,7 @@ public void xDomainRequest() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xmlDocument() throws Exception { test("XMLDocument"); } @@ -10045,7 +10035,7 @@ public void xmlHttpRequestEventTarget() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xmlHttpRequestProgressEvent() throws Exception { test("XMLHttpRequestProgressEvent"); } @@ -10065,7 +10055,7 @@ public void xmlHttpRequestUpload() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xmlSerializer() throws Exception { test("XMLSerializer"); } @@ -10076,7 +10066,7 @@ public void xmlSerializer() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xPathEvaluator() throws Exception { test("XPathEvaluator"); } @@ -10085,7 +10075,7 @@ public void xPathEvaluator() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xPathExpression() throws Exception { test("XPathExpression"); } @@ -10096,7 +10086,7 @@ public void xPathExpression() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xPathNSResolver() throws Exception { test("XPathNSResolver"); } @@ -10107,7 +10097,7 @@ public void xPathNSResolver() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xPathResult() throws Exception { test("XPathResult"); } @@ -10116,7 +10106,7 @@ public void xPathResult() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xsltemplate() throws Exception { test("XSLTemplate"); } @@ -10127,7 +10117,7 @@ public void xsltemplate() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xsltProcessor() throws Exception { test("XSLTProcessor"); } diff --git a/src/test/java/org/htmlunit/general/DedicatedWorkerGlobalScopeConstantsTest.java b/src/test/java/org/htmlunit/general/DedicatedWorkerGlobalScopeConstantsTest.java index 5d929df73ec..46fe0d23a44 100644 --- a/src/test/java/org/htmlunit/general/DedicatedWorkerGlobalScopeConstantsTest.java +++ b/src/test/java/org/htmlunit/general/DedicatedWorkerGlobalScopeConstantsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Comparator; +import java.util.HashMap; import java.util.List; import java.util.Set; @@ -31,7 +32,7 @@ import org.htmlunit.javascript.configuration.WorkerJavaScriptConfiguration; import org.htmlunit.junit.BrowserParameterizedRunner; import org.htmlunit.junit.BrowserParameterizedRunner.Default; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.htmlunit.util.MimeType; import org.junit.Test; import org.junit.runner.RunWith; @@ -80,7 +81,8 @@ public void test() throws Exception { } private void test(final String className, final String[] expectedAlerts) throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + + "" + "\n"; final String workerJs = "onmessage = function(e) {\n" + " var workerResult = '';\n" + " try {\n" + " workerResult += typeof " + className + ";\n" - + " } catch(e) {workerResult = 'exception'}\n" + + " } catch(e) {workerResult = e.name}\n" + " postMessage(workerResult);\n" + "}\n"; @@ -252,7 +253,7 @@ public void applicationCacheErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void apps_mgmt() throws Exception { test("Apps.mgmt"); } @@ -505,6 +506,15 @@ public void beforeUnloadEvent() throws Exception { test("BeforeUnloadEvent"); } + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("function") + public void bigInt() throws Exception { + test("BigInt"); + } + /** * @throws Exception if the test fails */ @@ -909,26 +919,6 @@ public void client() throws Exception { test("Client"); } - /** - * Test {@link org.htmlunit.javascript.host.ClientRect}. - * - * @throws Exception if an error occurs - */ - @Test - @Alerts("undefined") - public void clientRect() throws Exception { - test("ClientRect"); - } - - /** - * @throws Exception if an error occurs - */ - @Test - @Alerts("undefined") - public void clientRectList() throws Exception { - test("ClientRectList"); - } - /** * @throws Exception if the test fails */ @@ -1878,7 +1868,7 @@ public void domPointReadOnly() throws Exception { } /** - * Test {@link org.htmlunit.javascript.host.ClientRect}. + * Test {@link org.htmlunit.javascript.host.DOMRect}. * * @throws Exception if an error occurs */ @@ -4374,7 +4364,7 @@ public void l10n() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_formatValue() throws Exception { test("L10n.formatValue"); } @@ -4383,7 +4373,7 @@ public void l10n_formatValue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_get() throws Exception { test("L10n.get"); } @@ -4392,7 +4382,7 @@ public void l10n_get() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_language_code() throws Exception { test("L10n.language.code"); } @@ -4401,7 +4391,7 @@ public void l10n_language_code() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_language_direction() throws Exception { test("L10n.language.direction"); } @@ -4410,7 +4400,7 @@ public void l10n_language_direction() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_once() throws Exception { test("L10n.once"); } @@ -4419,7 +4409,7 @@ public void l10n_once() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_ready() throws Exception { test("L10n.ready"); } @@ -4428,7 +4418,7 @@ public void l10n_ready() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_readyState() throws Exception { test("L10n.readyState"); } @@ -4437,7 +4427,7 @@ public void l10n_readyState() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_setAttributes() throws Exception { test("L10n.setAttributes"); } @@ -6853,7 +6843,7 @@ public void simd() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool16x8() throws Exception { test("SIMD.Bool16x8"); } @@ -6862,7 +6852,7 @@ public void simd_Bool16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool32x4() throws Exception { test("SIMD.Bool32x4"); } @@ -6871,7 +6861,7 @@ public void simd_Bool32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool64x2() throws Exception { test("SIMD.Bool64x2"); } @@ -6880,7 +6870,7 @@ public void simd_Bool64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool8x16() throws Exception { test("SIMD.Bool8x16"); } @@ -6889,7 +6879,7 @@ public void simd_Bool8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_float32x4() throws Exception { test("SIMD.float32x4"); } @@ -6898,7 +6888,7 @@ public void simd_float32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Float32x4() throws Exception { test("SIMD.Float32x4"); } @@ -6907,7 +6897,7 @@ public void simd_Float32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_float64x2() throws Exception { test("SIMD.float64x2"); } @@ -6916,7 +6906,7 @@ public void simd_float64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Float64x2() throws Exception { test("SIMD.Float64x2"); } @@ -6925,7 +6915,7 @@ public void simd_Float64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int16x8() throws Exception { test("SIMD.int16x8"); } @@ -6934,7 +6924,7 @@ public void simd_int16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int16x8() throws Exception { test("SIMD.Int16x8"); } @@ -6943,7 +6933,7 @@ public void simd_Int16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int32x4() throws Exception { test("SIMD.int32x4"); } @@ -6952,7 +6942,7 @@ public void simd_int32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int32x4() throws Exception { test("SIMD.Int32x4"); } @@ -6961,7 +6951,7 @@ public void simd_Int32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int8x16() throws Exception { test("SIMD.int8x16"); } @@ -6970,7 +6960,7 @@ public void simd_int8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int8x16() throws Exception { test("SIMD.Int8x16"); } @@ -6979,7 +6969,7 @@ public void simd_Int8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint16x8() throws Exception { test("SIMD.Uint16x8"); } @@ -6988,7 +6978,7 @@ public void simd_Uint16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint32x4() throws Exception { test("SIMD.Uint32x4"); } @@ -6997,7 +6987,7 @@ public void simd_Uint32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint8x16() throws Exception { test("SIMD.Uint8x16"); } @@ -9928,7 +9918,7 @@ public void windowEventHandlers() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowEventHandlers_onbeforeprint() throws Exception { test("WindowEventHandlers.onbeforeprint"); } diff --git a/src/test/java/org/htmlunit/general/ElementChildNodesTest.java b/src/test/java/org/htmlunit/general/ElementChildNodesTest.java index a2b95e9b4fd..ca837ffac10 100644 --- a/src/test/java/org/htmlunit/general/ElementChildNodesTest.java +++ b/src/test/java/org/htmlunit/general/ElementChildNodesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,8 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; @@ -32,7 +33,8 @@ public class ElementChildNodesTest extends WebDriverTestCase { private static String test(final String tagName) { - return "\n" + return DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -116,7 +119,8 @@ private void test(final String tagName) throws Exception { } private static String headElementClosesItself(final String tagName) { - return "\n" + return DOCTYPE_HTML + + "\n" + "<" + tagName + " id='outer'><" + tagName + ">\n" + "\n" + "\n" @@ -73,7 +70,7 @@ private void test(final String className) throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void abstractList() throws Exception { test("AbstractList"); } @@ -91,7 +88,7 @@ public void abstractRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void abstractWorker() throws Exception { test("AbstractWorker"); } @@ -102,7 +99,7 @@ public void abstractWorker() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void activeXObject() throws Exception { test("ActiveXObject"); } @@ -111,7 +108,7 @@ public void activeXObject() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ambientLightSensor() throws Exception { test("AmbientLightSensor"); } @@ -120,7 +117,7 @@ public void ambientLightSensor() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ambientLightSensorReading() throws Exception { test("AmbientLightSensorReading"); } @@ -140,7 +137,7 @@ public void analyserNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void angle_instanced_arrays() throws Exception { test("ANGLE_instanced_arrays"); } @@ -158,7 +155,7 @@ public void animation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationEffectReadOnly() throws Exception { test("AnimationEffectReadOnly"); } @@ -167,7 +164,7 @@ public void animationEffectReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationEffectTiming() throws Exception { test("AnimationEffectTiming"); } @@ -176,7 +173,7 @@ public void animationEffectTiming() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationEffectTimingProperties() throws Exception { test("AnimationEffectTimingProperties"); } @@ -185,7 +182,7 @@ public void animationEffectTimingProperties() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationEffectTimingReadOnly() throws Exception { test("AnimationEffectTimingReadOnly"); } @@ -206,7 +203,7 @@ public void animationEvent() throws Exception { */ @Test @Alerts("function AnimationPlaybackEvent() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", EDGE = "exception", FF = "exception", FF_ESR = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", EDGE = "ReferenceError", FF = "ReferenceError", FF_ESR = "ReferenceError") public void animationPlaybackEvent() throws Exception { test("AnimationPlaybackEvent"); } @@ -215,7 +212,7 @@ public void animationPlaybackEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void animationPlayer() throws Exception { test("AnimationPlayer"); } @@ -225,7 +222,7 @@ public void animationPlayer() throws Exception { */ @Test @Alerts("function AnimationTimeline() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", EDGE = "exception", FF = "exception", FF_ESR = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", EDGE = "ReferenceError", FF = "ReferenceError", FF_ESR = "ReferenceError") public void animationTimeline() throws Exception { test("AnimationTimeline"); } @@ -234,7 +231,7 @@ public void animationTimeline() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void appBannerPromptResult() throws Exception { test("AppBannerPromptResult"); } @@ -245,7 +242,7 @@ public void appBannerPromptResult() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void applicationCache() throws Exception { test("ApplicationCache"); } @@ -254,7 +251,7 @@ public void applicationCache() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void applicationCacheErrorEvent() throws Exception { test("ApplicationCacheErrorEvent"); } @@ -263,7 +260,7 @@ public void applicationCacheErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void apps_mgmt() throws Exception { test("Apps.mgmt"); } @@ -305,7 +302,7 @@ public void arrayBuffer() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void arrayBufferView() throws Exception { test("ArrayBufferView"); } @@ -316,7 +313,7 @@ public void arrayBufferView() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void arrayBufferViewBase() throws Exception { test("ArrayBufferViewBase"); } @@ -325,7 +322,7 @@ public void arrayBufferViewBase() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void asyncFunction() throws Exception { test("AsyncFunction"); } @@ -383,7 +380,7 @@ public void audioBufferSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void audioChannelManager() throws Exception { test("AudioChannelManager"); } @@ -457,7 +454,7 @@ public void audioScheduledSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void autocompleteErrorEvent() throws Exception { test("AutocompleteErrorEvent"); } @@ -484,7 +481,7 @@ public void baseAudioContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function BatteryManager() { [native code] }", EDGE = "function BatteryManager() { [native code] }") public void batteryManager() throws Exception { @@ -495,7 +492,7 @@ public void batteryManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void beforeInstallPrompt() throws Exception { test("BeforeInstallPrompt"); } @@ -504,7 +501,7 @@ public void beforeInstallPrompt() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function BeforeInstallPromptEvent() { [native code] }", EDGE = "function BeforeInstallPromptEvent() { [native code] }") public void beforeInstallPromptEvent() throws Exception { @@ -522,6 +519,15 @@ public void beforeUnloadEvent() throws Exception { test("BeforeUnloadEvent"); } + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("function BigInt() { [native code] }") + public void bigInt() throws Exception { + test("BigInt"); + } + /** * @throws Exception if the test fails */ @@ -544,7 +550,7 @@ public void blob() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void blobBuilder() throws Exception { test("BlobBuilder"); } @@ -562,10 +568,10 @@ public void blobEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function Bluetooth() { [native code] }", EDGE = "function Bluetooth() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", EDGE = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", EDGE = "ReferenceError") public void bluetooth() throws Exception { test("Bluetooth"); } @@ -574,7 +580,7 @@ public void bluetooth() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothAdapter() throws Exception { test("BluetoothAdapter"); } @@ -583,7 +589,7 @@ public void bluetoothAdapter() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothAdvertisingData() throws Exception { test("BluetoothAdvertisingData"); } @@ -592,10 +598,10 @@ public void bluetoothAdvertisingData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function BluetoothCharacteristicProperties() { [native code] }", EDGE = "function BluetoothCharacteristicProperties() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", EDGE = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", EDGE = "ReferenceError") public void bluetoothCharacteristicProperties() throws Exception { test("BluetoothCharacteristicProperties"); } @@ -604,10 +610,10 @@ public void bluetoothCharacteristicProperties() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function BluetoothDevice() { [native code] }", EDGE = "function BluetoothDevice() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", EDGE = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", EDGE = "ReferenceError") public void bluetoothDevice() throws Exception { test("BluetoothDevice"); } @@ -616,7 +622,7 @@ public void bluetoothDevice() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothDeviceEvent() throws Exception { test("BluetoothDeviceEvent"); } @@ -625,7 +631,7 @@ public void bluetoothDeviceEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothGATTRemoteServer() throws Exception { test("BluetoothGATTRemoteServer"); } @@ -634,7 +640,7 @@ public void bluetoothGATTRemoteServer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothGATTService() throws Exception { test("BluetoothGATTService"); } @@ -643,7 +649,7 @@ public void bluetoothGATTService() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothManager() throws Exception { test("BluetoothManager"); } @@ -652,10 +658,10 @@ public void bluetoothManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function BluetoothRemoteGATTCharacteristic() { [native code] }", EDGE = "function BluetoothRemoteGATTCharacteristic() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", EDGE = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", EDGE = "ReferenceError") public void bluetoothRemoteGATTCharacteristic() throws Exception { test("BluetoothRemoteGATTCharacteristic"); } @@ -664,10 +670,10 @@ public void bluetoothRemoteGATTCharacteristic() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function BluetoothRemoteGATTServer() { [native code] }", EDGE = "function BluetoothRemoteGATTServer() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", EDGE = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", EDGE = "ReferenceError") public void bluetoothRemoteGATTServer() throws Exception { test("BluetoothRemoteGATTServer"); } @@ -676,7 +682,7 @@ public void bluetoothRemoteGATTServer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bluetoothStatusChangedEvent() throws Exception { test("BluetoothStatusChangedEvent"); } @@ -685,7 +691,7 @@ public void bluetoothStatusChangedEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void body() throws Exception { test("Body"); } @@ -694,7 +700,7 @@ public void body() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void boxObject() throws Exception { test("BoxObject"); } @@ -712,7 +718,7 @@ public void broadcastChannel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void budgetService() throws Exception { test("BudgetService"); } @@ -721,7 +727,7 @@ public void budgetService() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void budgetState() throws Exception { test("BudgetState"); } @@ -730,7 +736,7 @@ public void budgetState() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void bufferSource() throws Exception { test("BufferSource"); } @@ -739,7 +745,7 @@ public void bufferSource() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void byteString() throws Exception { test("ByteString"); } @@ -766,7 +772,7 @@ public void cacheStorage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void callEvent() throws Exception { test("CallEvent"); } @@ -775,7 +781,7 @@ public void callEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cameraCapabilities() throws Exception { test("CameraCapabilities"); } @@ -784,7 +790,7 @@ public void cameraCapabilities() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cameraControl() throws Exception { test("CameraControl"); } @@ -793,7 +799,7 @@ public void cameraControl() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cameraManager() throws Exception { test("CameraManager"); } @@ -802,7 +808,7 @@ public void cameraManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function CanvasCaptureMediaStream() { [native code] }", FF_ESR = "function CanvasCaptureMediaStream() { [native code] }") public void canvasCaptureMediaStream() throws Exception { @@ -813,7 +819,7 @@ public void canvasCaptureMediaStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function CanvasCaptureMediaStreamTrack() { [native code] }", EDGE = "function CanvasCaptureMediaStreamTrack() { [native code] }") public void canvasCaptureMediaStreamTrack() throws Exception { @@ -833,7 +839,7 @@ public void canvasGradient() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void canvasImageSource() throws Exception { test("CanvasImageSource"); } @@ -915,7 +921,7 @@ public void characterData() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void characterDataImpl() throws Exception { test("CharacterDataImpl"); } @@ -924,7 +930,7 @@ public void characterDataImpl() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void childNode() throws Exception { test("ChildNode"); } @@ -933,7 +939,7 @@ public void childNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void chromeWorker() throws Exception { test("ChromeWorker"); } @@ -942,38 +948,16 @@ public void chromeWorker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void client() throws Exception { test("Client"); } - /** - * Test {@link org.htmlunit.javascript.host.ClientRect}. - * - * @throws Exception if an error occurs - */ - @Test - @Alerts("exception") - public void clientRect() throws Exception { - test("ClientRect"); - } - - /** - * Test {@link org.htmlunit.javascript.host.ClientRectList}. - * - * @throws Exception if an error occurs - */ - @Test - @Alerts("exception") - public void clientRectList() throws Exception { - test("ClientRectList"); - } - /** * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void clients() throws Exception { test("Clients"); } @@ -982,7 +966,7 @@ public void clients() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void clipboardData() throws Exception { test("ClipboardData"); } @@ -1031,7 +1015,7 @@ public void compositionEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void computedCSSStyleDeclaration() throws Exception { test("ComputedCSSStyleDeclaration"); } @@ -1040,7 +1024,7 @@ public void computedCSSStyleDeclaration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void connection() throws Exception { test(HttpHeader.CONNECTION); } @@ -1051,7 +1035,7 @@ public void connection() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void console() throws Exception { test("Console"); } @@ -1069,7 +1053,7 @@ public void constantSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void constrainBoolean() throws Exception { test("ConstrainBoolean"); } @@ -1078,7 +1062,7 @@ public void constrainBoolean() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void constrainDOMString() throws Exception { test("ConstrainDOMString"); } @@ -1087,7 +1071,7 @@ public void constrainDOMString() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void constrainDouble() throws Exception { test("ConstrainDouble"); } @@ -1096,7 +1080,7 @@ public void constrainDouble() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void constrainLong() throws Exception { test("ConstrainLong"); } @@ -1105,7 +1089,7 @@ public void constrainLong() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void contactManager() throws Exception { test("ContactManager"); } @@ -1125,7 +1109,7 @@ public void convolverNode() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void coordinates() throws Exception { test("Coordinates"); } @@ -1181,7 +1165,7 @@ public void css() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function CSS2Properties() { [native code] }", FF_ESR = "function CSS2Properties() { [native code] }") public void css2Properties() throws Exception { @@ -1194,9 +1178,9 @@ public void css2Properties() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function CSSPageDescriptors() { [native code] }") - @HtmlUnitNYI(FF = "exception") + @HtmlUnitNYI(FF = "ReferenceError") public void cssPageDescriptors() throws Exception { test("CSSPageDescriptors"); } @@ -1205,7 +1189,7 @@ public void cssPageDescriptors() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssCharsetRule() throws Exception { test("CSSCharsetRule"); } @@ -1281,7 +1265,7 @@ public void cssKeyframesRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssMatrix() throws Exception { test("CSSMatrix"); } @@ -1323,7 +1307,7 @@ public void cssPageRule() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssPrimitiveValue() throws Exception { test("CSSPrimitiveValue"); } @@ -1368,7 +1352,6 @@ public void cssStyleDeclaration() throws Exception { */ @Test @Alerts("function CSSStyleRule() { [native code] }") - @AlertsStandards("function CSSStyleRule() { [native code] }") public void cssStyleRule() throws Exception { test("CSSStyleRule"); } @@ -1397,7 +1380,7 @@ public void cssSupportsRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssUnknownRule() throws Exception { test("CSSUnknownRule"); } @@ -1408,7 +1391,7 @@ public void cssUnknownRule() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssValue() throws Exception { test("CSSValue"); } @@ -1417,7 +1400,7 @@ public void cssValue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssValueList() throws Exception { test("CSSValueList"); } @@ -1426,7 +1409,7 @@ public void cssValueList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void cssViewportRule() throws Exception { test("CSSViewportRule"); } @@ -1453,7 +1436,7 @@ public void customEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dataStore() throws Exception { test("DataStore"); } @@ -1462,7 +1445,7 @@ public void dataStore() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dataStoreChangeEvent() throws Exception { test("DataStoreChangeEvent"); } @@ -1471,7 +1454,7 @@ public void dataStoreChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dataStoreCursor() throws Exception { test("DataStoreCursor"); } @@ -1480,7 +1463,7 @@ public void dataStoreCursor() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dataStoreTask() throws Exception { test("DataStoreTask"); } @@ -1554,7 +1537,7 @@ public void decodeURIComponent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void dedicatedWorkerGlobalScope() throws Exception { test("DedicatedWorkerGlobalScope"); } @@ -1572,7 +1555,7 @@ public void delayNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceAcceleration() throws Exception { test("DeviceAcceleration"); } @@ -1581,7 +1564,7 @@ public void deviceAcceleration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceLightEvent() throws Exception { test("DeviceLightEvent"); } @@ -1608,7 +1591,7 @@ public void deviceOrientationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceProximityEvent() throws Exception { test("DeviceProximityEvent"); } @@ -1617,7 +1600,7 @@ public void deviceProximityEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceRotationRate() throws Exception { test("DeviceRotationRate"); } @@ -1626,7 +1609,7 @@ public void deviceRotationRate() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceStorage() throws Exception { test("DeviceStorage"); } @@ -1635,7 +1618,7 @@ public void deviceStorage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void deviceStorageChangeEvent() throws Exception { test("DeviceStorageChangeEvent"); } @@ -1644,7 +1627,7 @@ public void deviceStorageChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void directoryEntry() throws Exception { test("DirectoryEntry"); } @@ -1653,7 +1636,7 @@ public void directoryEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void directoryEntrySync() throws Exception { test("DirectoryEntrySync"); } @@ -1662,7 +1645,7 @@ public void directoryEntrySync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void directoryReader() throws Exception { test("DirectoryReader"); } @@ -1671,7 +1654,7 @@ public void directoryReader() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void directoryReaderSync() throws Exception { test("DirectoryReaderSync"); } @@ -1702,7 +1685,7 @@ public void documentFragment() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void documentOrShadowRoot() throws Exception { test("DocumentOrShadowRoot"); } @@ -1712,7 +1695,7 @@ public void documentOrShadowRoot() throws Exception { */ @Test @Alerts("function DocumentTimeline() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", EDGE = "exception", FF = "exception", FF_ESR = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", EDGE = "ReferenceError", FF = "ReferenceError", FF_ESR = "ReferenceError") public void documentTimeline() throws Exception { test("DocumentTimeline"); } @@ -1721,7 +1704,7 @@ public void documentTimeline() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void documentTouch() throws Exception { test("DocumentTouch"); } @@ -1741,7 +1724,7 @@ public void documentType() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domApplication() throws Exception { test("DOMApplication"); } @@ -1750,7 +1733,7 @@ public void domApplication() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domApplicationsManager() throws Exception { test("DOMApplicationsManager"); } @@ -1759,7 +1742,7 @@ public void domApplicationsManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domApplicationsRegistry() throws Exception { test("DOMApplicationsRegistry"); } @@ -1768,7 +1751,7 @@ public void domApplicationsRegistry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domConfiguration() throws Exception { test("DOMConfiguration"); } @@ -1779,7 +1762,7 @@ public void domConfiguration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domCursor() throws Exception { test("DOMCursor"); } @@ -1789,8 +1772,8 @@ public void domCursor() throws Exception { */ @Test @Alerts(DEFAULT = "function DOMError() { [native code] }", - FF = "exception", - FF_ESR = "exception") + FF = "ReferenceError", + FF_ESR = "ReferenceError") public void domError() throws Exception { test("DOMError"); } @@ -1799,7 +1782,7 @@ public void domError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domErrorHandler() throws Exception { test("DOMErrorHandler"); } @@ -1819,7 +1802,7 @@ public void domException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domHighResTimeStamp() throws Exception { test("DOMHighResTimeStamp"); } @@ -1839,7 +1822,7 @@ public void domImplementation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domImplementationList() throws Exception { test("DOMImplementationList"); } @@ -1848,7 +1831,7 @@ public void domImplementationList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domImplementationRegistry() throws Exception { test("DOMImplementationRegistry"); } @@ -1857,7 +1840,7 @@ public void domImplementationRegistry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domImplementationSource() throws Exception { test("DOMImplementationSource"); } @@ -1866,7 +1849,7 @@ public void domImplementationSource() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domLocator() throws Exception { test("DOMLocator"); } @@ -1893,7 +1876,7 @@ public void domMatrixReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domObject() throws Exception { test("DOMObject"); } @@ -1928,7 +1911,7 @@ public void domPointReadOnly() throws Exception { } /** - * Test {@link org.htmlunit.javascript.host.ClientRect}. + * Test {@link org.htmlunit.javascript.host.DOMRect}. * * @throws Exception if an error occurs */ @@ -1960,7 +1943,7 @@ public void domRectReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domRequest() throws Exception { test("DOMRequest"); } @@ -1969,7 +1952,7 @@ public void domRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domSettableTokenList() throws Exception { test("DOMSettableTokenList"); } @@ -1978,7 +1961,7 @@ public void domSettableTokenList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domString() throws Exception { test("DOMString"); } @@ -2007,7 +1990,7 @@ public void domStringMap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domTimeStamp() throws Exception { test("DOMTimeStamp"); } @@ -2027,7 +2010,7 @@ public void domTokenList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void domUserData() throws Exception { test("DOMUserData"); } @@ -2036,7 +2019,7 @@ public void domUserData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void doubleRange() throws Exception { test("DoubleRange"); } @@ -2074,7 +2057,7 @@ public void element() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void elementTraversal() throws Exception { test("ElementTraversal"); } @@ -2101,7 +2084,7 @@ public void encodeURIComponent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void entity() throws Exception { test("Entity"); } @@ -2110,7 +2093,7 @@ public void entity() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void entityReference() throws Exception { test("EntityReference"); } @@ -2119,7 +2102,7 @@ public void entityReference() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void entry() throws Exception { test("Entry"); } @@ -2128,7 +2111,7 @@ public void entry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void entrySync() throws Exception { test("EntrySync"); } @@ -2139,7 +2122,7 @@ public void entrySync() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void enumerator() throws Exception { test("Enumerator"); } @@ -2204,7 +2187,7 @@ public void event() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void eventListener() throws Exception { test("EventListener"); } @@ -2213,7 +2196,7 @@ public void eventListener() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void eventNode() throws Exception { test("EventNode"); } @@ -2240,7 +2223,7 @@ public void eventTarget() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_blend_minmax() throws Exception { test("EXT_blend_minmax"); } @@ -2249,7 +2232,7 @@ public void ext_blend_minmax() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_color_buffer_float() throws Exception { test("EXT_color_buffer_float"); } @@ -2258,7 +2241,7 @@ public void ext_color_buffer_float() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_color_buffer_half_float() throws Exception { test("EXT_color_buffer_half_float"); } @@ -2267,7 +2250,7 @@ public void ext_color_buffer_half_float() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_disjoint_timer_query() throws Exception { test("EXT_disjoint_timer_query"); } @@ -2276,7 +2259,7 @@ public void ext_disjoint_timer_query() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_frag_depth() throws Exception { test("EXT_frag_depth"); } @@ -2285,7 +2268,7 @@ public void ext_frag_depth() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_shader_texture_lod() throws Exception { test("EXT_shader_texture_lod"); } @@ -2294,7 +2277,7 @@ public void ext_shader_texture_lod() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_sRGB() throws Exception { test("EXT_sRGB"); } @@ -2303,7 +2286,7 @@ public void ext_sRGB() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void ext_texture_filter_anisotropic() throws Exception { test("EXT_texture_filter_anisotropic"); } @@ -2312,7 +2295,7 @@ public void ext_texture_filter_anisotropic() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void extendableEvent() throws Exception { test("ExtendableEvent"); } @@ -2321,7 +2304,7 @@ public void extendableEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void extendableMessageEvent() throws Exception { test("ExtendableMessageEvent"); } @@ -2332,7 +2315,7 @@ public void extendableMessageEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function External() { [native code] }", EDGE = "function External() { [native code] }") public void external() throws Exception { @@ -2343,7 +2326,7 @@ public void external() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function FederatedCredential() { [native code] }", EDGE = "function FederatedCredential() { [native code] }") public void federatedCredential() throws Exception { @@ -2354,7 +2337,7 @@ public void federatedCredential() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fetchEvent() throws Exception { test("FetchEvent"); } @@ -2372,7 +2355,7 @@ public void file() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileEntry() throws Exception { test("FileEntry"); } @@ -2381,7 +2364,7 @@ public void fileEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileEntrySync() throws Exception { test("FileEntrySync"); } @@ -2390,7 +2373,7 @@ public void fileEntrySync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileError() throws Exception { test("FileError"); } @@ -2399,7 +2382,7 @@ public void fileError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileException() throws Exception { test("FileException"); } @@ -2408,7 +2391,7 @@ public void fileException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileHandle() throws Exception { test("FileHandle"); } @@ -2435,7 +2418,7 @@ public void fileReader() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileReaderSync() throws Exception { test("FileReaderSync"); } @@ -2444,7 +2427,7 @@ public void fileReaderSync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileRequest() throws Exception { test("FileRequest"); } @@ -2453,7 +2436,7 @@ public void fileRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function FileSystem() { [native code] }", FF_ESR = "function FileSystem() { [native code] }") public void fileSystem() throws Exception { @@ -2464,7 +2447,7 @@ public void fileSystem() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function FileSystemDirectoryEntry() { [native code] }", FF_ESR = "function FileSystemDirectoryEntry() { [native code] }") public void fileSystemDirectoryEntry() throws Exception { @@ -2475,7 +2458,7 @@ public void fileSystemDirectoryEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function FileSystemDirectoryReader() { [native code] }", FF_ESR = "function FileSystemDirectoryReader() { [native code] }") public void fileSystemDirectoryReader() throws Exception { @@ -2486,7 +2469,7 @@ public void fileSystemDirectoryReader() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function FileSystemEntry() { [native code] }", FF_ESR = "function FileSystemEntry() { [native code] }") public void fileSystemEntry() throws Exception { @@ -2497,7 +2480,7 @@ public void fileSystemEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function FileSystemFileEntry() { [native code] }", FF_ESR = "function FileSystemFileEntry() { [native code] }") public void fileSystemFileEntry() throws Exception { @@ -2508,7 +2491,7 @@ public void fileSystemFileEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileSystemFlags() throws Exception { test("FileSystemFlags"); } @@ -2517,7 +2500,7 @@ public void fileSystemFlags() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fileSystemSync() throws Exception { test("FileSystemSync"); } @@ -2548,7 +2531,7 @@ public void float64Array() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void fMRadio() throws Exception { test("FMRadio"); } @@ -2575,7 +2558,7 @@ public void fontFace() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function FontFaceSet() { [native code] }", FF_ESR = "function FontFaceSet() { [native code] }") public void fontFaceSet() throws Exception { @@ -2586,7 +2569,7 @@ public void fontFaceSet() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void formChild() throws Exception { test("FormChild"); } @@ -2606,7 +2589,7 @@ public void formData() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void formField() throws Exception { test("FormField"); } @@ -2662,7 +2645,7 @@ public void gamepadEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void generator() throws Exception { test("Generator"); } @@ -2671,7 +2654,7 @@ public void generator() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void generatorFunction() throws Exception { test("GeneratorFunction"); } @@ -2724,7 +2707,7 @@ public void geolocationPositionError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void gestureEvent() throws Exception { test("GestureEvent"); } @@ -2733,7 +2716,7 @@ public void gestureEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void globalEventHandlers() throws Exception { test("GlobalEventHandlers"); } @@ -2742,7 +2725,7 @@ public void globalEventHandlers() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void globalFetch() throws Exception { test("GlobalFetch"); } @@ -2782,7 +2765,7 @@ public void history() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void hMDVRDevice() throws Exception { test("HMDVRDevice"); } @@ -2815,7 +2798,7 @@ public void htmlAnchorElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlAppletElement() throws Exception { test("HTMLAppletElement"); } @@ -2859,7 +2842,7 @@ public void htmlBaseElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlBaseFontElement() throws Exception { test("HTMLBaseFontElement"); } @@ -2870,7 +2853,7 @@ public void htmlBaseFontElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlBGSoundElement() throws Exception { test("HTMLBGSoundElement"); } @@ -2881,7 +2864,7 @@ public void htmlBGSoundElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlBlockElement() throws Exception { test("HTMLBlockElement"); } @@ -2892,7 +2875,7 @@ public void htmlBlockElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlBlockQuoteElement() throws Exception { test("HTMLBlockQuoteElement"); } @@ -2958,7 +2941,7 @@ public void htmlCollection() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlCommentElement() throws Exception { test("HTMLCommentElement"); } @@ -2967,7 +2950,7 @@ public void htmlCommentElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlContentElement() throws Exception { test("HTMLContentElement"); } @@ -2998,7 +2981,7 @@ public void htmlDataListElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDDElement() throws Exception { test("HTMLDDElement"); } @@ -3009,7 +2992,7 @@ public void htmlDDElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDefinitionDescriptionElement() throws Exception { test("HTMLDefinitionDescriptionElement"); } @@ -3020,7 +3003,7 @@ public void htmlDefinitionDescriptionElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDefinitionTermElement() throws Exception { test("HTMLDefinitionTermElement"); } @@ -3097,7 +3080,7 @@ public void htmlDocument() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlDTElement() throws Exception { test("HTMLDTElement"); } @@ -3194,7 +3177,7 @@ public void htmlFrameSetElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlGenericElement() throws Exception { test("HTMLGenericElement"); } @@ -3247,7 +3230,7 @@ public void htmlHtmlElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlHyperlinkElementUtils() throws Exception { test("HTMLHyperlinkElementUtils"); } @@ -3280,7 +3263,7 @@ public void htmlImageElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlInlineQuotationElement() throws Exception { test("HTMLInlineQuotationElement"); } @@ -3302,7 +3285,7 @@ public void htmlInputElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlIsIndexElement() throws Exception { test("HTMLIsIndexElement"); } @@ -3311,7 +3294,7 @@ public void htmlIsIndexElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlKeygenElement() throws Exception { test("HTMLKeygenElement"); } @@ -3366,7 +3349,7 @@ public void htmlLinkElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlListElement() throws Exception { test("HTMLListElement"); } @@ -3419,7 +3402,7 @@ public void htmlMenuElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlMenuItemElement() throws Exception { test("HTMLMenuItemElement"); } @@ -3463,7 +3446,7 @@ public void htmlModElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlNextIdElement() throws Exception { test("HTMLNextIdElement"); } @@ -3472,7 +3455,7 @@ public void htmlNextIdElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlNoShowElement() throws Exception { test("HTMLNoShowElement"); } @@ -3571,7 +3554,7 @@ public void htmlParamElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlPhraseElement() throws Exception { test("HTMLPhraseElement"); } @@ -3646,7 +3629,7 @@ public void htmlSelectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlShadowElement() throws Exception { test("HTMLShadowElement"); } @@ -3732,7 +3715,7 @@ public void htmlTableColElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableComponent() throws Exception { test("HTMLTableComponent"); } @@ -3743,7 +3726,7 @@ public void htmlTableComponent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableDataCellElement() throws Exception { test("HTMLTableDataCellElement"); } @@ -3765,7 +3748,7 @@ public void htmlTableElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTableHeaderCellElement() throws Exception { test("HTMLTableHeaderCellElement"); } @@ -3816,7 +3799,7 @@ public void htmlTextAreaElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlTextElement() throws Exception { test("HTMLTextElement"); } @@ -3891,7 +3874,7 @@ public void htmlVideoElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void htmlWBRElement() throws Exception { test("HTMLWBRElement"); } @@ -3909,7 +3892,7 @@ public void idbCursor() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbCursorSync() throws Exception { test("IDBCursorSync"); } @@ -3936,7 +3919,7 @@ public void idbDatabase() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbDatabaseException() throws Exception { test("IDBDatabaseException"); } @@ -3945,7 +3928,7 @@ public void idbDatabaseException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbDatabaseSync() throws Exception { test("IDBDatabaseSync"); } @@ -3954,7 +3937,7 @@ public void idbDatabaseSync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbEnvironment() throws Exception { test("IDBEnvironment"); } @@ -3963,7 +3946,7 @@ public void idbEnvironment() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbEnvironmentSync() throws Exception { test("IDBEnvironmentSync"); } @@ -3983,7 +3966,7 @@ public void idbFactory() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbFactorySync() throws Exception { test("IDBFactorySync"); } @@ -4001,7 +3984,7 @@ public void idbIndex() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbIndexSync() throws Exception { test("IDBIndexSync"); } @@ -4019,7 +4002,7 @@ public void idbKeyRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbLocaleAwareKeyRange() throws Exception { test("IDBLocaleAwareKeyRange"); } @@ -4028,7 +4011,7 @@ public void idbLocaleAwareKeyRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbMutableFile() throws Exception { test("IDBMutableFile"); } @@ -4046,7 +4029,7 @@ public void idbObjectStore() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbObjectStoreSync() throws Exception { test("IDBObjectStoreSync"); } @@ -4082,7 +4065,7 @@ public void idbTransaction() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbTransactionSync() throws Exception { test("IDBTransactionSync"); } @@ -4100,7 +4083,7 @@ public void idbVersionChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void idbVersionChangeRequest() throws Exception { test("IDBVersionChangeRequest"); } @@ -4109,7 +4092,7 @@ public void idbVersionChangeRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void identityManager() throws Exception { test("IdentityManager"); } @@ -4156,7 +4139,7 @@ public void imageBitmap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void imageBitmapFactories() throws Exception { test("ImageBitmapFactories"); } @@ -4183,7 +4166,7 @@ public void imageData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void index() throws Exception { test("Index"); } @@ -4192,7 +4175,7 @@ public void index() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void indexedDB() throws Exception { test("IndexedDB"); } @@ -4210,7 +4193,7 @@ public void infinity() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function InputDeviceCapabilities() { [native code] }", EDGE = "function InputDeviceCapabilities() { [native code] }") public void inputDeviceCapabilities() throws Exception { @@ -4230,7 +4213,7 @@ public void inputEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void inputMethodContext() throws Exception { test("InputMethodContext"); } @@ -4239,7 +4222,7 @@ public void inputMethodContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void installEvent() throws Exception { test("InstallEvent"); } @@ -4248,7 +4231,7 @@ public void installEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "null", FF_ESR = "null") public void installTrigger() throws Exception { @@ -4259,7 +4242,7 @@ public void installTrigger() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void installTriggerImpl() throws Exception { test("InstallTriggerImpl"); } @@ -4301,7 +4284,7 @@ public void int8Array() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function InternalError() { [native code] }", FF_ESR = "function InternalError() { [native code] }") @HtmlUnitNYI(CHROME = "function InternalError() { [native code] }", @@ -4389,7 +4372,7 @@ public void isNaN() throws Exception { */ @Test @Alerts(DEFAULT = "function Iterator() { [native code] }", - FF_ESR = "exception") + FF_ESR = "ReferenceError") public void iterator() throws Exception { test("Iterator"); } @@ -4427,7 +4410,7 @@ public void keyframeEffect() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void keyframeEffectReadOnly() throws Exception { test("KeyframeEffectReadOnly"); } @@ -4436,7 +4419,7 @@ public void keyframeEffectReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n() throws Exception { test("L10n"); } @@ -4445,7 +4428,7 @@ public void l10n() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_formatValue() throws Exception { test("L10n.formatValue"); } @@ -4454,7 +4437,7 @@ public void l10n_formatValue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_get() throws Exception { test("L10n.get"); } @@ -4463,7 +4446,7 @@ public void l10n_get() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_language_code() throws Exception { test("L10n.language.code"); } @@ -4472,7 +4455,7 @@ public void l10n_language_code() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_language_direction() throws Exception { test("L10n.language.direction"); } @@ -4481,7 +4464,7 @@ public void l10n_language_direction() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_once() throws Exception { test("L10n.once"); } @@ -4490,7 +4473,7 @@ public void l10n_once() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_ready() throws Exception { test("L10n.ready"); } @@ -4499,7 +4482,7 @@ public void l10n_ready() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_readyState() throws Exception { test("L10n.readyState"); } @@ -4508,7 +4491,7 @@ public void l10n_readyState() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_setAttributes() throws Exception { test("L10n.setAttributes"); } @@ -4517,7 +4500,7 @@ public void l10n_setAttributes() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void linkStyle() throws Exception { test("LinkStyle"); } @@ -4526,7 +4509,7 @@ public void linkStyle() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void localFileSystem() throws Exception { test("LocalFileSystem"); } @@ -4535,7 +4518,7 @@ public void localFileSystem() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void localFileSystemSync() throws Exception { test("LocalFileSystemSync"); } @@ -4546,7 +4529,7 @@ public void localFileSystemSync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void localMediaStream() throws Exception { test("LocalMediaStream"); } @@ -4558,7 +4541,6 @@ public void localMediaStream() throws Exception { */ @Test @Alerts("function Location() { [native code] }") - @AlertsStandards("function Location() { [native code] }") public void location() throws Exception { test("Location"); } @@ -4567,7 +4549,7 @@ public void location() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void lockedFile() throws Exception { test("LockedFile"); } @@ -4576,7 +4558,7 @@ public void lockedFile() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void longRange() throws Exception { test("LongRange"); } @@ -4648,7 +4630,7 @@ public void mediaError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function MediaKeyError() { [native code] }", FF_ESR = "function MediaKeyError() { [native code] }") public void mediaKeyError() throws Exception { @@ -4659,7 +4641,7 @@ public void mediaKeyError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaKeyEvent() throws Exception { test("MediaKeyEvent"); } @@ -4713,7 +4695,7 @@ public void mediaKeySystemAccess() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaKeySystemConfiguration() throws Exception { test("MediaKeySystemConfiguration"); } @@ -4751,7 +4733,7 @@ public void mediaQueryListEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaQueryListListener() throws Exception { test("MediaQueryListListener"); } @@ -4805,7 +4787,7 @@ public void mediaStreamAudioSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaStreamConstraints() throws Exception { test("MediaStreamConstraints"); } @@ -4841,7 +4823,7 @@ public void mediaStreamTrackEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaTrackConstraints() throws Exception { test("MediaTrackConstraints"); } @@ -4850,7 +4832,7 @@ public void mediaTrackConstraints() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaTrackSettings() throws Exception { test("MediaTrackSettings"); } @@ -4859,7 +4841,7 @@ public void mediaTrackSettings() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mediaTrackSupportedConstraints() throws Exception { test("MediaTrackSupportedConstraints"); } @@ -4901,7 +4883,7 @@ public void messagePort() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void metadata() throws Exception { test("Metadata"); } @@ -5015,7 +4997,7 @@ public void mouseEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function MouseScrollEvent() { [native code] }", FF_ESR = "function MouseScrollEvent() { [native code] }") public void mouseScrollEvent() throws Exception { @@ -5026,7 +5008,7 @@ public void mouseScrollEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mouseWheelEvent() throws Exception { test("MouseWheelEvent"); } @@ -5035,7 +5017,7 @@ public void mouseWheelEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozActivity() throws Exception { test("MozActivity"); } @@ -5044,7 +5026,7 @@ public void mozActivity() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozActivityOptions() throws Exception { test("MozActivityOptions"); } @@ -5053,7 +5035,7 @@ public void mozActivityOptions() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozActivityRequestHandler() throws Exception { test("MozActivityRequestHandler"); } @@ -5062,7 +5044,7 @@ public void mozActivityRequestHandler() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozAlarmsManager() throws Exception { test("MozAlarmsManager"); } @@ -5071,7 +5053,7 @@ public void mozAlarmsManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozContact() throws Exception { test("MozContact"); } @@ -5080,7 +5062,7 @@ public void mozContact() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozContactChangeEvent() throws Exception { test("MozContactChangeEvent"); } @@ -5089,7 +5071,7 @@ public void mozContactChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozCSSKeyframesRule() throws Exception { test("MozCSSKeyframesRule"); } @@ -5098,7 +5080,7 @@ public void mozCSSKeyframesRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozIccManager() throws Exception { test("MozIccManager"); } @@ -5107,7 +5089,7 @@ public void mozIccManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMmsEvent() throws Exception { test("MozMmsEvent"); } @@ -5116,7 +5098,7 @@ public void mozMmsEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMmsMessage() throws Exception { test("MozMmsMessage"); } @@ -5125,7 +5107,7 @@ public void mozMmsMessage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileCellInfo() throws Exception { test("MozMobileCellInfo"); } @@ -5134,7 +5116,7 @@ public void mozMobileCellInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileCFInfo() throws Exception { test("MozMobileCFInfo"); } @@ -5143,7 +5125,7 @@ public void mozMobileCFInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileConnection() throws Exception { test("MozMobileConnection"); } @@ -5152,7 +5134,7 @@ public void mozMobileConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileConnectionInfo() throws Exception { test("MozMobileConnectionInfo"); } @@ -5161,7 +5143,7 @@ public void mozMobileConnectionInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileICCInfo() throws Exception { test("MozMobileICCInfo"); } @@ -5170,7 +5152,7 @@ public void mozMobileICCInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileMessageManager() throws Exception { test("MozMobileMessageManager"); } @@ -5179,7 +5161,7 @@ public void mozMobileMessageManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileMessageThread() throws Exception { test("MozMobileMessageThread"); } @@ -5188,7 +5170,7 @@ public void mozMobileMessageThread() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozMobileNetworkInfo() throws Exception { test("MozMobileNetworkInfo"); } @@ -5197,7 +5179,7 @@ public void mozMobileNetworkInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNDEFRecord() throws Exception { test("MozNDEFRecord"); } @@ -5206,7 +5188,7 @@ public void mozNDEFRecord() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNetworkStats() throws Exception { test("MozNetworkStats"); } @@ -5215,7 +5197,7 @@ public void mozNetworkStats() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNetworkStatsData() throws Exception { test("MozNetworkStatsData"); } @@ -5224,7 +5206,7 @@ public void mozNetworkStatsData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNetworkStatsManager() throws Exception { test("MozNetworkStatsManager"); } @@ -5233,7 +5215,7 @@ public void mozNetworkStatsManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNFC() throws Exception { test("MozNFC"); } @@ -5242,7 +5224,7 @@ public void mozNFC() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNFCPeer() throws Exception { test("MozNFCPeer"); } @@ -5251,7 +5233,7 @@ public void mozNFCPeer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozNFCTag() throws Exception { test("MozNFCTag"); } @@ -5260,7 +5242,7 @@ public void mozNFCTag() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozPowerManager() throws Exception { test("MozPowerManager"); } @@ -5269,7 +5251,7 @@ public void mozPowerManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozRTCIceCandidate() throws Exception { test("mozRTCIceCandidate"); } @@ -5278,7 +5260,7 @@ public void mozRTCIceCandidate() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozRTCPeerConnection() throws Exception { test("mozRTCPeerConnection"); } @@ -5287,7 +5269,7 @@ public void mozRTCPeerConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozRTCSessionDescription() throws Exception { test("mozRTCSessionDescription"); } @@ -5296,7 +5278,7 @@ public void mozRTCSessionDescription() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSettingsEvent() throws Exception { test("MozSettingsEvent"); } @@ -5305,7 +5287,7 @@ public void mozSettingsEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSmsEvent() throws Exception { test("MozSmsEvent"); } @@ -5314,7 +5296,7 @@ public void mozSmsEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSmsFilter() throws Exception { test("MozSmsFilter"); } @@ -5323,7 +5305,7 @@ public void mozSmsFilter() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSmsManager() throws Exception { test("MozSmsManager"); } @@ -5332,7 +5314,7 @@ public void mozSmsManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSmsMessage() throws Exception { test("MozSmsMessage"); } @@ -5341,7 +5323,7 @@ public void mozSmsMessage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSmsSegmentInfo() throws Exception { test("MozSmsSegmentInfo"); } @@ -5350,7 +5332,7 @@ public void mozSmsSegmentInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozSocial() throws Exception { test("MozSocial"); } @@ -5359,7 +5341,7 @@ public void mozSocial() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozTimeManager() throws Exception { test("MozTimeManager"); } @@ -5368,7 +5350,7 @@ public void mozTimeManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozVoicemail() throws Exception { test("MozVoicemail"); } @@ -5377,7 +5359,7 @@ public void mozVoicemail() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozVoicemailEvent() throws Exception { test("MozVoicemailEvent"); } @@ -5386,7 +5368,7 @@ public void mozVoicemailEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozVoicemailStatus() throws Exception { test("MozVoicemailStatus"); } @@ -5395,7 +5377,7 @@ public void mozVoicemailStatus() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozWifiConnectionInfoEvent() throws Exception { test("MozWifiConnectionInfoEvent"); } @@ -5404,7 +5386,7 @@ public void mozWifiConnectionInfoEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozWifiP2pGroupOwner() throws Exception { test("MozWifiP2pGroupOwner"); } @@ -5413,7 +5395,7 @@ public void mozWifiP2pGroupOwner() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozWifiP2pManager() throws Exception { test("MozWifiP2pManager"); } @@ -5422,7 +5404,7 @@ public void mozWifiP2pManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void mozWifiStatusChangeEvent() throws Exception { test("MozWifiStatusChangeEvent"); } @@ -5431,7 +5413,7 @@ public void mozWifiStatusChangeEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void msCurrentStyleCSSProperties() throws Exception { test("MSCurrentStyleCSSProperties"); } @@ -5440,7 +5422,7 @@ public void msCurrentStyleCSSProperties() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void msGestureEvent() throws Exception { test("MSGestureEvent"); } @@ -5449,7 +5431,7 @@ public void msGestureEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void msStyleCSSProperties() throws Exception { test("MSStyleCSSProperties"); } @@ -5460,7 +5442,7 @@ public void msStyleCSSProperties() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function MutationEvent() { [native code] }", FF_ESR = "function MutationEvent() { [native code] }") public void mutationEvent() throws Exception { @@ -5500,7 +5482,7 @@ public void namedNodeMap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void nameList() throws Exception { test("NameList"); } @@ -5511,7 +5493,7 @@ public void nameList() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void namespace() throws Exception { test("Namespace"); } @@ -5522,7 +5504,7 @@ public void namespace() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void namespaceCollection() throws Exception { test("NamespaceCollection"); } @@ -5542,7 +5524,7 @@ public void naN() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void nativeXPathNSResolver() throws Exception { test("NativeXPathNSResolver"); } @@ -5562,7 +5544,7 @@ public void navigator() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorConcurrentHardware() throws Exception { test("NavigatorConcurrentHardware"); } @@ -5571,7 +5553,7 @@ public void navigatorConcurrentHardware() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorGeolocation() throws Exception { test("NavigatorGeolocation"); } @@ -5580,7 +5562,7 @@ public void navigatorGeolocation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorID() throws Exception { test("NavigatorID"); } @@ -5589,7 +5571,7 @@ public void navigatorID() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorLanguage() throws Exception { test("NavigatorLanguage"); } @@ -5598,7 +5580,7 @@ public void navigatorLanguage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorOnLine() throws Exception { test("NavigatorOnLine"); } @@ -5607,7 +5589,7 @@ public void navigatorOnLine() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorPlugins() throws Exception { test("NavigatorPlugins"); } @@ -5616,7 +5598,7 @@ public void navigatorPlugins() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void navigatorStorage() throws Exception { test("NavigatorStorage"); } @@ -5625,7 +5607,7 @@ public void navigatorStorage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function NetworkInformation() { [native code] }", EDGE = "function NetworkInformation() { [native code] }") public void networkInformation() throws Exception { @@ -5678,7 +5660,7 @@ public void nodeList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void nonDocumentTypeChildNode() throws Exception { test("NonDocumentTypeChildNode"); } @@ -5687,7 +5669,7 @@ public void nonDocumentTypeChildNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void notation() throws Exception { test("Notation"); } @@ -5707,7 +5689,7 @@ public void notification() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void notificationEvent() throws Exception { test("NotificationEvent"); } @@ -5716,7 +5698,7 @@ public void notificationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void notifyAudioAvailableEvent() throws Exception { test("NotifyAudioAvailableEvent"); } @@ -5743,7 +5725,7 @@ public void object() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_element_index_uint() throws Exception { test("OES_element_index_uint"); } @@ -5752,7 +5734,7 @@ public void oes_element_index_uint() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_standard_derivatives() throws Exception { test("OES_standard_derivatives"); } @@ -5761,7 +5743,7 @@ public void oes_standard_derivatives() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_texture_float() throws Exception { test("OES_texture_float"); } @@ -5770,7 +5752,7 @@ public void oes_texture_float() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_texture_float_linear() throws Exception { test("OES_texture_float_linear"); } @@ -5779,7 +5761,7 @@ public void oes_texture_float_linear() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_texture_half_float() throws Exception { test("OES_texture_half_float"); } @@ -5788,7 +5770,7 @@ public void oes_texture_half_float() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_texture_half_float_linear() throws Exception { test("OES_texture_half_float_linear"); } @@ -5797,7 +5779,7 @@ public void oes_texture_half_float_linear() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void oes_vertex_array_object() throws Exception { test("OES_vertex_array_object"); } @@ -5824,7 +5806,7 @@ public void offlineAudioContext() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void offlineResourceList() throws Exception { test("OfflineResourceList"); } @@ -5834,10 +5816,10 @@ public void offlineResourceList() throws Exception { */ @Test @Alerts("function OffscreenCanvas() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", - EDGE = "exception", - FF = "exception", - FF_ESR = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", + EDGE = "ReferenceError", + FF = "ReferenceError", + FF_ESR = "ReferenceError") public void offscreenCanvas() throws Exception { test("OffscreenCanvas"); } @@ -5866,7 +5848,7 @@ public void oscillatorNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void overflowEvent() throws Exception { test("OverflowEvent"); } @@ -5893,7 +5875,7 @@ public void pannerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void parallelArray() throws Exception { test("ParallelArray"); } @@ -5902,7 +5884,7 @@ public void parallelArray() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void parentNode() throws Exception { test("ParentNode"); } @@ -5929,7 +5911,7 @@ public void parseInt() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PasswordCredential() { [native code] }", EDGE = "function PasswordCredential() { [native code] }") public void passwordCredential() throws Exception { @@ -5951,7 +5933,7 @@ public void path2D() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PaymentAddress() { [native code] }", EDGE = "function PaymentAddress() { [native code] }") public void paymentAddress() throws Exception { @@ -5962,7 +5944,7 @@ public void paymentAddress() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PaymentRequest() { [native code] }", EDGE = "function PaymentRequest() { [native code] }") public void paymentRequest() throws Exception { @@ -5973,7 +5955,7 @@ public void paymentRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PaymentResponse() { [native code] }", EDGE = "function PaymentResponse() { [native code] }") public void paymentResponse() throws Exception { @@ -6002,7 +5984,7 @@ public void performanceEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void performanceFrameTiming() throws Exception { test("PerformanceFrameTiming"); } @@ -6083,7 +6065,7 @@ public void performanceTiming() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void periodicSyncEvent() throws Exception { test("PeriodicSyncEvent"); } @@ -6092,7 +6074,7 @@ public void periodicSyncEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PeriodicSyncManager() { [native code] }", EDGE = "function PeriodicSyncManager() { [native code] }") public void periodicSyncManager() throws Exception { @@ -6103,7 +6085,7 @@ public void periodicSyncManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void periodicSyncRegistration() throws Exception { test("PeriodicSyncRegistration"); } @@ -6130,7 +6112,7 @@ public void permissions() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void permissionSettings() throws Exception { test("PermissionSettings"); } @@ -6170,7 +6152,7 @@ public void pluginArray() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void point() throws Exception { test("Point"); } @@ -6199,7 +6181,7 @@ public void popStateEvent() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void popup() throws Exception { test("Popup"); } @@ -6208,7 +6190,7 @@ public void popup() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void portCollection() throws Exception { test("PortCollection"); } @@ -6219,7 +6201,7 @@ public void portCollection() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void position() throws Exception { test("Position"); } @@ -6228,7 +6210,7 @@ public void position() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void positionError() throws Exception { test("PositionError"); } @@ -6237,7 +6219,7 @@ public void positionError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void positionOptions() throws Exception { test("PositionOptions"); } @@ -6246,7 +6228,7 @@ public void positionOptions() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void positionSensorVRDevice() throws Exception { test("PositionSensorVRDevice"); } @@ -6255,7 +6237,7 @@ public void positionSensorVRDevice() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void powerManager() throws Exception { test("PowerManager"); } @@ -6264,7 +6246,7 @@ public void powerManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function Presentation() { [native code] }", EDGE = "function Presentation() { [native code] }") public void presentation() throws Exception { @@ -6275,7 +6257,7 @@ public void presentation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PresentationAvailability() { [native code] }", EDGE = "function PresentationAvailability() { [native code] }") public void presentationAvailability() throws Exception { @@ -6286,7 +6268,7 @@ public void presentationAvailability() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PresentationConnection() { [native code] }", EDGE = "function PresentationConnection() { [native code] }") public void presentationConnection() throws Exception { @@ -6297,7 +6279,7 @@ public void presentationConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PresentationConnectionAvailableEvent() { [native code] }", EDGE = "function PresentationConnectionAvailableEvent() { [native code] }") public void presentationConnectionAvailableEvent() throws Exception { @@ -6308,7 +6290,7 @@ public void presentationConnectionAvailableEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void presentationConnectionClosedEvent() throws Exception { test("PresentationConnectionClosedEvent"); } @@ -6317,7 +6299,7 @@ public void presentationConnectionClosedEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PresentationConnectionCloseEvent() { [native code] }", EDGE = "function PresentationConnectionCloseEvent() { [native code] }") public void presentationConnectionCloseEvent() throws Exception { @@ -6328,11 +6310,11 @@ public void presentationConnectionCloseEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PresentationConnectionList() { [native code] }", EDGE = "function PresentationConnectionList() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", - EDGE = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", + EDGE = "ReferenceError") public void presentationConnectionList() throws Exception { test("PresentationConnectionList"); } @@ -6341,11 +6323,11 @@ public void presentationConnectionList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PresentationReceiver() { [native code] }", EDGE = "function PresentationReceiver() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", - EDGE = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", + EDGE = "ReferenceError") public void presentationReceiver() throws Exception { test("PresentationReceiver"); } @@ -6354,7 +6336,7 @@ public void presentationReceiver() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function PresentationRequest() { [native code] }", EDGE = "function PresentationRequest() { [native code] }") public void presentationRequest() throws Exception { @@ -6394,7 +6376,7 @@ public void promise() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void promiseRejection() throws Exception { test("PromiseRejection"); } @@ -6412,7 +6394,7 @@ public void promiseRejectionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void promiseResolver() throws Exception { test("PromiseResolver"); } @@ -6430,7 +6412,7 @@ public void proxy() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void pushEvent() throws Exception { test("PushEvent"); } @@ -6448,7 +6430,7 @@ public void pushManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void pushMessageData() throws Exception { test("PushMessageData"); } @@ -6457,7 +6439,7 @@ public void pushMessageData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void pushRegistrationManager() throws Exception { test("PushRegistrationManager"); } @@ -6493,7 +6475,7 @@ public void radioNodeList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void randomSource() throws Exception { test("RandomSource"); } @@ -6522,7 +6504,7 @@ public void rangeError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void readableByteStream() throws Exception { test("ReadableByteStream"); } @@ -6567,7 +6549,7 @@ public void regExp() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function RemotePlayback() { [native code] }", EDGE = "function RemotePlayback() { [native code] }") public void remotePlayback() throws Exception { @@ -6578,7 +6560,7 @@ public void remotePlayback() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void renderingContext() throws Exception { test("RenderingContext"); } @@ -6607,7 +6589,7 @@ public void response() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rowContainer() throws Exception { test("RowContainer"); } @@ -6625,7 +6607,7 @@ public void rtcCertificate() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcConfiguration() throws Exception { test("RTCConfiguration"); } @@ -6635,10 +6617,10 @@ public void rtcConfiguration() throws Exception { */ @Test @Alerts("function RTCDataChannel() { [native code] }") - @HtmlUnitNYI(CHROME = "exception", - EDGE = "exception", - FF = "exception", - FF_ESR = "exception") + @HtmlUnitNYI(CHROME = "ReferenceError", + EDGE = "ReferenceError", + FF = "ReferenceError", + FF_ESR = "ReferenceError") public void rtcDataChannel() throws Exception { test("RTCDataChannel"); } @@ -6665,7 +6647,7 @@ public void rtcIceCandidate() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcIceServer() throws Exception { test("RTCIceServer"); } @@ -6674,7 +6656,7 @@ public void rtcIceServer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcIdentityAssertion() throws Exception { test("RTCIdentityAssertion"); } @@ -6683,7 +6665,7 @@ public void rtcIdentityAssertion() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcIdentityErrorEvent() throws Exception { test("RTCIdentityErrorEvent"); } @@ -6692,7 +6674,7 @@ public void rtcIdentityErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcIdentityEvent() throws Exception { test("RTCIdentityEvent"); } @@ -6737,7 +6719,7 @@ public void rtcSessionDescription() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void rtcSessionDescriptionCallback() throws Exception { test("RTCSessionDescriptionCallback"); } @@ -6822,7 +6804,7 @@ public void serviceWorkerContainer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void serviceWorkerGlobalScope() throws Exception { test("ServiceWorkerGlobalScope"); } @@ -6831,7 +6813,7 @@ public void serviceWorkerGlobalScope() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void serviceWorkerMessageEvent() throws Exception { test("ServiceWorkerMessageEvent"); } @@ -6849,7 +6831,7 @@ public void serviceWorkerRegistration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void serviceWorkerState() throws Exception { test("ServiceWorkerState"); } @@ -6867,7 +6849,7 @@ public void set() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void settingsLock() throws Exception { test("SettingsLock"); } @@ -6876,7 +6858,7 @@ public void settingsLock() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void settingsManager() throws Exception { test("SettingsManager"); } @@ -6896,7 +6878,7 @@ public void shadowRoot() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void sharedArrayBuffer() throws Exception { test("SharedArrayBuffer"); } @@ -6905,7 +6887,7 @@ public void sharedArrayBuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void sharedKeyframeList() throws Exception { test("SharedKeyframeList"); } @@ -6925,7 +6907,7 @@ public void sharedWorker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void sharedWorkerGlobalScope() throws Exception { test("SharedWorkerGlobalScope"); } @@ -6934,7 +6916,7 @@ public void sharedWorkerGlobalScope() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd() throws Exception { test("SIMD"); } @@ -6943,7 +6925,7 @@ public void simd() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool16x8() throws Exception { test("SIMD.Bool16x8"); } @@ -6952,7 +6934,7 @@ public void simd_Bool16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool32x4() throws Exception { test("SIMD.Bool32x4"); } @@ -6961,7 +6943,7 @@ public void simd_Bool32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool64x2() throws Exception { test("SIMD.Bool64x2"); } @@ -6970,7 +6952,7 @@ public void simd_Bool64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool8x16() throws Exception { test("SIMD.Bool8x16"); } @@ -6979,7 +6961,7 @@ public void simd_Bool8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_float32x4() throws Exception { test("SIMD.float32x4"); } @@ -6988,7 +6970,7 @@ public void simd_float32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Float32x4() throws Exception { test("SIMD.Float32x4"); } @@ -6997,7 +6979,7 @@ public void simd_Float32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_float64x2() throws Exception { test("SIMD.float64x2"); } @@ -7006,7 +6988,7 @@ public void simd_float64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Float64x2() throws Exception { test("SIMD.Float64x2"); } @@ -7015,7 +6997,7 @@ public void simd_Float64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int16x8() throws Exception { test("SIMD.int16x8"); } @@ -7024,7 +7006,7 @@ public void simd_int16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int16x8() throws Exception { test("SIMD.Int16x8"); } @@ -7033,7 +7015,7 @@ public void simd_Int16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int32x4() throws Exception { test("SIMD.int32x4"); } @@ -7042,7 +7024,7 @@ public void simd_int32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int32x4() throws Exception { test("SIMD.Int32x4"); } @@ -7051,7 +7033,7 @@ public void simd_Int32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int8x16() throws Exception { test("SIMD.int8x16"); } @@ -7060,7 +7042,7 @@ public void simd_int8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int8x16() throws Exception { test("SIMD.Int8x16"); } @@ -7069,7 +7051,7 @@ public void simd_Int8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint16x8() throws Exception { test("SIMD.Uint16x8"); } @@ -7078,7 +7060,7 @@ public void simd_Uint16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint32x4() throws Exception { test("SIMD.Uint32x4"); } @@ -7087,7 +7069,7 @@ public void simd_Uint32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint8x16() throws Exception { test("SIMD.Uint8x16"); } @@ -7098,7 +7080,7 @@ public void simd_Uint8x16() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simpleArray() throws Exception { test("SimpleArray"); } @@ -7107,7 +7089,7 @@ public void simpleArray() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void siteBoundCredential() throws Exception { test("SiteBoundCredential"); } @@ -7134,7 +7116,7 @@ public void sourceBufferList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechGrammar() throws Exception { test("SpeechGrammar"); } @@ -7143,7 +7125,7 @@ public void speechGrammar() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechGrammarList() throws Exception { test("SpeechGrammarList"); } @@ -7152,7 +7134,7 @@ public void speechGrammarList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognition() throws Exception { test("SpeechRecognition"); } @@ -7161,7 +7143,7 @@ public void speechRecognition() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionAlternative() throws Exception { test("SpeechRecognitionAlternative"); } @@ -7170,7 +7152,7 @@ public void speechRecognitionAlternative() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionError() throws Exception { test("SpeechRecognitionError"); } @@ -7179,7 +7161,7 @@ public void speechRecognitionError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionErrorEvent() throws Exception { test("SpeechRecognitionErrorEvent"); } @@ -7188,7 +7170,7 @@ public void speechRecognitionErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionEvent() throws Exception { test("SpeechRecognitionEvent"); } @@ -7197,7 +7179,7 @@ public void speechRecognitionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionResult() throws Exception { test("SpeechRecognitionResult"); } @@ -7206,7 +7188,7 @@ public void speechRecognitionResult() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void speechRecognitionResultList() throws Exception { test("SpeechRecognitionResultList"); } @@ -7260,7 +7242,7 @@ public void speechSynthesisVoice() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void staticNodeList() throws Exception { test("StaticNodeList"); } @@ -7280,7 +7262,7 @@ public void stereoPannerNode() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void stopIteration() throws Exception { test("StopIteration"); } @@ -7300,7 +7282,7 @@ public void storage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void storageEstimate() throws Exception { test("StorageEstimate"); } @@ -7327,7 +7309,7 @@ public void storageManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void storageQuota() throws Exception { test("StorageQuota"); } @@ -7345,7 +7327,7 @@ public void string() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void styleMedia() throws Exception { test("StyleMedia"); } @@ -7403,7 +7385,7 @@ public void svgAElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAltGlyphElement() throws Exception { test("SVGAltGlyphElement"); } @@ -7423,7 +7405,7 @@ public void svgAngle() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimateColorElement() throws Exception { test("SVGAnimateColorElement"); } @@ -7504,7 +7486,7 @@ public void svgAnimatedNumberList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgAnimatedPoints() throws Exception { test("SVGAnimatedPoints"); } @@ -7622,7 +7604,7 @@ public void svgComponentTransferFunctionElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgCursorElement() throws Exception { test("SVGCursorElement"); } @@ -7653,7 +7635,8 @@ public void svgDescElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts(DEFAULT = "ReferenceError", + FF = "function SVGDiscardElement() { [native code] }") public void svgDiscardElement() throws Exception { test("SVGDiscardElement"); } @@ -7662,7 +7645,7 @@ public void svgDiscardElement() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgDocument() throws Exception { test("SVGDocument"); } @@ -7693,7 +7676,7 @@ public void svgEllipseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgEvent() throws Exception { test("SVGEvent"); } @@ -7986,7 +7969,7 @@ public void svgFilterElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontElement() throws Exception { test("SVGFontElement"); } @@ -7995,7 +7978,7 @@ public void svgFontElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontFaceElement() throws Exception { test("SVGFontFaceElement"); } @@ -8004,7 +7987,7 @@ public void svgFontFaceElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontFaceFormatElement() throws Exception { test("SVGFontFaceFormatElement"); } @@ -8013,7 +7996,7 @@ public void svgFontFaceFormatElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontFaceNameElement() throws Exception { test("SVGFontFaceNameElement"); } @@ -8022,7 +8005,7 @@ public void svgFontFaceNameElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontFaceSrcElement() throws Exception { test("SVGFontFaceSrcElement"); } @@ -8031,7 +8014,7 @@ public void svgFontFaceSrcElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgFontFaceUriElement() throws Exception { test("SVGFontFaceUriElement"); } @@ -8071,7 +8054,7 @@ public void svgGeometryElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgGlyphElement() throws Exception { test("SVGGlyphElement"); } @@ -8098,7 +8081,7 @@ public void svgGraphicsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgHKernElement() throws Exception { test("SVGHKernElement"); } @@ -8202,7 +8185,7 @@ public void svgMetadataElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgMissingGlyphElement() throws Exception { test("SVGMissingGlyphElement"); } @@ -8251,7 +8234,7 @@ public void svgPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSeg() throws Exception { test("SVGPathSeg"); } @@ -8260,7 +8243,7 @@ public void svgPathSeg() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegArcAbs() throws Exception { test("SVGPathSegArcAbs"); } @@ -8269,7 +8252,7 @@ public void svgPathSegArcAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegArcRel() throws Exception { test("SVGPathSegArcRel"); } @@ -8278,7 +8261,7 @@ public void svgPathSegArcRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegClosePath() throws Exception { test("SVGPathSegClosePath"); } @@ -8287,7 +8270,7 @@ public void svgPathSegClosePath() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoCubicAbs() throws Exception { test("SVGPathSegCurvetoCubicAbs"); } @@ -8296,7 +8279,7 @@ public void svgPathSegCurvetoCubicAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoCubicRel() throws Exception { test("SVGPathSegCurvetoCubicRel"); } @@ -8305,7 +8288,7 @@ public void svgPathSegCurvetoCubicRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoCubicSmoothAbs() throws Exception { test("SVGPathSegCurvetoCubicSmoothAbs"); } @@ -8314,7 +8297,7 @@ public void svgPathSegCurvetoCubicSmoothAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoCubicSmoothRel() throws Exception { test("SVGPathSegCurvetoCubicSmoothRel"); } @@ -8323,7 +8306,7 @@ public void svgPathSegCurvetoCubicSmoothRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoQuadraticAbs() throws Exception { test("SVGPathSegCurvetoQuadraticAbs"); } @@ -8332,7 +8315,7 @@ public void svgPathSegCurvetoQuadraticAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoQuadraticRel() throws Exception { test("SVGPathSegCurvetoQuadraticRel"); } @@ -8341,7 +8324,7 @@ public void svgPathSegCurvetoQuadraticRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoQuadraticSmoothAbs() throws Exception { test("SVGPathSegCurvetoQuadraticSmoothAbs"); } @@ -8350,7 +8333,7 @@ public void svgPathSegCurvetoQuadraticSmoothAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegCurvetoQuadraticSmoothRel() throws Exception { test("SVGPathSegCurvetoQuadraticSmoothRel"); } @@ -8359,7 +8342,7 @@ public void svgPathSegCurvetoQuadraticSmoothRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoAbs() throws Exception { test("SVGPathSegLinetoAbs"); } @@ -8368,7 +8351,7 @@ public void svgPathSegLinetoAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoHorizontalAbs() throws Exception { test("SVGPathSegLinetoHorizontalAbs"); } @@ -8377,7 +8360,7 @@ public void svgPathSegLinetoHorizontalAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoHorizontalRel() throws Exception { test("SVGPathSegLinetoHorizontalRel"); } @@ -8386,7 +8369,7 @@ public void svgPathSegLinetoHorizontalRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoRel() throws Exception { test("SVGPathSegLinetoRel"); } @@ -8395,7 +8378,7 @@ public void svgPathSegLinetoRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoVerticalAbs() throws Exception { test("SVGPathSegLinetoVerticalAbs"); } @@ -8404,7 +8387,7 @@ public void svgPathSegLinetoVerticalAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegLinetoVerticalRel() throws Exception { test("SVGPathSegLinetoVerticalRel"); } @@ -8413,7 +8396,7 @@ public void svgPathSegLinetoVerticalRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegList() throws Exception { test("SVGPathSegList"); } @@ -8422,7 +8405,7 @@ public void svgPathSegList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegMovetoAbs() throws Exception { test("SVGPathSegMovetoAbs"); } @@ -8431,7 +8414,7 @@ public void svgPathSegMovetoAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgPathSegMovetoRel() throws Exception { test("SVGPathSegMovetoRel"); } @@ -8533,7 +8516,7 @@ public void svgRectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgRenderingIntent() throws Exception { test("SVGRenderingIntent"); } @@ -8584,7 +8567,7 @@ public void svgStringList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgStylable() throws Exception { test("SVGStylable"); } @@ -8637,7 +8620,7 @@ public void svgSymbolElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTests() throws Exception { test("SVGTests"); } @@ -8706,7 +8689,7 @@ public void svgTransform() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTransformable() throws Exception { test("SVGTransformable"); } @@ -8724,7 +8707,7 @@ public void svgTransformList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgTRefElement() throws Exception { test("SVGTRefElement"); } @@ -8775,7 +8758,7 @@ public void svgViewElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgViewSpec() throws Exception { test("SVGViewSpec"); } @@ -8784,7 +8767,7 @@ public void svgViewSpec() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgVKernElement() throws Exception { test("SVGVKernElement"); } @@ -8793,7 +8776,7 @@ public void svgVKernElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void svgZoomEvent() throws Exception { test("SVGZoomEvent"); } @@ -8811,7 +8794,7 @@ public void symbol() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void syncEvent() throws Exception { test("SyncEvent"); } @@ -8820,7 +8803,7 @@ public void syncEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function SyncManager() { [native code] }", EDGE = "function SyncManager() { [native code] }") public void syncManager() throws Exception { @@ -8831,7 +8814,7 @@ public void syncManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void syncRegistration() throws Exception { test("SyncRegistration"); } @@ -8849,7 +8832,7 @@ public void syntaxError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void tcpServerSocket() throws Exception { test("TCPServerSocket"); } @@ -8858,7 +8841,7 @@ public void tcpServerSocket() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void tcpSocket() throws Exception { test("TCPSocket"); } @@ -8867,7 +8850,7 @@ public void tcpSocket() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void telephony() throws Exception { test("Telephony"); } @@ -8876,7 +8859,7 @@ public void telephony() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void telephonyCall() throws Exception { test("TelephonyCall"); } @@ -8885,7 +8868,7 @@ public void telephonyCall() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void telephonyCallGroup() throws Exception { test("TelephonyCallGroup"); } @@ -8924,7 +8907,7 @@ public void textEncoder() throws Exception { */ @Test @Alerts(DEFAULT = "function TextEvent() { [native code] }", - FF_ESR = "exception") + FF_ESR = "ReferenceError") public void textEvent() throws Exception { test("TextEvent"); } @@ -8944,7 +8927,7 @@ public void textMetrics() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void textRange() throws Exception { test("TextRange"); } @@ -8989,7 +8972,7 @@ public void textTrackList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", FF = "function TimeEvent() { [native code] }", FF_ESR = "function TimeEvent() { [native code] }") public void timeEvent() throws Exception { @@ -9009,7 +8992,7 @@ public void timeRanges() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function Touch() { [native code] }", EDGE = "function Touch() { [native code] }") public void touch() throws Exception { @@ -9020,7 +9003,7 @@ public void touch() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function TouchEvent() { [native code] }", EDGE = "function TouchEvent() { [native code] }") public void touchEvent() throws Exception { @@ -9031,7 +9014,7 @@ public void touchEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function TouchList() { [native code] }", EDGE = "function TouchList() { [native code] }") public void touchList() throws Exception { @@ -9042,7 +9025,7 @@ public void touchList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void trackDefault() throws Exception { test("TrackDefault"); } @@ -9051,7 +9034,7 @@ public void trackDefault() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void trackDefaultList() throws Exception { test("TrackDefaultList"); } @@ -9069,7 +9052,7 @@ public void trackEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void transferable() throws Exception { test("Transferable"); } @@ -9098,7 +9081,7 @@ public void treeWalker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void typedArray() throws Exception { test("TypedArray"); } @@ -9116,7 +9099,7 @@ public void typeError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void typeInfo() throws Exception { test("TypeInfo"); } @@ -9125,7 +9108,7 @@ public void typeInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void uDPSocket() throws Exception { test("UDPSocket"); } @@ -9207,7 +9190,7 @@ public void unescape() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void uneval() throws Exception { test("uneval"); } @@ -9245,7 +9228,7 @@ public void urlSearchParams() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void urlUtils() throws Exception { test("URLUtils"); } @@ -9254,7 +9237,7 @@ public void urlUtils() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void urlUtilsReadOnly() throws Exception { test("URLUtilsReadOnly"); } @@ -9263,7 +9246,7 @@ public void urlUtilsReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void userDataHandler() throws Exception { test("UserDataHandler"); } @@ -9272,7 +9255,7 @@ public void userDataHandler() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void userProximityEvent() throws Exception { test("UserProximityEvent"); } @@ -9281,7 +9264,7 @@ public void userProximityEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void uSVString() throws Exception { test("USVString"); } @@ -9308,7 +9291,7 @@ public void videoPlaybackQuality() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrDevice() throws Exception { test("VRDevice"); } @@ -9317,7 +9300,7 @@ public void vrDevice() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrDisplay() throws Exception { test("VRDisplay"); } @@ -9326,7 +9309,7 @@ public void vrDisplay() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrDisplayCapabilities() throws Exception { test("VRDisplayCapabilities"); } @@ -9335,7 +9318,7 @@ public void vrDisplayCapabilities() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrEyeParameters() throws Exception { test("VREyeParameters"); } @@ -9344,7 +9327,7 @@ public void vrEyeParameters() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrFieldOfView() throws Exception { test("VRFieldOfView"); } @@ -9353,7 +9336,7 @@ public void vrFieldOfView() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrFieldOfViewReadOnly() throws Exception { test("VRFieldOfViewReadOnly"); } @@ -9362,7 +9345,7 @@ public void vrFieldOfViewReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrLayer() throws Exception { test("VRLayer"); } @@ -9371,7 +9354,7 @@ public void vrLayer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrPose() throws Exception { test("VRPose"); } @@ -9380,7 +9363,7 @@ public void vrPose() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrPositionState() throws Exception { test("VRPositionState"); } @@ -9389,7 +9372,7 @@ public void vrPositionState() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void vrStageParameters() throws Exception { test("VRStageParameters"); } @@ -9434,7 +9417,7 @@ public void weakSet() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL() throws Exception { test("WebGL"); } @@ -9443,7 +9426,7 @@ public void webGL() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_color_buffer_float() throws Exception { test("WEBGL_color_buffer_float"); } @@ -9452,7 +9435,7 @@ public void webGL_color_buffer_float() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_compressed_texture_atc() throws Exception { test("WEBGL_compressed_texture_atc"); } @@ -9461,7 +9444,7 @@ public void webGL_compressed_texture_atc() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_compressed_texture_es3() throws Exception { test("WEBGL_compressed_texture_es3"); } @@ -9470,7 +9453,7 @@ public void webGL_compressed_texture_es3() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void wEBGL_compressed_texture_etc() throws Exception { test("WEBGL_compressed_texture_etc"); } @@ -9479,7 +9462,7 @@ public void wEBGL_compressed_texture_etc() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_compressed_texture_etc1() throws Exception { test("WEBGL_compressed_texture_etc1"); } @@ -9488,7 +9471,7 @@ public void webGL_compressed_texture_etc1() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_compressed_texture_pvrtc() throws Exception { test("WEBGL_compressed_texture_pvrtc"); } @@ -9497,7 +9480,7 @@ public void webGL_compressed_texture_pvrtc() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_compressed_texture_s3tc() throws Exception { test("WEBGL_compressed_texture_s3tc"); } @@ -9506,7 +9489,7 @@ public void webGL_compressed_texture_s3tc() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_debug_renderer_info() throws Exception { test("WEBGL_debug_renderer_info"); } @@ -9515,7 +9498,7 @@ public void webGL_debug_renderer_info() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_debug_shaders() throws Exception { test("WEBGL_debug_shaders"); } @@ -9524,7 +9507,7 @@ public void webGL_debug_shaders() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_depth_texture() throws Exception { test("WEBGL_depth_texture"); } @@ -9533,7 +9516,7 @@ public void webGL_depth_texture() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_draw_buffers() throws Exception { test("WEBGL_draw_buffers"); } @@ -9542,7 +9525,7 @@ public void webGL_draw_buffers() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGL_lose_context() throws Exception { test("WEBGL_lose_context"); } @@ -9679,7 +9662,7 @@ public void webGLTexture() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGLTimerQueryEXT() throws Exception { test("WebGLTimerQueryEXT"); } @@ -9715,7 +9698,7 @@ public void webGLVertexArrayObject() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webGLVertexArrayObjectOES() throws Exception { test("WebGLVertexArrayObjectOES"); } @@ -9724,7 +9707,7 @@ public void webGLVertexArrayObjectOES() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webKitAnimationEvent() throws Exception { test("WebKitAnimationEvent"); } @@ -9733,7 +9716,7 @@ public void webKitAnimationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitAudioContext() throws Exception { test("webkitAudioContext"); } @@ -9751,7 +9734,7 @@ public void webKitCSSMatrix() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBCursor() throws Exception { test("webkitIDBCursor"); } @@ -9760,7 +9743,7 @@ public void webkitIDBCursor() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBDatabase() throws Exception { test("webkitIDBDatabase"); } @@ -9769,7 +9752,7 @@ public void webkitIDBDatabase() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBFactory() throws Exception { test("webkitIDBFactory"); } @@ -9778,7 +9761,7 @@ public void webkitIDBFactory() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBIndex() throws Exception { test("webkitIDBIndex"); } @@ -9787,7 +9770,7 @@ public void webkitIDBIndex() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBKeyRange() throws Exception { test("webkitIDBKeyRange"); } @@ -9796,7 +9779,7 @@ public void webkitIDBKeyRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBObjectStore() throws Exception { test("webkitIDBObjectStore"); } @@ -9805,7 +9788,7 @@ public void webkitIDBObjectStore() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBRequest() throws Exception { test("webkitIDBRequest"); } @@ -9814,7 +9797,7 @@ public void webkitIDBRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitIDBTransaction() throws Exception { test("webkitIDBTransaction"); } @@ -9823,7 +9806,7 @@ public void webkitIDBTransaction() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function MediaStream() { [native code] }", EDGE = "function MediaStream() { [native code] }") public void webkitMediaStream() throws Exception { @@ -9834,7 +9817,7 @@ public void webkitMediaStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function MutationObserver() { [native code] }", EDGE = "function MutationObserver() { [native code] }") public void webKitMutationObserver() throws Exception { @@ -9845,7 +9828,7 @@ public void webKitMutationObserver() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitOfflineAudioContext() throws Exception { test("webkitOfflineAudioContext"); } @@ -9854,7 +9837,7 @@ public void webkitOfflineAudioContext() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function RTCPeerConnection() { [native code] }", EDGE = "function RTCPeerConnection() { [native code] }") public void webkitRTCPeerConnection() throws Exception { @@ -9865,7 +9848,7 @@ public void webkitRTCPeerConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webkitRTCSessionDescription() throws Exception { test("webkitRTCSessionDescription"); } @@ -9874,7 +9857,7 @@ public void webkitRTCSessionDescription() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function SpeechGrammar() { [native code] }", EDGE = "function SpeechGrammar() { [native code] }") public void webkitSpeechGrammar() throws Exception { @@ -9885,7 +9868,7 @@ public void webkitSpeechGrammar() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function SpeechGrammarList() { [native code] }", EDGE = "function SpeechGrammarList() { [native code] }") public void webkitSpeechGrammarList() throws Exception { @@ -9896,7 +9879,7 @@ public void webkitSpeechGrammarList() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function SpeechRecognition() { [native code] }", EDGE = "function SpeechRecognition() { [native code] }") public void webkitSpeechRecognition() throws Exception { @@ -9907,7 +9890,7 @@ public void webkitSpeechRecognition() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function SpeechRecognitionErrorEvent() { [native code] }", EDGE = "function SpeechRecognitionErrorEvent() { [native code] }") public void webkitSpeechRecognitionError() throws Exception { @@ -9918,7 +9901,7 @@ public void webkitSpeechRecognitionError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "ReferenceError", CHROME = "function SpeechRecognitionEvent() { [native code] }", EDGE = "function SpeechRecognitionEvent() { [native code] }") public void webkitSpeechRecognitionEvent() throws Exception { @@ -9929,7 +9912,7 @@ public void webkitSpeechRecognitionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webKitTransitionEvent() throws Exception { test("WebKitTransitionEvent"); } @@ -9947,7 +9930,7 @@ public void webkitURL() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webSMS() throws Exception { test("WebSMS"); } @@ -9967,7 +9950,7 @@ public void webSocket() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webSockets() throws Exception { test("WebSockets"); } @@ -9976,7 +9959,7 @@ public void webSockets() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void webVTT() throws Exception { test("WebVTT"); } @@ -9994,7 +9977,7 @@ public void wheelEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void wifiManager() throws Exception { test("WifiManager"); } @@ -10014,7 +9997,7 @@ public void window() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowBase64() throws Exception { test("WindowBase64"); } @@ -10023,7 +10006,7 @@ public void windowBase64() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowClient() throws Exception { test("WindowClient"); } @@ -10032,7 +10015,7 @@ public void windowClient() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowEventHandlers() throws Exception { test("WindowEventHandlers"); } @@ -10041,7 +10024,7 @@ public void windowEventHandlers() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowEventHandlers_onbeforeprint() throws Exception { test("WindowEventHandlers.onbeforeprint"); } @@ -10050,7 +10033,7 @@ public void windowEventHandlers_onbeforeprint() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowOrWorkerGlobalScope() throws Exception { test("WindowOrWorkerGlobalScope"); } @@ -10059,7 +10042,7 @@ public void windowOrWorkerGlobalScope() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowProperties() throws Exception { test("WindowProperties"); } @@ -10068,7 +10051,7 @@ public void windowProperties() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowTimers() throws Exception { test("WindowTimers"); } @@ -10088,7 +10071,7 @@ public void worker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void workerGlobalScope() throws Exception { test("WorkerGlobalScope"); } @@ -10097,7 +10080,7 @@ public void workerGlobalScope() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void workerLocation() throws Exception { test("WorkerLocation"); } @@ -10106,7 +10089,7 @@ public void workerLocation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void workerNavigator() throws Exception { test("WorkerNavigator"); } @@ -10115,7 +10098,7 @@ public void workerNavigator() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xDomainRequest() throws Exception { test("XDomainRequest"); } @@ -10155,7 +10138,7 @@ public void xmlHttpRequestEventTarget() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xmlHttpRequestProgressEvent() throws Exception { test("XMLHttpRequestProgressEvent"); } @@ -10206,7 +10189,7 @@ public void xPathExpression() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xPathNSResolver() throws Exception { test("XPathNSResolver"); } @@ -10226,7 +10209,7 @@ public void xPathResult() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void xsltemplate() throws Exception { test("XSLTemplate"); } diff --git a/src/test/java/org/htmlunit/general/HostConstantsTest.java b/src/test/java/org/htmlunit/general/HostConstantsTest.java index 4de7c7d729f..472c8ba3e0f 100644 --- a/src/test/java/org/htmlunit/general/HostConstantsTest.java +++ b/src/test/java/org/htmlunit/general/HostConstantsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Comparator; +import java.util.HashMap; import java.util.List; import java.util.Set; @@ -76,7 +77,8 @@ public static Collection data() throws Exception { public void test() throws Exception { setExpectedAlerts(getExpectedString()); - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -123,8 +125,13 @@ private String[] getExpectedString() throws Exception { } final JavaScriptConfiguration javaScriptConfig = JavaScriptConfiguration.getInstance(getBrowserVersion()); + final HashMap classConfigurationIndex = new HashMap<>(); + for (final ClassConfiguration config : javaScriptConfig.getAll()) { + classConfigurationIndex.put(config.getClassName(), config); + } + final List constants = new ArrayList<>(); - ClassConfiguration classConfig = javaScriptConfig.getClassConfiguration(host_); + ClassConfiguration classConfig = classConfigurationIndex.get(host_); boolean first = true; while (classConfig != null) { @@ -139,7 +146,7 @@ private String[] getExpectedString() throws Exception { } } } - classConfig = javaScriptConfig.getClassConfiguration(classConfig.getExtendedClassName()); + classConfig = classConfigurationIndex.get(classConfig.getExtendedClassName()); first = false; } diff --git a/src/test/java/org/htmlunit/general/HostConstructorTest.java b/src/test/java/org/htmlunit/general/HostConstructorTest.java index 5236915c625..49eb81ba6e9 100644 --- a/src/test/java/org/htmlunit/general/HostConstructorTest.java +++ b/src/test/java/org/htmlunit/general/HostConstructorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserParameterizedRunner; import org.htmlunit.junit.BrowserParameterizedRunner.Default; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -87,14 +87,15 @@ public void test() throws Exception { } private void test(final String className) throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "" + "\n" + ""; @@ -106,7 +107,7 @@ private String getExpectedString(final String className) throws Exception { return "[object " + className_ + "]"; } - return "exception"; + return "ReferenceError"; } /** diff --git a/src/test/java/org/htmlunit/general/HostExtractor.java b/src/test/java/org/htmlunit/general/HostExtractor.java index f70969795bf..00402ffb5b8 100644 --- a/src/test/java/org/htmlunit/general/HostExtractor.java +++ b/src/test/java/org/htmlunit/general/HostExtractor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/general/HostTestsTest.java b/src/test/java/org/htmlunit/general/HostTestsTest.java index 05db3bc63fb..adecdadc7fb 100644 --- a/src/test/java/org/htmlunit/general/HostTestsTest.java +++ b/src/test/java/org/htmlunit/general/HostTestsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/general/HostTypeOfTest.java b/src/test/java/org/htmlunit/general/HostTypeOfTest.java index 6a810bc4ddd..65532aa8140 100644 --- a/src/test/java/org/htmlunit/general/HostTypeOfTest.java +++ b/src/test/java/org/htmlunit/general/HostTypeOfTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ import org.htmlunit.javascript.host.css.CSSStyleRule; import org.htmlunit.javascript.host.css.CSSStyleSheet; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; @@ -35,13 +35,13 @@ public class HostTypeOfTest extends WebDriverTestCase { private void test(final String className) throws Exception { - final String html = - "\n" + ""; @@ -241,7 +241,7 @@ public void applicationCacheErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void apps_mgmt() throws Exception { test("Apps.mgmt"); } @@ -498,6 +498,15 @@ public void beforeUnloadEvent() throws Exception { test("BeforeUnloadEvent"); } + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("function") + public void bigInt() throws Exception { + test("BigInt"); + } + /** * @throws Exception if the test fails */ @@ -924,26 +933,6 @@ public void client() throws Exception { test("Client"); } - /** - * Test {@link org.htmlunit.javascript.host.ClientRect}. - * - * @throws Exception if an error occurs - */ - @Test - @Alerts("undefined") - public void clientRect() throws Exception { - test("ClientRect"); - } - - /** - * @throws Exception if an error occurs - */ - @Test - @Alerts("undefined") - public void clientRectList() throws Exception { - test("ClientRectList"); - } - /** * @throws Exception if the test fails */ @@ -1900,7 +1889,7 @@ public void domPointReadOnly() throws Exception { } /** - * Test {@link org.htmlunit.javascript.host.ClientRect}. + * Test {@link org.htmlunit.javascript.host.DOMRect}. * * @throws Exception if an error occurs */ @@ -4413,7 +4402,7 @@ public void l10n() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_formatValue() throws Exception { test("L10n.formatValue"); } @@ -4422,7 +4411,7 @@ public void l10n_formatValue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_get() throws Exception { test("L10n.get"); } @@ -4431,7 +4420,7 @@ public void l10n_get() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_language_code() throws Exception { test("L10n.language.code"); } @@ -4440,7 +4429,7 @@ public void l10n_language_code() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_language_direction() throws Exception { test("L10n.language.direction"); } @@ -4449,7 +4438,7 @@ public void l10n_language_direction() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_once() throws Exception { test("L10n.once"); } @@ -4458,7 +4447,7 @@ public void l10n_once() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_ready() throws Exception { test("L10n.ready"); } @@ -4467,7 +4456,7 @@ public void l10n_ready() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_readyState() throws Exception { test("L10n.readyState"); } @@ -4476,7 +4465,7 @@ public void l10n_readyState() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void l10n_setAttributes() throws Exception { test("L10n.setAttributes"); } @@ -6918,7 +6907,7 @@ public void simd() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool16x8() throws Exception { test("SIMD.Bool16x8"); } @@ -6927,7 +6916,7 @@ public void simd_Bool16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool32x4() throws Exception { test("SIMD.Bool32x4"); } @@ -6936,7 +6925,7 @@ public void simd_Bool32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool64x2() throws Exception { test("SIMD.Bool64x2"); } @@ -6945,7 +6934,7 @@ public void simd_Bool64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Bool8x16() throws Exception { test("SIMD.Bool8x16"); } @@ -6954,7 +6943,7 @@ public void simd_Bool8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_float32x4() throws Exception { test("SIMD.float32x4"); } @@ -6963,7 +6952,7 @@ public void simd_float32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Float32x4() throws Exception { test("SIMD.Float32x4"); } @@ -6972,7 +6961,7 @@ public void simd_Float32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_float64x2() throws Exception { test("SIMD.float64x2"); } @@ -6981,7 +6970,7 @@ public void simd_float64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Float64x2() throws Exception { test("SIMD.Float64x2"); } @@ -6990,7 +6979,7 @@ public void simd_Float64x2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int16x8() throws Exception { test("SIMD.int16x8"); } @@ -6999,7 +6988,7 @@ public void simd_int16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int16x8() throws Exception { test("SIMD.Int16x8"); } @@ -7008,7 +6997,7 @@ public void simd_Int16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int32x4() throws Exception { test("SIMD.int32x4"); } @@ -7017,7 +7006,7 @@ public void simd_int32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int32x4() throws Exception { test("SIMD.Int32x4"); } @@ -7026,7 +7015,7 @@ public void simd_Int32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_int8x16() throws Exception { test("SIMD.int8x16"); } @@ -7035,7 +7024,7 @@ public void simd_int8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Int8x16() throws Exception { test("SIMD.Int8x16"); } @@ -7044,7 +7033,7 @@ public void simd_Int8x16() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint16x8() throws Exception { test("SIMD.Uint16x8"); } @@ -7053,7 +7042,7 @@ public void simd_Uint16x8() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint32x4() throws Exception { test("SIMD.Uint32x4"); } @@ -7062,7 +7051,7 @@ public void simd_Uint32x4() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void simd_Uint8x16() throws Exception { test("SIMD.Uint8x16"); } @@ -7628,7 +7617,8 @@ public void svgDescElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("undefined") + @Alerts(DEFAULT = "undefined", + FF = "function") public void svgDiscardElement() throws Exception { test("SVGDiscardElement"); } @@ -10014,7 +10004,7 @@ public void windowEventHandlers() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("ReferenceError") public void windowEventHandlers_onbeforeprint() throws Exception { test("WindowEventHandlers.onbeforeprint"); } diff --git a/src/test/java/org/htmlunit/general/huge/CtorPrototypeTest.java b/src/test/java/org/htmlunit/general/huge/CtorPrototypeTest.java new file mode 100644 index 00000000000..8e80792b712 --- /dev/null +++ b/src/test/java/org/htmlunit/general/huge/CtorPrototypeTest.java @@ -0,0 +1,3567 @@ +/* + * Copyright (c) 2002-2025 Gargoyle Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.htmlunit.general.huge; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Set; + +import org.htmlunit.TestCaseTest; +import org.htmlunit.WebDriverTestCase; +import org.htmlunit.junit.BrowserParameterizedRunner; +import org.htmlunit.junit.BrowserParameterizedRunner.Default; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; +import org.junit.After; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; +import org.openqa.selenium.WebDriver; + +/** + * Tests the prototype. + * + * @author Ronald Brill + */ +@RunWith(BrowserParameterizedRunner.class) +public class CtorPrototypeTest extends WebDriverTestCase { + + private static int ServerRestartCount_ = 0; + + /** + * Returns the parameterized data. + * @return the parameterized data + * @throws Exception if an error occurs + */ + @Parameters + public static Collection data() throws Exception { + final Set jsClassNames = TestCaseTest.getAllConfiguredJsConstructorNames(); + final List list = new ArrayList<>(jsClassNames.size() * jsClassNames.size() / 10); + for (final String jsClassName : jsClassNames) { + list.add(new Object[] {jsClassName}); + } + return list; + } + + /** + * The parent element name. + */ + @Parameter + public String jsClassName_; + + /** + * The default test. + * @throws Exception if an error occurs + */ + @Test + @Alerts("true") + @Default + public void ctor() throws Exception { + test(jsClassName_); + } + + /** + * Runs the test. + * + * @param jsClassName the host name + * @throws Exception if an error occurs + */ + protected void test(final String jsClassName) throws Exception { + final String html = DOCTYPE_HTML + + "\n" + + "\n" + + "-\n" + + "\n" + + "\n" + + "\n" + + ""; + + ServerRestartCount_++; + if (ServerRestartCount_ == 200) { + stopWebServers(); + ServerRestartCount_ = 0; + } + + final WebDriver driver = loadPage2(html); + assertTitle(driver, getExpectedAlerts()[0]); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean isWebClientCached() { + return true; + } + + /** + * Cleanup. + */ + @After + public void after() { + jsClassName_ = null; + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _AbortSignal() throws Exception { + test("AbortSignal"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void _AbstractList() throws Exception { + test("AbstractList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _AnalyserNode() throws Exception { + test("AnalyserNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Animation() throws Exception { + test("Animation"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _AnimationEvent() throws Exception { + test("AnimationEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Atomics() throws Exception { + test("Atomics"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Attr() throws Exception { + test("Attr"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + @HtmlUnitNYI(CHROME = "false", + EDGE = "false", + FF = "false", + FF_ESR = "false") + public void _Audio() throws Exception { + test("Audio"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _AudioBufferSourceNode() throws Exception { + test("AudioBufferSourceNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _AudioContext() throws Exception { + test("AudioContext"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _AudioDestinationNode() throws Exception { + test("AudioDestinationNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _AudioNode() throws Exception { + test("AudioNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _AudioProcessingEvent() throws Exception { + test("AudioProcessingEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _AudioScheduledSourceNode() throws Exception { + test("AudioScheduledSourceNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _BaseAudioContext() throws Exception { + test("BaseAudioContext"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _BatteryManager() throws Exception { + test("BatteryManager"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _BeforeInstallPromptEvent() throws Exception { + test("BeforeInstallPromptEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _BeforeUnloadEvent() throws Exception { + test("BeforeUnloadEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _BiquadFilterNode() throws Exception { + test("BiquadFilterNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _BlobEvent() throws Exception { + test("BlobEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _BroadcastChannel() throws Exception { + test("BroadcastChannel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CDATASection() throws Exception { + test("CDATASection"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSS() throws Exception { + test("CSS"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "false", + FF_ESR = "false") + public void _CSS2Properties() throws Exception { + test("CSS2Properties"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSConditionRule() throws Exception { + test("CSSConditionRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSCounterStyleRule() throws Exception { + test("CSSCounterStyleRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSFontFaceRule() throws Exception { + test("CSSFontFaceRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSGroupingRule() throws Exception { + test("CSSGroupingRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSImportRule() throws Exception { + test("CSSImportRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSKeyframeRule() throws Exception { + test("CSSKeyframeRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSKeyframesRule() throws Exception { + test("CSSKeyframesRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSMediaRule() throws Exception { + test("CSSMediaRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSNamespaceRule() throws Exception { + test("CSSNamespaceRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSPageRule() throws Exception { + test("CSSPageRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSStyleRule() throws Exception { + test("CSSStyleRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSStyleSheet() throws Exception { + test("CSSStyleSheet"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CSSSupportsRule() throws Exception { + test("CSSSupportsRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "false", + FF_ESR = "false") + public void _CanvasCaptureMediaStream() throws Exception { + test("CanvasCaptureMediaStream"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _CanvasCaptureMediaStreamTrack() throws Exception { + test("CanvasCaptureMediaStreamTrack"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ChannelMergerNode() throws Exception { + test("ChannelMergerNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ChannelSplitterNode() throws Exception { + test("ChannelSplitterNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CharacterData() throws Exception { + test("CharacterData"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ClipboardEvent() throws Exception { + test("ClipboardEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CloseEvent() throws Exception { + test("CloseEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Comment() throws Exception { + test("Comment"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CompositionEvent() throws Exception { + test("CompositionEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ConstantSourceNode() throws Exception { + test("ConstantSourceNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ConvolverNode() throws Exception { + test("ConvolverNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _CustomEvent() throws Exception { + test("CustomEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + FF = "exception", + FF_ESR = "exception") + public void _DOMError() throws Exception { + test("DOMError"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _DOMMatrix() throws Exception { + test("DOMMatrix"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _DOMPoint() throws Exception { + test("DOMPoint"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _DOMRect() throws Exception { + test("DOMRect"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _DelayNode() throws Exception { + test("DelayNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _DeviceMotionEvent() throws Exception { + test("DeviceMotionEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _DeviceOrientationEvent() throws Exception { + test("DeviceOrientationEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Document() throws Exception { + test("Document"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _DocumentFragment() throws Exception { + test("DocumentFragment"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _DocumentType() throws Exception { + test("DocumentType"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _DragEvent() throws Exception { + test("DragEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _DynamicsCompressorNode() throws Exception { + test("DynamicsCompressorNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Element() throws Exception { + test("Element"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ErrorEvent() throws Exception { + test("ErrorEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + FF = "exception", + FF_ESR = "exception") + public void _External() throws Exception { + test("External"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _EventSource() throws Exception { + test("EventSource"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _FederatedCredential() throws Exception { + test("FederatedCredential"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _File() throws Exception { + test("File"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _FileReader() throws Exception { + test("FileReader"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "true", + FF_ESR = "true") + public void _FileSystem() throws Exception { + test("FileSystem"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "false", + FF_ESR = "false") + public void _FileSystemDirectoryEntry() throws Exception { + test("FileSystemDirectoryEntry"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "true", + FF_ESR = "true") + public void _FileSystemDirectoryReader() throws Exception { + test("FileSystemDirectoryReader"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "true", + FF_ESR = "true") + public void _FileSystemEntry() throws Exception { + test("FileSystemEntry"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "false", + FF_ESR = "false") + public void _FileSystemFileEntry() throws Exception { + test("FileSystemFileEntry"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _FocusEvent() throws Exception { + test("FocusEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "false", + FF_ESR = "false") + public void _FontFaceSet() throws Exception { + test("FontFaceSet"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _GainNode() throws Exception { + test("GainNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _GamepadEvent() throws Exception { + test("GamepadEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLAnchorElement() throws Exception { + test("HTMLAnchorElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLAreaElement() throws Exception { + test("HTMLAreaElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLAudioElement() throws Exception { + test("HTMLAudioElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLBRElement() throws Exception { + test("HTMLBRElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLBaseElement() throws Exception { + test("HTMLBaseElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLBodyElement() throws Exception { + test("HTMLBodyElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLButtonElement() throws Exception { + test("HTMLButtonElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLCanvasElement() throws Exception { + test("HTMLCanvasElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLDListElement() throws Exception { + test("HTMLDListElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLDataElement() throws Exception { + test("HTMLDataElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLDataListElement() throws Exception { + test("HTMLDataListElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLDetailsElement() throws Exception { + test("HTMLDetailsElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLDialogElement() throws Exception { + test("HTMLDialogElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLDirectoryElement() throws Exception { + test("HTMLDirectoryElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLDivElement() throws Exception { + test("HTMLDivElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLDocument() throws Exception { + test("HTMLDocument"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLElement() throws Exception { + test("HTMLElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLEmbedElement() throws Exception { + test("HTMLEmbedElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLFieldSetElement() throws Exception { + test("HTMLFieldSetElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLFontElement() throws Exception { + test("HTMLFontElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLFormControlsCollection() throws Exception { + test("HTMLFormControlsCollection"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLFormElement() throws Exception { + test("HTMLFormElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLFrameElement() throws Exception { + test("HTMLFrameElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLFrameSetElement() throws Exception { + test("HTMLFrameSetElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLHRElement() throws Exception { + test("HTMLHRElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLHeadElement() throws Exception { + test("HTMLHeadElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLHeadingElement() throws Exception { + test("HTMLHeadingElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLHtmlElement() throws Exception { + test("HTMLHtmlElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLIFrameElement() throws Exception { + test("HTMLIFrameElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLImageElement() throws Exception { + test("HTMLImageElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLInputElement() throws Exception { + test("HTMLInputElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLLIElement() throws Exception { + test("HTMLLIElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLLabelElement() throws Exception { + test("HTMLLabelElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLLegendElement() throws Exception { + test("HTMLLegendElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLLinkElement() throws Exception { + test("HTMLLinkElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void _HTMLListElement() throws Exception { + test("HTMLListElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLMapElement() throws Exception { + test("HTMLMapElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLMarqueeElement() throws Exception { + test("HTMLMarqueeElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLMediaElement() throws Exception { + test("HTMLMediaElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLMenuElement() throws Exception { + test("HTMLMenuElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLMetaElement() throws Exception { + test("HTMLMetaElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLMeterElement() throws Exception { + test("HTMLMeterElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLModElement() throws Exception { + test("HTMLModElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLOListElement() throws Exception { + test("HTMLOListElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLObjectElement() throws Exception { + test("HTMLObjectElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLOptGroupElement() throws Exception { + test("HTMLOptGroupElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLOptionElement() throws Exception { + test("HTMLOptionElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true", + FF = "true", + FF_ESR = "true") + public void _HTMLOptionsCollection() throws Exception { + test("HTMLOptionsCollection"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLOutputElement() throws Exception { + test("HTMLOutputElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLParagraphElement() throws Exception { + test("HTMLParagraphElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLParamElement() throws Exception { + test("HTMLParamElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLPictureElement() throws Exception { + test("HTMLPictureElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLPreElement() throws Exception { + test("HTMLPreElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLProgressElement() throws Exception { + test("HTMLProgressElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLQuoteElement() throws Exception { + test("HTMLQuoteElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLScriptElement() throws Exception { + test("HTMLScriptElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLSelectElement() throws Exception { + test("HTMLSelectElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLSlotElement() throws Exception { + test("HTMLSlotElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLSourceElement() throws Exception { + test("HTMLSourceElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLSpanElement() throws Exception { + test("HTMLSpanElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLStyleElement() throws Exception { + test("HTMLStyleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLTableCaptionElement() throws Exception { + test("HTMLTableCaptionElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLTableCellElement() throws Exception { + test("HTMLTableCellElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLTableColElement() throws Exception { + test("HTMLTableColElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void _HTMLTableComponent() throws Exception { + test("HTMLTableComponent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLTableElement() throws Exception { + test("HTMLTableElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLTableRowElement() throws Exception { + test("HTMLTableRowElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLTableSectionElement() throws Exception { + test("HTMLTableSectionElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLTemplateElement() throws Exception { + test("HTMLTemplateElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLTextAreaElement() throws Exception { + test("HTMLTextAreaElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLTimeElement() throws Exception { + test("HTMLTimeElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLTitleElement() throws Exception { + test("HTMLTitleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLTrackElement() throws Exception { + test("HTMLTrackElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLUListElement() throws Exception { + test("HTMLUListElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLUnknownElement() throws Exception { + test("HTMLUnknownElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HTMLVideoElement() throws Exception { + test("HTMLVideoElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _HashChangeEvent() throws Exception { + test("HashChangeEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _IDBCursorWithValue() throws Exception { + test("IDBCursorWithValue"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _IDBDatabase() throws Exception { + test("IDBDatabase"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _IDBOpenDBRequest() throws Exception { + test("IDBOpenDBRequest"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _IDBRequest() throws Exception { + test("IDBRequest"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _IDBTransaction() throws Exception { + test("IDBTransaction"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _IDBVersionChangeEvent() throws Exception { + test("IDBVersionChangeEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _IIRFilterNode() throws Exception { + test("IIRFilterNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + FF = "exception", + FF_ESR = "exception") + public void _InputDeviceCapabilities() throws Exception { + test("InputDeviceCapabilities"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _InputEvent() throws Exception { + test("InputEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _KeyboardEvent() throws Exception { + test("KeyboardEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true", + FF = "true", + FF_ESR = "true") + public void _KeyframeEffect() throws Exception { + test("KeyframeEffect"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MIDIAccess() throws Exception { + test("MIDIAccess"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MIDIConnectionEvent() throws Exception { + test("MIDIConnectionEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MIDIInput() throws Exception { + test("MIDIInput"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MIDIMessageEvent() throws Exception { + test("MIDIMessageEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MIDIOutput() throws Exception { + test("MIDIOutput"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MIDIPort() throws Exception { + test("MIDIPort"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaDevices() throws Exception { + test("MediaDevices"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaElementAudioSourceNode() throws Exception { + test("MediaElementAudioSourceNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaEncryptedEvent() throws Exception { + test("MediaEncryptedEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "false", + FF_ESR = "false") + public void _MediaKeyError() throws Exception { + test("MediaKeyError"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaKeyMessageEvent() throws Exception { + test("MediaKeyMessageEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaKeySession() throws Exception { + test("MediaKeySession"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaQueryList() throws Exception { + test("MediaQueryList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaQueryListEvent() throws Exception { + test("MediaQueryListEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaRecorder() throws Exception { + test("MediaRecorder"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaSource() throws Exception { + test("MediaSource"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaStream() throws Exception { + test("MediaStream"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaStreamAudioDestinationNode() throws Exception { + test("MediaStreamAudioDestinationNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaStreamAudioSourceNode() throws Exception { + test("MediaStreamAudioSourceNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaStreamEvent() throws Exception { + test("MediaStreamEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaStreamTrack() throws Exception { + test("MediaStreamTrack"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MediaStreamTrackEvent() throws Exception { + test("MediaStreamTrackEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MessageEvent() throws Exception { + test("MessageEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MessagePort() throws Exception { + test("MessagePort"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _MouseEvent() throws Exception { + test("MouseEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "false", + FF_ESR = "false") + public void _MouseScrollEvent() throws Exception { + test("MouseScrollEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "false", + FF_ESR = "false") + public void _MutationEvent() throws Exception { + test("MutationEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void _NativeXPathNSResolver() throws Exception { + test("NativeXPathNSResolver"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _NetworkInformation() throws Exception { + test("NetworkInformation"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Node() throws Exception { + test("Node"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Notification() throws Exception { + test("Notification"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _OfflineAudioCompletionEvent() throws Exception { + test("OfflineAudioCompletionEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _OfflineAudioContext() throws Exception { + test("OfflineAudioContext"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _OscillatorNode() throws Exception { + test("OscillatorNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _PageTransitionEvent() throws Exception { + test("PageTransitionEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _PannerNode() throws Exception { + test("PannerNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _PasswordCredential() throws Exception { + test("PasswordCredential"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + FF = "exception", + FF_ESR = "exception") + public void _PaymentAddress() throws Exception { + test("PaymentAddress"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _PaymentRequest() throws Exception { + test("PaymentRequest"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _PaymentResponse() throws Exception { + test("PaymentResponse"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Performance() throws Exception { + test("Performance"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _PerformanceMark() throws Exception { + test("PerformanceMark"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _PerformanceMeasure() throws Exception { + test("PerformanceMeasure"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _PerformanceNavigationTiming() throws Exception { + test("PerformanceNavigationTiming"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _PerformanceResourceTiming() throws Exception { + test("PerformanceResourceTiming"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + FF = "exception", + FF_ESR = "exception") + public void _PeriodicSyncManager() throws Exception { + test("PeriodicSyncManager"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _PermissionStatus() throws Exception { + test("PermissionStatus"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _PointerEvent() throws Exception { + test("PointerEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _PopStateEvent() throws Exception { + test("PopStateEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + FF = "exception", + FF_ESR = "exception") + public void _Presentation() throws Exception { + test("Presentation"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _PresentationAvailability() throws Exception { + test("PresentationAvailability"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _PresentationConnection() throws Exception { + test("PresentationConnection"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _PresentationConnectionAvailableEvent() throws Exception { + test("PresentationConnectionAvailableEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _PresentationConnectionCloseEvent() throws Exception { + test("PresentationConnectionCloseEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _PresentationRequest() throws Exception { + test("PresentationRequest"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ProcessingInstruction() throws Exception { + test("ProcessingInstruction"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ProgressEvent() throws Exception { + test("ProgressEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _PromiseRejectionEvent() throws Exception { + test("PromiseRejectionEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _RTCDataChannelEvent() throws Exception { + test("RTCDataChannelEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _RTCPeerConnection() throws Exception { + test("RTCPeerConnection"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _RTCPeerConnectionIceEvent() throws Exception { + test("RTCPeerConnectionIceEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _RTCSctpTransport() throws Exception { + test("RTCSctpTransport"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _RadioNodeList() throws Exception { + test("RadioNodeList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Range() throws Exception { + test("Range"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _RemotePlayback() throws Exception { + test("RemotePlayback"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void _RowContainer() throws Exception { + test("RowContainer"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGAElement() throws Exception { + test("SVGAElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGAnimateElement() throws Exception { + test("SVGAnimateElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGAnimateMotionElement() throws Exception { + test("SVGAnimateMotionElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGAnimateTransformElement() throws Exception { + test("SVGAnimateTransformElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGAnimationElement() throws Exception { + test("SVGAnimationElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGCircleElement() throws Exception { + test("SVGCircleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGClipPathElement() throws Exception { + test("SVGClipPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGComponentTransferFunctionElement() throws Exception { + test("SVGComponentTransferFunctionElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGDefsElement() throws Exception { + test("SVGDefsElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGDescElement() throws Exception { + test("SVGDescElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + @HtmlUnitNYI(FF = "false") + public void _SVGDiscardElement() throws Exception { + test("SVGDiscardElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGElement() throws Exception { + test("SVGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGEllipseElement() throws Exception { + test("SVGEllipseElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEBlendElement() throws Exception { + test("SVGFEBlendElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEColorMatrixElement() throws Exception { + test("SVGFEColorMatrixElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEComponentTransferElement() throws Exception { + test("SVGFEComponentTransferElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFECompositeElement() throws Exception { + test("SVGFECompositeElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEConvolveMatrixElement() throws Exception { + test("SVGFEConvolveMatrixElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEDiffuseLightingElement() throws Exception { + test("SVGFEDiffuseLightingElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEDisplacementMapElement() throws Exception { + test("SVGFEDisplacementMapElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEDistantLightElement() throws Exception { + test("SVGFEDistantLightElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEDropShadowElement() throws Exception { + test("SVGFEDropShadowElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEFloodElement() throws Exception { + test("SVGFEFloodElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEFuncAElement() throws Exception { + test("SVGFEFuncAElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEFuncBElement() throws Exception { + test("SVGFEFuncBElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEFuncGElement() throws Exception { + test("SVGFEFuncGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEFuncRElement() throws Exception { + test("SVGFEFuncRElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEGaussianBlurElement() throws Exception { + test("SVGFEGaussianBlurElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEImageElement() throws Exception { + test("SVGFEImageElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEMergeElement() throws Exception { + test("SVGFEMergeElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEMergeNodeElement() throws Exception { + test("SVGFEMergeNodeElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEMorphologyElement() throws Exception { + test("SVGFEMorphologyElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEOffsetElement() throws Exception { + test("SVGFEOffsetElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFEPointLightElement() throws Exception { + test("SVGFEPointLightElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFESpecularLightingElement() throws Exception { + test("SVGFESpecularLightingElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFESpotLightElement() throws Exception { + test("SVGFESpotLightElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFETileElement() throws Exception { + test("SVGFETileElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFETurbulenceElement() throws Exception { + test("SVGFETurbulenceElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGFilterElement() throws Exception { + test("SVGFilterElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGForeignObjectElement() throws Exception { + test("SVGForeignObjectElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGGElement() throws Exception { + test("SVGGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGGeometryElement() throws Exception { + test("SVGGeometryElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGGradientElement() throws Exception { + test("SVGGradientElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGGraphicsElement() throws Exception { + test("SVGGraphicsElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGImageElement() throws Exception { + test("SVGImageElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGLineElement() throws Exception { + test("SVGLineElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGLinearGradientElement() throws Exception { + test("SVGLinearGradientElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGMPathElement() throws Exception { + test("SVGMPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGMarkerElement() throws Exception { + test("SVGMarkerElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGMaskElement() throws Exception { + test("SVGMaskElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGMetadataElement() throws Exception { + test("SVGMetadataElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGPathElement() throws Exception { + test("SVGPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGPatternElement() throws Exception { + test("SVGPatternElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGPolygonElement() throws Exception { + test("SVGPolygonElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGPolylineElement() throws Exception { + test("SVGPolylineElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGRadialGradientElement() throws Exception { + test("SVGRadialGradientElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGRectElement() throws Exception { + test("SVGRectElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGSVGElement() throws Exception { + test("SVGSVGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGScriptElement() throws Exception { + test("SVGScriptElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGSetElement() throws Exception { + test("SVGSetElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGStopElement() throws Exception { + test("SVGStopElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGStyleElement() throws Exception { + test("SVGStyleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGSwitchElement() throws Exception { + test("SVGSwitchElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGSymbolElement() throws Exception { + test("SVGSymbolElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGTSpanElement() throws Exception { + test("SVGTSpanElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGTextContentElement() throws Exception { + test("SVGTextContentElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGTextElement() throws Exception { + test("SVGTextElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGTextPathElement() throws Exception { + test("SVGTextPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGTextPositioningElement() throws Exception { + test("SVGTextPositioningElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGTitleElement() throws Exception { + test("SVGTitleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGUseElement() throws Exception { + test("SVGUseElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SVGViewElement() throws Exception { + test("SVGViewElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Screen() throws Exception { + test("Screen"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ScreenOrientation() throws Exception { + test("ScreenOrientation"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ScriptProcessorNode() throws Exception { + test("ScriptProcessorNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SecurityPolicyViolationEvent() throws Exception { + test("SecurityPolicyViolationEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ServiceWorker() throws Exception { + test("ServiceWorker"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ServiceWorkerContainer() throws Exception { + test("ServiceWorkerContainer"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ServiceWorkerRegistration() throws Exception { + test("ServiceWorkerRegistration"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _ShadowRoot() throws Exception { + test("ShadowRoot"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SharedWorker() throws Exception { + test("SharedWorker"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SourceBuffer() throws Exception { + test("SourceBuffer"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SourceBufferList() throws Exception { + test("SourceBufferList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void _SpeechGrammar() throws Exception { + test("SpeechGrammar"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void _SpeechGrammarList() throws Exception { + test("SpeechGrammarList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void _SpeechRecognition() throws Exception { + test("SpeechRecognition"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void _SpeechRecognitionErrorEvent() throws Exception { + test("SpeechRecognitionErrorEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void _SpeechRecognitionEvent() throws Exception { + test("SpeechRecognitionEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SpeechSynthesis() throws Exception { + test("SpeechSynthesis"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SpeechSynthesisErrorEvent() throws Exception { + test("SpeechSynthesisErrorEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SpeechSynthesisEvent() throws Exception { + test("SpeechSynthesisEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SpeechSynthesisUtterance() throws Exception { + test("SpeechSynthesisUtterance"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _StereoPannerNode() throws Exception { + test("StereoPannerNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _StorageEvent() throws Exception { + test("StorageEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void _StyleMedia() throws Exception { + test("StyleMedia"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _SubmitEvent() throws Exception { + test("SubmitEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + FF = "exception", + FF_ESR = "exception") + public void _SyncManager() throws Exception { + test("SyncManager"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Text() throws Exception { + test("Text"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF_ESR = "exception") + public void _TextEvent() throws Exception { + test("TextEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _TextTrack() throws Exception { + test("TextTrack"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _TextTrackCue() throws Exception { + test("TextTrackCue"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _TextTrackList() throws Exception { + test("TextTrackList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = "false", + FF_ESR = "false") + public void _TimeEvent() throws Exception { + test("TimeEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + FF = "exception", + FF_ESR = "exception") + public void _Touch() throws Exception { + test("Touch"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _TouchEvent() throws Exception { + test("TouchEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + FF = "exception", + FF_ESR = "exception") + public void _TouchList() throws Exception { + test("TouchList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _TrackEvent() throws Exception { + test("TrackEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _TransitionEvent() throws Exception { + test("TransitionEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _UIEvent() throws Exception { + test("UIEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _VTTCue() throws Exception { + test("VTTCue"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _WaveShaperNode() throws Exception { + test("WaveShaperNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF_ESR = "true") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true") + public void _WebGLBuffer() throws Exception { + test("WebGLBuffer"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _WebGLContextEvent() throws Exception { + test("WebGLContextEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF_ESR = "true") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true") + public void _WebGLFramebuffer() throws Exception { + test("WebGLFramebuffer"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF_ESR = "true") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true") + public void _WebGLProgram() throws Exception { + test("WebGLProgram"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF_ESR = "true") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true") + public void _WebGLQuery() throws Exception { + test("WebGLQuery"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF_ESR = "true") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true") + public void _WebGLRenderbuffer() throws Exception { + test("WebGLRenderbuffer"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF_ESR = "true") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true") + public void _WebGLSampler() throws Exception { + test("WebGLSampler"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF_ESR = "true") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true") + public void _WebGLShader() throws Exception { + test("WebGLShader"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF_ESR = "true") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true") + public void _WebGLSync() throws Exception { + test("WebGLSync"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF_ESR = "true") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true") + public void _WebGLTexture() throws Exception { + test("WebGLTexture"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF_ESR = "true") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true") + public void _WebGLTransformFeedback() throws Exception { + test("WebGLTransformFeedback"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF_ESR = "true") + @HtmlUnitNYI(CHROME = "true", + EDGE = "true") + public void _WebGLVertexArrayObject() throws Exception { + test("WebGLVertexArrayObject"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _WebKitCSSMatrix() throws Exception { + test("WebKitCSSMatrix"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + FF = "exception", + FF_ESR = "exception") + public void _WebKitMutationObserver() throws Exception { + test("WebKitMutationObserver"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _WebKitMediaStream() throws Exception { + test("webkitMediaStream"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _WebSocket() throws Exception { + test("WebSocket"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _WheelEvent() throws Exception { + test("WheelEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Window() throws Exception { + test("Window"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _Worker() throws Exception { + test("Worker"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _XMLDocument() throws Exception { + test("XMLDocument"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _XMLHttpRequest() throws Exception { + test("XMLHttpRequest"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _XMLHttpRequestEventTarget() throws Exception { + test("XMLHttpRequestEventTarget"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void _XMLHttpRequestUpload() throws Exception { + test("XMLHttpRequestUpload"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _webkitMediaStream() throws Exception { + test("webkitMediaStream"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "exception", + FF_ESR = "exception") + public void _webkitRTCPeerConnection() throws Exception { + test("webkitRTCPeerConnection"); + } +} diff --git a/src/test/java/org/htmlunit/general/huge/ElementClosesElementTest.java b/src/test/java/org/htmlunit/general/huge/ElementClosesElementTest.java index 95c0f183755..7a47665ea67 100644 --- a/src/test/java/org/htmlunit/general/huge/ElementClosesElementTest.java +++ b/src/test/java/org/htmlunit/general/huge/ElementClosesElementTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,8 +24,8 @@ import org.htmlunit.html.DefaultElementFactory; import org.htmlunit.junit.BrowserParameterizedRunner; import org.htmlunit.junit.BrowserParameterizedRunner.Default; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; @@ -138,7 +138,8 @@ else if ("tr".equals(parent)) { html = "<" + parent + " id='outer'><" + child + ">\n"; } - String pageHtml = "\n" + String pageHtml = DOCTYPE_HTML + + "\n" + "-\n" + "\n" + bodyStart @@ -149,18 +150,21 @@ else if ("tr".equals(parent)) { if ("basefont".equals(parent) || "base".equals(parent) || "isindex".equals(parent)) { - pageHtml = "\n" + pageHtml = DOCTYPE_HTML + + "\n" + "<" + parent + " id='outer'><" + child + ">\n" + "\n" + ""; } else if ("head".equals(parent)) { - pageHtml = "<" + child + ">\n" + pageHtml = DOCTYPE_HTML + + "<" + child + ">\n" + "\n" + ""; } else if ("title".equals(parent)) { - pageHtml = "\n" + pageHtml = DOCTYPE_HTML + + "\n" + "<" + child + ">\n" + "</head><body>\n" + "</body></html>"; diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOf.java b/src/test/java/org/htmlunit/general/huge/HostParentOf.java index 7fd0d9a0ebc..874f26de06a 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOf.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOf.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,9 +22,8 @@ import org.htmlunit.TestCaseTest; import org.htmlunit.WebDriverTestCase; -import org.htmlunit.html.HtmlPageTest; import org.htmlunit.junit.BrowserParameterizedRunner.Default; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.After; import org.junit.Test; import org.junit.runners.Parameterized.Parameter; @@ -77,7 +76,7 @@ protected static Collection<Object[]> data(final Predicate<String> predicate) t * @throws Exception if an error occurs */ @Test - @Alerts("false") + @Alerts("false/false") @Default public void isParentOf() throws Exception { test(parent_, child_); @@ -91,7 +90,7 @@ public void isParentOf() throws Exception { * @throws Exception if an error occurs */ protected void test(final String parent, final String child) throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "<html>\n" + "<head>\n" + "<title>-\n" @@ -99,15 +98,16 @@ protected void test(final String parent, final String child) throws Exception { + "\n" + "\n" + ""; diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfATest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfATest.java index e1957f7cfea..670024cc3a6 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfATest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfATest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -51,7 +51,7 @@ public static Collection data() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AbortController_AbortController() throws Exception { test("AbortController", "AbortController"); } @@ -60,7 +60,7 @@ public void _AbortController_AbortController() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AbortSignal_AbortSignal() throws Exception { test("AbortSignal", "AbortSignal"); } @@ -69,7 +69,7 @@ public void _AbortSignal_AbortSignal() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AbstractRange_AbstractRange() throws Exception { test("AbstractRange", "AbstractRange"); } @@ -78,7 +78,7 @@ public void _AbstractRange_AbstractRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AbstractRange_Range() throws Exception { test("AbstractRange", "Range"); } @@ -87,7 +87,7 @@ public void _AbstractRange_Range() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _ActiveXObject_ActiveXObject() throws Exception { test("ActiveXObject", "ActiveXObject"); } @@ -96,7 +96,7 @@ public void _ActiveXObject_ActiveXObject() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AnalyserNode_AnalyserNode() throws Exception { test("AnalyserNode", "AnalyserNode"); } @@ -105,7 +105,7 @@ public void _AnalyserNode_AnalyserNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _ANGLE_instanced_arrays_ANGLE_instanced_arrays() throws Exception { test("ANGLE_instanced_arrays", "ANGLE_instanced_arrays"); } @@ -114,7 +114,7 @@ public void _ANGLE_instanced_arrays_ANGLE_instanced_arrays() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Animation_Animation() throws Exception { test("Animation", "Animation"); } @@ -123,7 +123,7 @@ public void _Animation_Animation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AnimationEvent_AnimationEvent() throws Exception { test("AnimationEvent", "AnimationEvent"); } @@ -132,7 +132,7 @@ public void _AnimationEvent_AnimationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _ApplicationCache_ApplicationCache() throws Exception { test("ApplicationCache", "ApplicationCache"); } @@ -141,7 +141,7 @@ public void _ApplicationCache_ApplicationCache() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _ApplicationCacheErrorEvent_ApplicationCacheErrorEvent() throws Exception { test("ApplicationCacheErrorEvent", "ApplicationCacheErrorEvent"); } @@ -150,7 +150,7 @@ public void _ApplicationCacheErrorEvent_ApplicationCacheErrorEvent() throws Exce * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ArrayBuffer_ArrayBuffer() throws Exception { test("ArrayBuffer", "ArrayBuffer"); } @@ -159,11 +159,11 @@ public void _ArrayBuffer_ArrayBuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") - @HtmlUnitNYI(CHROME = "true", - EDGE = "true", - FF = "true", - FF_ESR = "true") + @Alerts("false/false") + @HtmlUnitNYI(CHROME = "true/false", + EDGE = "true/false", + FF = "true/false", + FF_ESR = "true/false") public void _Atomics_Atomics() throws Exception { test("Atomics", "Atomics"); } @@ -172,7 +172,7 @@ public void _Atomics_Atomics() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Attr_Attr() throws Exception { test("Attr", "Attr"); } @@ -181,7 +181,7 @@ public void _Attr_Attr() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Audio_Audio() throws Exception { test("Audio", "Audio"); } @@ -190,11 +190,11 @@ public void _Audio_Audio() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") - @HtmlUnitNYI(CHROME = "false", - EDGE = "false", - FF = "false", - FF_ESR = "false") + @Alerts("true/false") + @HtmlUnitNYI(CHROME = "false/false", + EDGE = "false/false", + FF = "false/false", + FF_ESR = "false/false") public void _Audio_HTMLAudioElement() throws Exception { test("Audio", "HTMLAudioElement"); } @@ -203,7 +203,7 @@ public void _Audio_HTMLAudioElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioBuffer_AudioBuffer() throws Exception { test("AudioBuffer", "AudioBuffer"); } @@ -212,7 +212,7 @@ public void _AudioBuffer_AudioBuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioBufferSourceNode_AudioBufferSourceNode() throws Exception { test("AudioBufferSourceNode", "AudioBufferSourceNode"); } @@ -221,7 +221,7 @@ public void _AudioBufferSourceNode_AudioBufferSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioContext_AudioContext() throws Exception { test("AudioContext", "AudioContext"); } @@ -230,7 +230,7 @@ public void _AudioContext_AudioContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioDestinationNode_AudioDestinationNode() throws Exception { test("AudioDestinationNode", "AudioDestinationNode"); } @@ -239,7 +239,7 @@ public void _AudioDestinationNode_AudioDestinationNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioListener_AudioListener() throws Exception { test("AudioListener", "AudioListener"); } @@ -248,7 +248,7 @@ public void _AudioListener_AudioListener() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_AnalyserNode() throws Exception { test("AudioNode", "AnalyserNode"); } @@ -257,7 +257,7 @@ public void _AudioNode_AnalyserNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioNode_AudioBufferSourceNode() throws Exception { test("AudioNode", "AudioBufferSourceNode"); } @@ -266,7 +266,7 @@ public void _AudioNode_AudioBufferSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_AudioDestinationNode() throws Exception { test("AudioNode", "AudioDestinationNode"); } @@ -275,7 +275,7 @@ public void _AudioNode_AudioDestinationNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioNode_AudioNode() throws Exception { test("AudioNode", "AudioNode"); } @@ -284,7 +284,7 @@ public void _AudioNode_AudioNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_AudioScheduledSourceNode() throws Exception { test("AudioNode", "AudioScheduledSourceNode"); } @@ -293,7 +293,7 @@ public void _AudioNode_AudioScheduledSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_BiquadFilterNode() throws Exception { test("AudioNode", "BiquadFilterNode"); } @@ -302,7 +302,7 @@ public void _AudioNode_BiquadFilterNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_ChannelMergerNode() throws Exception { test("AudioNode", "ChannelMergerNode"); } @@ -311,7 +311,7 @@ public void _AudioNode_ChannelMergerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_ChannelSplitterNode() throws Exception { test("AudioNode", "ChannelSplitterNode"); } @@ -320,7 +320,7 @@ public void _AudioNode_ChannelSplitterNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioNode_ConstantSourceNode() throws Exception { test("AudioNode", "ConstantSourceNode"); } @@ -329,7 +329,7 @@ public void _AudioNode_ConstantSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_ConvolverNode() throws Exception { test("AudioNode", "ConvolverNode"); } @@ -338,7 +338,7 @@ public void _AudioNode_ConvolverNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_DelayNode() throws Exception { test("AudioNode", "DelayNode"); } @@ -347,7 +347,7 @@ public void _AudioNode_DelayNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_DynamicsCompressorNode() throws Exception { test("AudioNode", "DynamicsCompressorNode"); } @@ -356,7 +356,7 @@ public void _AudioNode_DynamicsCompressorNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_GainNode() throws Exception { test("AudioNode", "GainNode"); } @@ -365,7 +365,7 @@ public void _AudioNode_GainNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_IIRFilterNode() throws Exception { test("AudioNode", "IIRFilterNode"); } @@ -374,7 +374,7 @@ public void _AudioNode_IIRFilterNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_MediaElementAudioSourceNode() throws Exception { test("AudioNode", "MediaElementAudioSourceNode"); } @@ -383,7 +383,7 @@ public void _AudioNode_MediaElementAudioSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_MediaStreamAudioDestinationNode() throws Exception { test("AudioNode", "MediaStreamAudioDestinationNode"); } @@ -392,7 +392,7 @@ public void _AudioNode_MediaStreamAudioDestinationNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_MediaStreamAudioSourceNode() throws Exception { test("AudioNode", "MediaStreamAudioSourceNode"); } @@ -401,7 +401,7 @@ public void _AudioNode_MediaStreamAudioSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioNode_OscillatorNode() throws Exception { test("AudioNode", "OscillatorNode"); } @@ -410,7 +410,7 @@ public void _AudioNode_OscillatorNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_PannerNode() throws Exception { test("AudioNode", "PannerNode"); } @@ -419,7 +419,7 @@ public void _AudioNode_PannerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_ScriptProcessorNode() throws Exception { test("AudioNode", "ScriptProcessorNode"); } @@ -428,7 +428,7 @@ public void _AudioNode_ScriptProcessorNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_StereoPannerNode() throws Exception { test("AudioNode", "StereoPannerNode"); } @@ -437,7 +437,7 @@ public void _AudioNode_StereoPannerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioNode_WaveShaperNode() throws Exception { test("AudioNode", "WaveShaperNode"); } @@ -446,7 +446,7 @@ public void _AudioNode_WaveShaperNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioParam_AudioParam() throws Exception { test("AudioParam", "AudioParam"); } @@ -455,7 +455,7 @@ public void _AudioParam_AudioParam() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioProcessingEvent_AudioProcessingEvent() throws Exception { test("AudioProcessingEvent", "AudioProcessingEvent"); } @@ -464,7 +464,7 @@ public void _AudioProcessingEvent_AudioProcessingEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioScheduledSourceNode_AudioBufferSourceNode() throws Exception { test("AudioScheduledSourceNode", "AudioBufferSourceNode"); } @@ -473,7 +473,7 @@ public void _AudioScheduledSourceNode_AudioBufferSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _AudioScheduledSourceNode_AudioScheduledSourceNode() throws Exception { test("AudioScheduledSourceNode", "AudioScheduledSourceNode"); } @@ -482,7 +482,7 @@ public void _AudioScheduledSourceNode_AudioScheduledSourceNode() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioScheduledSourceNode_ConstantSourceNode() throws Exception { test("AudioScheduledSourceNode", "ConstantSourceNode"); } @@ -491,7 +491,7 @@ public void _AudioScheduledSourceNode_ConstantSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _AudioScheduledSourceNode_OscillatorNode() throws Exception { test("AudioScheduledSourceNode", "OscillatorNode"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfBTest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfBTest.java index f2f67ef17af..b7c53440355 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfBTest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfBTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -50,7 +50,7 @@ public static Collection data() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _BarProp_BarProp() throws Exception { test("BarProp", "BarProp"); } @@ -59,7 +59,7 @@ public void _BarProp_BarProp() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _BaseAudioContext_AudioContext() throws Exception { test("BaseAudioContext", "AudioContext"); } @@ -68,7 +68,7 @@ public void _BaseAudioContext_AudioContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _BaseAudioContext_BaseAudioContext() throws Exception { test("BaseAudioContext", "BaseAudioContext"); } @@ -77,7 +77,7 @@ public void _BaseAudioContext_BaseAudioContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _BaseAudioContext_OfflineAudioContext() throws Exception { test("BaseAudioContext", "OfflineAudioContext"); } @@ -86,9 +86,9 @@ public void _BaseAudioContext_OfflineAudioContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "true", - FF = "false", - FF_ESR = "false") + @Alerts(DEFAULT = "true/false", + FF = "false/false", + FF_ESR = "false/false") public void _BatteryManager_BatteryManager() throws Exception { test("BatteryManager", "BatteryManager"); } @@ -97,9 +97,9 @@ public void _BatteryManager_BatteryManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _BeforeInstallPromptEvent_BeforeInstallPromptEvent() throws Exception { test("BeforeInstallPromptEvent", "BeforeInstallPromptEvent"); } @@ -108,7 +108,7 @@ public void _BeforeInstallPromptEvent_BeforeInstallPromptEvent() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _BeforeUnloadEvent_BeforeUnloadEvent() throws Exception { test("BeforeUnloadEvent", "BeforeUnloadEvent"); } @@ -117,7 +117,7 @@ public void _BeforeUnloadEvent_BeforeUnloadEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _BiquadFilterNode_BiquadFilterNode() throws Exception { test("BiquadFilterNode", "BiquadFilterNode"); } @@ -126,7 +126,7 @@ public void _BiquadFilterNode_BiquadFilterNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Blob_Blob() throws Exception { test("Blob", "Blob"); } @@ -135,7 +135,7 @@ public void _Blob_Blob() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Blob_File() throws Exception { test("Blob", "File"); } @@ -144,7 +144,7 @@ public void _Blob_File() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _BlobEvent_BlobEvent() throws Exception { test("BlobEvent", "BlobEvent"); } @@ -153,7 +153,7 @@ public void _BlobEvent_BlobEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _BroadcastChannel_BroadcastChannel() throws Exception { test("BroadcastChannel", "BroadcastChannel"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfCTest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfCTest.java index 8421cbaaef7..2f098e222ef 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfCTest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfCTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -51,7 +51,7 @@ public static Collection data() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Cache_Cache() throws Exception { test("Cache", "Cache"); } @@ -60,7 +60,7 @@ public void _Cache_Cache() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CacheStorage_CacheStorage() throws Exception { test("CacheStorage", "CacheStorage"); } @@ -69,9 +69,9 @@ public void _CacheStorage_CacheStorage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _CanvasCaptureMediaStream_CanvasCaptureMediaStream() throws Exception { test("CanvasCaptureMediaStream", "CanvasCaptureMediaStream"); } @@ -80,9 +80,9 @@ public void _CanvasCaptureMediaStream_CanvasCaptureMediaStream() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _CanvasCaptureMediaStreamTrack_CanvasCaptureMediaStreamTrack() throws Exception { test("CanvasCaptureMediaStreamTrack", "CanvasCaptureMediaStreamTrack"); } @@ -91,7 +91,7 @@ public void _CanvasCaptureMediaStreamTrack_CanvasCaptureMediaStreamTrack() throw * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CanvasGradient_CanvasGradient() throws Exception { test("CanvasGradient", "CanvasGradient"); } @@ -100,7 +100,7 @@ public void _CanvasGradient_CanvasGradient() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CanvasPattern_CanvasPattern() throws Exception { test("CanvasPattern", "CanvasPattern"); } @@ -109,7 +109,7 @@ public void _CanvasPattern_CanvasPattern() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CanvasRenderingContext2D_CanvasRenderingContext2D() throws Exception { test("CanvasRenderingContext2D", "CanvasRenderingContext2D"); } @@ -118,7 +118,7 @@ public void _CanvasRenderingContext2D_CanvasRenderingContext2D() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CaretPosition_CaretPosition() throws Exception { test("CaretPosition", "CaretPosition"); } @@ -127,7 +127,7 @@ public void _CaretPosition_CaretPosition() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CDATASection_CDATASection() throws Exception { test("CDATASection", "CDATASection"); } @@ -136,7 +136,7 @@ public void _CDATASection_CDATASection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ChannelMergerNode_ChannelMergerNode() throws Exception { test("ChannelMergerNode", "ChannelMergerNode"); } @@ -145,7 +145,7 @@ public void _ChannelMergerNode_ChannelMergerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ChannelSplitterNode_ChannelSplitterNode() throws Exception { test("ChannelSplitterNode", "ChannelSplitterNode"); } @@ -154,7 +154,7 @@ public void _ChannelSplitterNode_ChannelSplitterNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CharacterData_CDATASection() throws Exception { test("CharacterData", "CDATASection"); } @@ -163,7 +163,7 @@ public void _CharacterData_CDATASection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CharacterData_CharacterData() throws Exception { test("CharacterData", "CharacterData"); } @@ -172,7 +172,7 @@ public void _CharacterData_CharacterData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CharacterData_Comment() throws Exception { test("CharacterData", "Comment"); } @@ -181,7 +181,7 @@ public void _CharacterData_Comment() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CharacterData_ProcessingInstruction() throws Exception { test("CharacterData", "ProcessingInstruction"); } @@ -190,7 +190,7 @@ public void _CharacterData_ProcessingInstruction() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CharacterData_Text() throws Exception { test("CharacterData", "Text"); } @@ -199,25 +199,7 @@ public void _CharacterData_Text() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") - public void _ClientRect_ClientRect() throws Exception { - test("ClientRect", "ClientRect"); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("false") - public void _ClientRectList_ClientRectList() throws Exception { - test("ClientRectList", "ClientRectList"); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("true") + @Alerts("true/false") public void _ClipboardEvent_ClipboardEvent() throws Exception { test("ClipboardEvent", "ClipboardEvent"); } @@ -226,7 +208,7 @@ public void _ClipboardEvent_ClipboardEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CloseEvent_CloseEvent() throws Exception { test("CloseEvent", "CloseEvent"); } @@ -235,7 +217,7 @@ public void _CloseEvent_CloseEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Comment_Comment() throws Exception { test("Comment", "Comment"); } @@ -244,7 +226,7 @@ public void _Comment_Comment() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CompositionEvent_CompositionEvent() throws Exception { test("CompositionEvent", "CompositionEvent"); } @@ -253,7 +235,7 @@ public void _CompositionEvent_CompositionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Console_Console() throws Exception { test("Console", "Console"); } @@ -262,7 +244,7 @@ public void _Console_Console() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ConstantSourceNode_ConstantSourceNode() throws Exception { test("ConstantSourceNode", "ConstantSourceNode"); } @@ -271,7 +253,7 @@ public void _ConstantSourceNode_ConstantSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ConvolverNode_ConvolverNode() throws Exception { test("ConvolverNode", "ConvolverNode"); } @@ -280,7 +262,7 @@ public void _ConvolverNode_ConvolverNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Coordinates_Coordinates() throws Exception { test("Coordinates", "Coordinates"); } @@ -289,7 +271,7 @@ public void _Coordinates_Coordinates() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Credential_Credential() throws Exception { test("Credential", "Credential"); } @@ -298,9 +280,9 @@ public void _Credential_Credential() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _Credential_FederatedCredential() throws Exception { test("Credential", "FederatedCredential"); } @@ -309,9 +291,9 @@ public void _Credential_FederatedCredential() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _Credential_PasswordCredential() throws Exception { test("Credential", "PasswordCredential"); } @@ -320,7 +302,7 @@ public void _Credential_PasswordCredential() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CredentialsContainer_CredentialsContainer() throws Exception { test("CredentialsContainer", "CredentialsContainer"); } @@ -329,7 +311,7 @@ public void _CredentialsContainer_CredentialsContainer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Crypto_Crypto() throws Exception { test("Crypto", "Crypto"); } @@ -338,7 +320,7 @@ public void _Crypto_Crypto() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CryptoKey_CryptoKey() throws Exception { test("CryptoKey", "CryptoKey"); } @@ -347,7 +329,7 @@ public void _CryptoKey_CryptoKey() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _CSS_CSS() throws Exception { test("CSS", "CSS"); } @@ -356,9 +338,9 @@ public void _CSS_CSS() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _CSS2Properties_CSS2Properties() throws Exception { test("CSS2Properties", "CSS2Properties"); } @@ -367,7 +349,7 @@ public void _CSS2Properties_CSS2Properties() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSConditionRule_CSSConditionRule() throws Exception { test("CSSConditionRule", "CSSConditionRule"); } @@ -376,7 +358,7 @@ public void _CSSConditionRule_CSSConditionRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CSSConditionRule_CSSMediaRule() throws Exception { test("CSSConditionRule", "CSSMediaRule"); } @@ -385,7 +367,7 @@ public void _CSSConditionRule_CSSMediaRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CSSConditionRule_CSSSupportsRule() throws Exception { test("CSSConditionRule", "CSSSupportsRule"); } @@ -394,7 +376,7 @@ public void _CSSConditionRule_CSSSupportsRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSCounterStyleRule_CSSCounterStyleRule() throws Exception { test("CSSCounterStyleRule", "CSSCounterStyleRule"); } @@ -403,7 +385,7 @@ public void _CSSCounterStyleRule_CSSCounterStyleRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSFontFaceRule_CSSFontFaceRule() throws Exception { test("CSSFontFaceRule", "CSSFontFaceRule"); } @@ -412,7 +394,7 @@ public void _CSSFontFaceRule_CSSFontFaceRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CSSGroupingRule_CSSConditionRule() throws Exception { test("CSSGroupingRule", "CSSConditionRule"); } @@ -421,7 +403,7 @@ public void _CSSGroupingRule_CSSConditionRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSGroupingRule_CSSGroupingRule() throws Exception { test("CSSGroupingRule", "CSSGroupingRule"); } @@ -430,7 +412,7 @@ public void _CSSGroupingRule_CSSGroupingRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSGroupingRule_CSSMediaRule() throws Exception { test("CSSGroupingRule", "CSSMediaRule"); } @@ -439,9 +421,24 @@ public void _CSSGroupingRule_CSSMediaRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true") - @HtmlUnitNYI(FF = "false") + @Alerts("true/true") + @HtmlUnitNYI(CHROME = "false/false", + EDGE = "false/false", + FF = "false/false", + FF_ESR = "false/false") + public void _CSSGroupingRule_CSSPageRule() throws Exception { + test("CSSGroupingRule", "CSSPageRule"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false/false", + FF = "true/true", + FF_ESR = "true/true") + @HtmlUnitNYI(FF = "false/false", + FF_ESR = "false/false") public void _CSSGroupingRule_CSSStyleRule() throws Exception { test("CSSGroupingRule", "CSSStyleRule"); } @@ -450,7 +447,7 @@ public void _CSSGroupingRule_CSSStyleRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSGroupingRule_CSSSupportsRule() throws Exception { test("CSSGroupingRule", "CSSSupportsRule"); } @@ -459,7 +456,7 @@ public void _CSSGroupingRule_CSSSupportsRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSImportRule_CSSImportRule() throws Exception { test("CSSImportRule", "CSSImportRule"); } @@ -468,7 +465,7 @@ public void _CSSImportRule_CSSImportRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSKeyframeRule_CSSKeyframeRule() throws Exception { test("CSSKeyframeRule", "CSSKeyframeRule"); } @@ -477,7 +474,7 @@ public void _CSSKeyframeRule_CSSKeyframeRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSKeyframesRule_CSSKeyframesRule() throws Exception { test("CSSKeyframesRule", "CSSKeyframesRule"); } @@ -486,7 +483,7 @@ public void _CSSKeyframesRule_CSSKeyframesRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSMediaRule_CSSMediaRule() throws Exception { test("CSSMediaRule", "CSSMediaRule"); } @@ -495,7 +492,7 @@ public void _CSSMediaRule_CSSMediaRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSNamespaceRule_CSSNamespaceRule() throws Exception { test("CSSNamespaceRule", "CSSNamespaceRule"); } @@ -504,7 +501,7 @@ public void _CSSNamespaceRule_CSSNamespaceRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSPageRule_CSSPageRule() throws Exception { test("CSSPageRule", "CSSPageRule"); } @@ -513,7 +510,7 @@ public void _CSSPageRule_CSSPageRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _CSSPrimitiveValue_CSSPrimitiveValue() throws Exception { test("CSSPrimitiveValue", "CSSPrimitiveValue"); } @@ -522,7 +519,7 @@ public void _CSSPrimitiveValue_CSSPrimitiveValue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSRule_CSSConditionRule() throws Exception { test("CSSRule", "CSSConditionRule"); } @@ -531,7 +528,7 @@ public void _CSSRule_CSSConditionRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CSSRule_CSSCounterStyleRule() throws Exception { test("CSSRule", "CSSCounterStyleRule"); } @@ -540,7 +537,7 @@ public void _CSSRule_CSSCounterStyleRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CSSRule_CSSFontFaceRule() throws Exception { test("CSSRule", "CSSFontFaceRule"); } @@ -549,7 +546,7 @@ public void _CSSRule_CSSFontFaceRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CSSRule_CSSGroupingRule() throws Exception { test("CSSRule", "CSSGroupingRule"); } @@ -558,7 +555,7 @@ public void _CSSRule_CSSGroupingRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CSSRule_CSSImportRule() throws Exception { test("CSSRule", "CSSImportRule"); } @@ -567,7 +564,7 @@ public void _CSSRule_CSSImportRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CSSRule_CSSKeyframeRule() throws Exception { test("CSSRule", "CSSKeyframeRule"); } @@ -576,7 +573,7 @@ public void _CSSRule_CSSKeyframeRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CSSRule_CSSKeyframesRule() throws Exception { test("CSSRule", "CSSKeyframesRule"); } @@ -585,7 +582,7 @@ public void _CSSRule_CSSKeyframesRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSRule_CSSMediaRule() throws Exception { test("CSSRule", "CSSMediaRule"); } @@ -594,7 +591,7 @@ public void _CSSRule_CSSMediaRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _CSSRule_CSSNamespaceRule() throws Exception { test("CSSRule", "CSSNamespaceRule"); } @@ -603,7 +600,11 @@ public void _CSSRule_CSSNamespaceRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") + @HtmlUnitNYI(CHROME = "true/true", + EDGE = "true/true", + FF = "true/true", + FF_ESR = "true/true") public void _CSSRule_CSSPageRule() throws Exception { test("CSSRule", "CSSPageRule"); } @@ -612,7 +613,7 @@ public void _CSSRule_CSSPageRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSRule_CSSRule() throws Exception { test("CSSRule", "CSSRule"); } @@ -621,7 +622,11 @@ public void _CSSRule_CSSRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts(DEFAULT = "true/true", + FF = "true/false", + FF_ESR = "true/false") + @HtmlUnitNYI(FF = "true/true", + FF_ESR = "true/true") public void _CSSRule_CSSStyleRule() throws Exception { test("CSSRule", "CSSStyleRule"); } @@ -630,7 +635,7 @@ public void _CSSRule_CSSStyleRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSRule_CSSSupportsRule() throws Exception { test("CSSRule", "CSSSupportsRule"); } @@ -639,7 +644,7 @@ public void _CSSRule_CSSSupportsRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSRuleList_CSSRuleList() throws Exception { test("CSSRuleList", "CSSRuleList"); } @@ -648,9 +653,9 @@ public void _CSSRuleList_CSSRuleList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/true", + FF_ESR = "true/true") public void _CSSStyleDeclaration_CSS2Properties() throws Exception { test("CSSStyleDeclaration", "CSS2Properties"); } @@ -659,7 +664,7 @@ public void _CSSStyleDeclaration_CSS2Properties() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSStyleDeclaration_CSSStyleDeclaration() throws Exception { test("CSSStyleDeclaration", "CSSStyleDeclaration"); } @@ -668,7 +673,7 @@ public void _CSSStyleDeclaration_CSSStyleDeclaration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSStyleRule_CSSStyleRule() throws Exception { test("CSSStyleRule", "CSSStyleRule"); } @@ -677,7 +682,7 @@ public void _CSSStyleRule_CSSStyleRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSStyleSheet_CSSStyleSheet() throws Exception { test("CSSStyleSheet", "CSSStyleSheet"); } @@ -686,7 +691,7 @@ public void _CSSStyleSheet_CSSStyleSheet() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CSSSupportsRule_CSSSupportsRule() throws Exception { test("CSSSupportsRule", "CSSSupportsRule"); } @@ -695,7 +700,7 @@ public void _CSSSupportsRule_CSSSupportsRule() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _CSSValue_CSSPrimitiveValue() throws Exception { test("CSSValue", "CSSPrimitiveValue"); } @@ -704,7 +709,7 @@ public void _CSSValue_CSSPrimitiveValue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _CSSValue_CSSValue() throws Exception { test("CSSValue", "CSSValue"); } @@ -713,7 +718,7 @@ public void _CSSValue_CSSValue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _CSSValue_CSSValueList() throws Exception { test("CSSValue", "CSSValueList"); } @@ -722,7 +727,7 @@ public void _CSSValue_CSSValueList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _CSSValueList_CSSValueList() throws Exception { test("CSSValueList", "CSSValueList"); } @@ -731,7 +736,7 @@ public void _CSSValueList_CSSValueList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CustomElementRegistry_CustomElementRegistry() throws Exception { test("CustomElementRegistry", "CustomElementRegistry"); } @@ -740,7 +745,7 @@ public void _CustomElementRegistry_CustomElementRegistry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _CustomEvent_CustomEvent() throws Exception { test("CustomEvent", "CustomEvent"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfDTest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfDTest.java index 80909973ad1..8d7240e6936 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfDTest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfDTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -51,7 +51,7 @@ public static Collection data() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DataTransfer_DataTransfer() throws Exception { test("DataTransfer", "DataTransfer"); } @@ -60,7 +60,7 @@ public void _DataTransfer_DataTransfer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DataTransferItem_DataTransferItem() throws Exception { test("DataTransferItem", "DataTransferItem"); } @@ -69,7 +69,7 @@ public void _DataTransferItem_DataTransferItem() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DataTransferItemList_DataTransferItemList() throws Exception { test("DataTransferItemList", "DataTransferItemList"); } @@ -78,7 +78,7 @@ public void _DataTransferItemList_DataTransferItemList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DataView_DataView() throws Exception { test("DataView", "DataView"); } @@ -87,7 +87,7 @@ public void _DataView_DataView() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DelayNode_DelayNode() throws Exception { test("DelayNode", "DelayNode"); } @@ -96,7 +96,7 @@ public void _DelayNode_DelayNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _DeviceLightEvent_DeviceLightEvent() throws Exception { test("DeviceLightEvent", "DeviceLightEvent"); } @@ -105,7 +105,7 @@ public void _DeviceLightEvent_DeviceLightEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DeviceMotionEvent_DeviceMotionEvent() throws Exception { test("DeviceMotionEvent", "DeviceMotionEvent"); } @@ -114,7 +114,7 @@ public void _DeviceMotionEvent_DeviceMotionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DeviceOrientationEvent_DeviceOrientationEvent() throws Exception { test("DeviceOrientationEvent", "DeviceOrientationEvent"); } @@ -123,7 +123,7 @@ public void _DeviceOrientationEvent_DeviceOrientationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _DeviceProximityEvent_DeviceProximityEvent() throws Exception { test("DeviceProximityEvent", "DeviceProximityEvent"); } @@ -132,7 +132,7 @@ public void _DeviceProximityEvent_DeviceProximityEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Document_Document() throws Exception { test("Document", "Document"); } @@ -141,7 +141,7 @@ public void _Document_Document() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Document_HTMLDocument() throws Exception { test("Document", "HTMLDocument"); } @@ -150,7 +150,7 @@ public void _Document_HTMLDocument() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Document_XMLDocument() throws Exception { test("Document", "XMLDocument"); } @@ -159,7 +159,7 @@ public void _Document_XMLDocument() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DocumentFragment_DocumentFragment() throws Exception { test("DocumentFragment", "DocumentFragment"); } @@ -168,7 +168,7 @@ public void _DocumentFragment_DocumentFragment() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _DocumentFragment_ShadowRoot() throws Exception { test("DocumentFragment", "ShadowRoot"); } @@ -177,7 +177,7 @@ public void _DocumentFragment_ShadowRoot() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DocumentType_DocumentType() throws Exception { test("DocumentType", "DocumentType"); } @@ -186,7 +186,7 @@ public void _DocumentType_DocumentType() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _DOMCursor_DOMCursor() throws Exception { test("DOMCursor", "DOMCursor"); } @@ -195,9 +195,9 @@ public void _DOMCursor_DOMCursor() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "true", - FF = "false", - FF_ESR = "false") + @Alerts(DEFAULT = "true/false", + FF = "false/false", + FF_ESR = "false/false") public void _DOMError_DOMError() throws Exception { test("DOMError", "DOMError"); } @@ -206,7 +206,7 @@ public void _DOMError_DOMError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMException_DOMException() throws Exception { test("DOMException", "DOMException"); } @@ -215,7 +215,7 @@ public void _DOMException_DOMException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMImplementation_DOMImplementation() throws Exception { test("DOMImplementation", "DOMImplementation"); } @@ -224,7 +224,7 @@ public void _DOMImplementation_DOMImplementation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMMatrix_DOMMatrix() throws Exception { test("DOMMatrix", "DOMMatrix"); } @@ -233,7 +233,7 @@ public void _DOMMatrix_DOMMatrix() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMMatrix_WebKitCSSMatrix() throws Exception { test("DOMMatrix", "WebKitCSSMatrix"); } @@ -242,7 +242,7 @@ public void _DOMMatrix_WebKitCSSMatrix() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _DOMMatrixReadOnly_DOMMatrix() throws Exception { test("DOMMatrixReadOnly", "DOMMatrix"); } @@ -251,7 +251,7 @@ public void _DOMMatrixReadOnly_DOMMatrix() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMMatrixReadOnly_DOMMatrixReadOnly() throws Exception { test("DOMMatrixReadOnly", "DOMMatrixReadOnly"); } @@ -260,7 +260,7 @@ public void _DOMMatrixReadOnly_DOMMatrixReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _DOMMatrixReadOnly_WebKitCSSMatrix() throws Exception { test("DOMMatrixReadOnly", "WebKitCSSMatrix"); } @@ -269,7 +269,7 @@ public void _DOMMatrixReadOnly_WebKitCSSMatrix() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMParser_DOMParser() throws Exception { test("DOMParser", "DOMParser"); } @@ -278,7 +278,7 @@ public void _DOMParser_DOMParser() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMPoint_DOMPoint() throws Exception { test("DOMPoint", "DOMPoint"); } @@ -287,7 +287,7 @@ public void _DOMPoint_DOMPoint() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _DOMPointReadOnly_DOMPoint() throws Exception { test("DOMPointReadOnly", "DOMPoint"); } @@ -296,7 +296,7 @@ public void _DOMPointReadOnly_DOMPoint() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMPointReadOnly_DOMPointReadOnly() throws Exception { test("DOMPointReadOnly", "DOMPointReadOnly"); } @@ -305,7 +305,7 @@ public void _DOMPointReadOnly_DOMPointReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMRect_DOMRect() throws Exception { test("DOMRect", "DOMRect"); } @@ -314,7 +314,7 @@ public void _DOMRect_DOMRect() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMRectList_DOMRectList() throws Exception { test("DOMRectList", "DOMRectList"); } @@ -323,11 +323,7 @@ public void _DOMRectList_DOMRectList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") - @HtmlUnitNYI(CHROME = "false", - EDGE = "false", - FF = "false", - FF_ESR = "false") + @Alerts("true/true") public void _DOMRectReadOnly_DOMRect() throws Exception { test("DOMRectReadOnly", "DOMRect"); } @@ -336,7 +332,7 @@ public void _DOMRectReadOnly_DOMRect() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMRectReadOnly_DOMRectReadOnly() throws Exception { test("DOMRectReadOnly", "DOMRectReadOnly"); } @@ -345,7 +341,7 @@ public void _DOMRectReadOnly_DOMRectReadOnly() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _DOMRequest_DOMRequest() throws Exception { test("DOMRequest", "DOMRequest"); } @@ -354,7 +350,7 @@ public void _DOMRequest_DOMRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _DOMSettableTokenList_DOMSettableTokenList() throws Exception { test("DOMSettableTokenList", "DOMSettableTokenList"); } @@ -363,7 +359,7 @@ public void _DOMSettableTokenList_DOMSettableTokenList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMStringList_DOMStringList() throws Exception { test("DOMStringList", "DOMStringList"); } @@ -372,11 +368,11 @@ public void _DOMStringList_DOMStringList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") - @HtmlUnitNYI(CHROME = "false", - EDGE = "false", - FF = "false", - FF_ESR = "false") + @Alerts("true/false") + @HtmlUnitNYI(CHROME = "false/false", + EDGE = "false/false", + FF = "false/false", + FF_ESR = "false/false") public void _DOMStringMap_DOMStringMap() throws Exception { test("DOMStringMap", "DOMStringMap"); } @@ -385,7 +381,7 @@ public void _DOMStringMap_DOMStringMap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _DOMTokenList_DOMSettableTokenList() throws Exception { test("DOMTokenList", "DOMSettableTokenList"); } @@ -394,7 +390,7 @@ public void _DOMTokenList_DOMSettableTokenList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DOMTokenList_DOMTokenList() throws Exception { test("DOMTokenList", "DOMTokenList"); } @@ -403,7 +399,7 @@ public void _DOMTokenList_DOMTokenList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DragEvent_DragEvent() throws Exception { test("DragEvent", "DragEvent"); } @@ -412,7 +408,7 @@ public void _DragEvent_DragEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _DynamicsCompressorNode_DynamicsCompressorNode() throws Exception { test("DynamicsCompressorNode", "DynamicsCompressorNode"); } @@ -421,7 +417,7 @@ public void _DynamicsCompressorNode_DynamicsCompressorNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_Audio() throws Exception { test("Element", "Audio"); } @@ -430,7 +426,7 @@ public void _Element_Audio() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_Element() throws Exception { test("Element", "Element"); } @@ -439,7 +435,7 @@ public void _Element_Element() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLAnchorElement() throws Exception { test("Element", "HTMLAnchorElement"); } @@ -448,7 +444,7 @@ public void _Element_HTMLAnchorElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLAppletElement() throws Exception { test("Element", "HTMLAppletElement"); } @@ -457,7 +453,7 @@ public void _Element_HTMLAppletElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLAreaElement() throws Exception { test("Element", "HTMLAreaElement"); } @@ -466,7 +462,7 @@ public void _Element_HTMLAreaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLAudioElement() throws Exception { test("Element", "HTMLAudioElement"); } @@ -475,7 +471,7 @@ public void _Element_HTMLAudioElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLBaseElement() throws Exception { test("Element", "HTMLBaseElement"); } @@ -484,7 +480,7 @@ public void _Element_HTMLBaseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLBaseFontElement() throws Exception { test("Element", "HTMLBaseFontElement"); } @@ -493,7 +489,7 @@ public void _Element_HTMLBaseFontElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLBGSoundElement() throws Exception { test("Element", "HTMLBGSoundElement"); } @@ -502,7 +498,7 @@ public void _Element_HTMLBGSoundElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLBlockElement() throws Exception { test("Element", "HTMLBlockElement"); } @@ -511,7 +507,7 @@ public void _Element_HTMLBlockElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLBodyElement() throws Exception { test("Element", "HTMLBodyElement"); } @@ -520,7 +516,7 @@ public void _Element_HTMLBodyElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLBRElement() throws Exception { test("Element", "HTMLBRElement"); } @@ -529,7 +525,7 @@ public void _Element_HTMLBRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLButtonElement() throws Exception { test("Element", "HTMLButtonElement"); } @@ -538,7 +534,7 @@ public void _Element_HTMLButtonElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLCanvasElement() throws Exception { test("Element", "HTMLCanvasElement"); } @@ -547,7 +543,7 @@ public void _Element_HTMLCanvasElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLDataElement() throws Exception { test("Element", "HTMLDataElement"); } @@ -556,7 +552,7 @@ public void _Element_HTMLDataElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLDataListElement() throws Exception { test("Element", "HTMLDataListElement"); } @@ -565,7 +561,7 @@ public void _Element_HTMLDataListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLDDElement() throws Exception { test("Element", "HTMLDDElement"); } @@ -574,7 +570,7 @@ public void _Element_HTMLDDElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLDetailsElement() throws Exception { test("Element", "HTMLDetailsElement"); } @@ -583,7 +579,7 @@ public void _Element_HTMLDetailsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLDialogElement() throws Exception { test("Element", "HTMLDialogElement"); } @@ -592,7 +588,7 @@ public void _Element_HTMLDialogElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLDirectoryElement() throws Exception { test("Element", "HTMLDirectoryElement"); } @@ -601,7 +597,7 @@ public void _Element_HTMLDirectoryElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLDivElement() throws Exception { test("Element", "HTMLDivElement"); } @@ -610,7 +606,7 @@ public void _Element_HTMLDivElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLDListElement() throws Exception { test("Element", "HTMLDListElement"); } @@ -619,7 +615,7 @@ public void _Element_HTMLDListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLDTElement() throws Exception { test("Element", "HTMLDTElement"); } @@ -628,7 +624,7 @@ public void _Element_HTMLDTElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Element_HTMLElement() throws Exception { test("Element", "HTMLElement"); } @@ -637,7 +633,7 @@ public void _Element_HTMLElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLEmbedElement() throws Exception { test("Element", "HTMLEmbedElement"); } @@ -646,7 +642,7 @@ public void _Element_HTMLEmbedElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLFieldSetElement() throws Exception { test("Element", "HTMLFieldSetElement"); } @@ -655,7 +651,7 @@ public void _Element_HTMLFieldSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLFontElement() throws Exception { test("Element", "HTMLFontElement"); } @@ -664,7 +660,7 @@ public void _Element_HTMLFontElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLFormElement() throws Exception { test("Element", "HTMLFormElement"); } @@ -673,7 +669,7 @@ public void _Element_HTMLFormElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLFrameElement() throws Exception { test("Element", "HTMLFrameElement"); } @@ -682,7 +678,7 @@ public void _Element_HTMLFrameElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLFrameSetElement() throws Exception { test("Element", "HTMLFrameSetElement"); } @@ -691,7 +687,7 @@ public void _Element_HTMLFrameSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLHeadElement() throws Exception { test("Element", "HTMLHeadElement"); } @@ -700,7 +696,7 @@ public void _Element_HTMLHeadElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLHeadingElement() throws Exception { test("Element", "HTMLHeadingElement"); } @@ -709,7 +705,7 @@ public void _Element_HTMLHeadingElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLHRElement() throws Exception { test("Element", "HTMLHRElement"); } @@ -718,7 +714,7 @@ public void _Element_HTMLHRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLHtmlElement() throws Exception { test("Element", "HTMLHtmlElement"); } @@ -727,7 +723,7 @@ public void _Element_HTMLHtmlElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLIFrameElement() throws Exception { test("Element", "HTMLIFrameElement"); } @@ -736,7 +732,7 @@ public void _Element_HTMLIFrameElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLImageElement() throws Exception { test("Element", "HTMLImageElement"); } @@ -745,7 +741,7 @@ public void _Element_HTMLImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLInputElement() throws Exception { test("Element", "HTMLInputElement"); } @@ -754,7 +750,7 @@ public void _Element_HTMLInputElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLIsIndexElement() throws Exception { test("Element", "HTMLIsIndexElement"); } @@ -763,7 +759,7 @@ public void _Element_HTMLIsIndexElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLLabelElement() throws Exception { test("Element", "HTMLLabelElement"); } @@ -772,7 +768,7 @@ public void _Element_HTMLLabelElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLLegendElement() throws Exception { test("Element", "HTMLLegendElement"); } @@ -781,7 +777,7 @@ public void _Element_HTMLLegendElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLLIElement() throws Exception { test("Element", "HTMLLIElement"); } @@ -790,7 +786,7 @@ public void _Element_HTMLLIElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLLinkElement() throws Exception { test("Element", "HTMLLinkElement"); } @@ -799,7 +795,7 @@ public void _Element_HTMLLinkElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLMapElement() throws Exception { test("Element", "HTMLMapElement"); } @@ -808,7 +804,7 @@ public void _Element_HTMLMapElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLMarqueeElement() throws Exception { test("Element", "HTMLMarqueeElement"); } @@ -817,7 +813,7 @@ public void _Element_HTMLMarqueeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLMediaElement() throws Exception { test("Element", "HTMLMediaElement"); } @@ -826,7 +822,7 @@ public void _Element_HTMLMediaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLMenuElement() throws Exception { test("Element", "HTMLMenuElement"); } @@ -835,7 +831,7 @@ public void _Element_HTMLMenuElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLMenuItemElement() throws Exception { test("Element", "HTMLMenuItemElement"); } @@ -844,7 +840,7 @@ public void _Element_HTMLMenuItemElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLMetaElement() throws Exception { test("Element", "HTMLMetaElement"); } @@ -853,7 +849,7 @@ public void _Element_HTMLMetaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLMeterElement() throws Exception { test("Element", "HTMLMeterElement"); } @@ -862,7 +858,7 @@ public void _Element_HTMLMeterElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLModElement() throws Exception { test("Element", "HTMLModElement"); } @@ -871,7 +867,7 @@ public void _Element_HTMLModElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLNextIdElement() throws Exception { test("Element", "HTMLNextIdElement"); } @@ -880,7 +876,7 @@ public void _Element_HTMLNextIdElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLObjectElement() throws Exception { test("Element", "HTMLObjectElement"); } @@ -889,7 +885,7 @@ public void _Element_HTMLObjectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLOListElement() throws Exception { test("Element", "HTMLOListElement"); } @@ -898,7 +894,7 @@ public void _Element_HTMLOListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLOptGroupElement() throws Exception { test("Element", "HTMLOptGroupElement"); } @@ -907,7 +903,7 @@ public void _Element_HTMLOptGroupElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLOptionElement() throws Exception { test("Element", "HTMLOptionElement"); } @@ -916,7 +912,7 @@ public void _Element_HTMLOptionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLOutputElement() throws Exception { test("Element", "HTMLOutputElement"); } @@ -925,7 +921,7 @@ public void _Element_HTMLOutputElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLParagraphElement() throws Exception { test("Element", "HTMLParagraphElement"); } @@ -934,7 +930,7 @@ public void _Element_HTMLParagraphElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLParamElement() throws Exception { test("Element", "HTMLParamElement"); } @@ -943,7 +939,7 @@ public void _Element_HTMLParamElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLPhraseElement() throws Exception { test("Element", "HTMLPhraseElement"); } @@ -952,7 +948,7 @@ public void _Element_HTMLPhraseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLPictureElement() throws Exception { test("Element", "HTMLPictureElement"); } @@ -961,7 +957,7 @@ public void _Element_HTMLPictureElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLPreElement() throws Exception { test("Element", "HTMLPreElement"); } @@ -970,7 +966,7 @@ public void _Element_HTMLPreElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLProgressElement() throws Exception { test("Element", "HTMLProgressElement"); } @@ -979,7 +975,7 @@ public void _Element_HTMLProgressElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLQuoteElement() throws Exception { test("Element", "HTMLQuoteElement"); } @@ -988,7 +984,7 @@ public void _Element_HTMLQuoteElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLScriptElement() throws Exception { test("Element", "HTMLScriptElement"); } @@ -997,7 +993,7 @@ public void _Element_HTMLScriptElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLSelectElement() throws Exception { test("Element", "HTMLSelectElement"); } @@ -1006,7 +1002,7 @@ public void _Element_HTMLSelectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLSlotElement() throws Exception { test("Element", "HTMLSlotElement"); } @@ -1015,7 +1011,7 @@ public void _Element_HTMLSlotElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLSourceElement() throws Exception { test("Element", "HTMLSourceElement"); } @@ -1024,7 +1020,7 @@ public void _Element_HTMLSourceElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLSpanElement() throws Exception { test("Element", "HTMLSpanElement"); } @@ -1033,7 +1029,7 @@ public void _Element_HTMLSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLStyleElement() throws Exception { test("Element", "HTMLStyleElement"); } @@ -1042,7 +1038,7 @@ public void _Element_HTMLStyleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLTableCaptionElement() throws Exception { test("Element", "HTMLTableCaptionElement"); } @@ -1051,7 +1047,7 @@ public void _Element_HTMLTableCaptionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLTableCellElement() throws Exception { test("Element", "HTMLTableCellElement"); } @@ -1060,7 +1056,7 @@ public void _Element_HTMLTableCellElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLTableColElement() throws Exception { test("Element", "HTMLTableColElement"); } @@ -1069,7 +1065,7 @@ public void _Element_HTMLTableColElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLTableDataCellElement() throws Exception { test("Element", "HTMLTableDataCellElement"); } @@ -1078,7 +1074,7 @@ public void _Element_HTMLTableDataCellElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLTableElement() throws Exception { test("Element", "HTMLTableElement"); } @@ -1087,7 +1083,7 @@ public void _Element_HTMLTableElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Element_HTMLTableHeaderCellElement() throws Exception { test("Element", "HTMLTableHeaderCellElement"); } @@ -1096,7 +1092,7 @@ public void _Element_HTMLTableHeaderCellElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLTableRowElement() throws Exception { test("Element", "HTMLTableRowElement"); } @@ -1105,7 +1101,7 @@ public void _Element_HTMLTableRowElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLTableSectionElement() throws Exception { test("Element", "HTMLTableSectionElement"); } @@ -1114,7 +1110,7 @@ public void _Element_HTMLTableSectionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLTemplateElement() throws Exception { test("Element", "HTMLTemplateElement"); } @@ -1123,7 +1119,7 @@ public void _Element_HTMLTemplateElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLTextAreaElement() throws Exception { test("Element", "HTMLTextAreaElement"); } @@ -1132,7 +1128,7 @@ public void _Element_HTMLTextAreaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLTimeElement() throws Exception { test("Element", "HTMLTimeElement"); } @@ -1141,7 +1137,7 @@ public void _Element_HTMLTimeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLTitleElement() throws Exception { test("Element", "HTMLTitleElement"); } @@ -1150,7 +1146,7 @@ public void _Element_HTMLTitleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLTrackElement() throws Exception { test("Element", "HTMLTrackElement"); } @@ -1159,7 +1155,7 @@ public void _Element_HTMLTrackElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLUListElement() throws Exception { test("Element", "HTMLUListElement"); } @@ -1168,7 +1164,7 @@ public void _Element_HTMLUListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLUnknownElement() throws Exception { test("Element", "HTMLUnknownElement"); } @@ -1177,7 +1173,7 @@ public void _Element_HTMLUnknownElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_HTMLVideoElement() throws Exception { test("Element", "HTMLVideoElement"); } @@ -1186,7 +1182,7 @@ public void _Element_HTMLVideoElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_Image() throws Exception { test("Element", "Image"); } @@ -1195,7 +1191,7 @@ public void _Element_Image() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_Option() throws Exception { test("Element", "Option"); } @@ -1204,7 +1200,7 @@ public void _Element_Option() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGAElement() throws Exception { test("Element", "SVGAElement"); } @@ -1213,7 +1209,7 @@ public void _Element_SVGAElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGAnimateElement() throws Exception { test("Element", "SVGAnimateElement"); } @@ -1222,7 +1218,7 @@ public void _Element_SVGAnimateElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGAnimateMotionElement() throws Exception { test("Element", "SVGAnimateMotionElement"); } @@ -1231,7 +1227,7 @@ public void _Element_SVGAnimateMotionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGAnimateTransformElement() throws Exception { test("Element", "SVGAnimateTransformElement"); } @@ -1240,7 +1236,7 @@ public void _Element_SVGAnimateTransformElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGAnimationElement() throws Exception { test("Element", "SVGAnimationElement"); } @@ -1249,7 +1245,7 @@ public void _Element_SVGAnimationElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGCircleElement() throws Exception { test("Element", "SVGCircleElement"); } @@ -1258,7 +1254,7 @@ public void _Element_SVGCircleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGClipPathElement() throws Exception { test("Element", "SVGClipPathElement"); } @@ -1267,7 +1263,7 @@ public void _Element_SVGClipPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGComponentTransferFunctionElement() throws Exception { test("Element", "SVGComponentTransferFunctionElement"); } @@ -1276,7 +1272,7 @@ public void _Element_SVGComponentTransferFunctionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGDefsElement() throws Exception { test("Element", "SVGDefsElement"); } @@ -1285,7 +1281,7 @@ public void _Element_SVGDefsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGDescElement() throws Exception { test("Element", "SVGDescElement"); } @@ -1294,7 +1290,17 @@ public void _Element_SVGDescElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("false/false") + @HtmlUnitNYI(FF = "true/false") + public void _Element_SVGDiscardElement() throws Exception { + test("Element", "SVGDiscardElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true/true") public void _Element_SVGElement() throws Exception { test("Element", "SVGElement"); } @@ -1303,7 +1309,7 @@ public void _Element_SVGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGEllipseElement() throws Exception { test("Element", "SVGEllipseElement"); } @@ -1312,7 +1318,7 @@ public void _Element_SVGEllipseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEBlendElement() throws Exception { test("Element", "SVGFEBlendElement"); } @@ -1321,7 +1327,7 @@ public void _Element_SVGFEBlendElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEColorMatrixElement() throws Exception { test("Element", "SVGFEColorMatrixElement"); } @@ -1330,7 +1336,7 @@ public void _Element_SVGFEColorMatrixElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEComponentTransferElement() throws Exception { test("Element", "SVGFEComponentTransferElement"); } @@ -1339,7 +1345,7 @@ public void _Element_SVGFEComponentTransferElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFECompositeElement() throws Exception { test("Element", "SVGFECompositeElement"); } @@ -1348,7 +1354,7 @@ public void _Element_SVGFECompositeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEConvolveMatrixElement() throws Exception { test("Element", "SVGFEConvolveMatrixElement"); } @@ -1357,7 +1363,7 @@ public void _Element_SVGFEConvolveMatrixElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEDiffuseLightingElement() throws Exception { test("Element", "SVGFEDiffuseLightingElement"); } @@ -1366,7 +1372,7 @@ public void _Element_SVGFEDiffuseLightingElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEDisplacementMapElement() throws Exception { test("Element", "SVGFEDisplacementMapElement"); } @@ -1375,7 +1381,7 @@ public void _Element_SVGFEDisplacementMapElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEDistantLightElement() throws Exception { test("Element", "SVGFEDistantLightElement"); } @@ -1384,7 +1390,7 @@ public void _Element_SVGFEDistantLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEDropShadowElement() throws Exception { test("Element", "SVGFEDropShadowElement"); } @@ -1393,7 +1399,7 @@ public void _Element_SVGFEDropShadowElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEFloodElement() throws Exception { test("Element", "SVGFEFloodElement"); } @@ -1402,7 +1408,7 @@ public void _Element_SVGFEFloodElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEFuncAElement() throws Exception { test("Element", "SVGFEFuncAElement"); } @@ -1411,7 +1417,7 @@ public void _Element_SVGFEFuncAElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEFuncBElement() throws Exception { test("Element", "SVGFEFuncBElement"); } @@ -1420,7 +1426,7 @@ public void _Element_SVGFEFuncBElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEFuncGElement() throws Exception { test("Element", "SVGFEFuncGElement"); } @@ -1429,7 +1435,7 @@ public void _Element_SVGFEFuncGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEFuncRElement() throws Exception { test("Element", "SVGFEFuncRElement"); } @@ -1438,7 +1444,7 @@ public void _Element_SVGFEFuncRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEGaussianBlurElement() throws Exception { test("Element", "SVGFEGaussianBlurElement"); } @@ -1447,7 +1453,7 @@ public void _Element_SVGFEGaussianBlurElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEImageElement() throws Exception { test("Element", "SVGFEImageElement"); } @@ -1456,7 +1462,7 @@ public void _Element_SVGFEImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEMergeElement() throws Exception { test("Element", "SVGFEMergeElement"); } @@ -1465,7 +1471,7 @@ public void _Element_SVGFEMergeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEMergeNodeElement() throws Exception { test("Element", "SVGFEMergeNodeElement"); } @@ -1474,7 +1480,7 @@ public void _Element_SVGFEMergeNodeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEMorphologyElement() throws Exception { test("Element", "SVGFEMorphologyElement"); } @@ -1483,7 +1489,7 @@ public void _Element_SVGFEMorphologyElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEOffsetElement() throws Exception { test("Element", "SVGFEOffsetElement"); } @@ -1492,7 +1498,7 @@ public void _Element_SVGFEOffsetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFEPointLightElement() throws Exception { test("Element", "SVGFEPointLightElement"); } @@ -1501,7 +1507,7 @@ public void _Element_SVGFEPointLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFESpecularLightingElement() throws Exception { test("Element", "SVGFESpecularLightingElement"); } @@ -1510,7 +1516,7 @@ public void _Element_SVGFESpecularLightingElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFESpotLightElement() throws Exception { test("Element", "SVGFESpotLightElement"); } @@ -1519,7 +1525,7 @@ public void _Element_SVGFESpotLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFETileElement() throws Exception { test("Element", "SVGFETileElement"); } @@ -1528,7 +1534,7 @@ public void _Element_SVGFETileElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFETurbulenceElement() throws Exception { test("Element", "SVGFETurbulenceElement"); } @@ -1537,7 +1543,7 @@ public void _Element_SVGFETurbulenceElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGFilterElement() throws Exception { test("Element", "SVGFilterElement"); } @@ -1546,7 +1552,7 @@ public void _Element_SVGFilterElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGForeignObjectElement() throws Exception { test("Element", "SVGForeignObjectElement"); } @@ -1555,7 +1561,7 @@ public void _Element_SVGForeignObjectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGGElement() throws Exception { test("Element", "SVGGElement"); } @@ -1564,7 +1570,7 @@ public void _Element_SVGGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGGeometryElement() throws Exception { test("Element", "SVGGeometryElement"); } @@ -1573,7 +1579,7 @@ public void _Element_SVGGeometryElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGGradientElement() throws Exception { test("Element", "SVGGradientElement"); } @@ -1582,7 +1588,7 @@ public void _Element_SVGGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGGraphicsElement() throws Exception { test("Element", "SVGGraphicsElement"); } @@ -1591,7 +1597,7 @@ public void _Element_SVGGraphicsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGImageElement() throws Exception { test("Element", "SVGImageElement"); } @@ -1600,7 +1606,7 @@ public void _Element_SVGImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGLinearGradientElement() throws Exception { test("Element", "SVGLinearGradientElement"); } @@ -1609,7 +1615,7 @@ public void _Element_SVGLinearGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGLineElement() throws Exception { test("Element", "SVGLineElement"); } @@ -1618,7 +1624,7 @@ public void _Element_SVGLineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGMarkerElement() throws Exception { test("Element", "SVGMarkerElement"); } @@ -1627,7 +1633,7 @@ public void _Element_SVGMarkerElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGMaskElement() throws Exception { test("Element", "SVGMaskElement"); } @@ -1636,7 +1642,7 @@ public void _Element_SVGMaskElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGMetadataElement() throws Exception { test("Element", "SVGMetadataElement"); } @@ -1645,7 +1651,7 @@ public void _Element_SVGMetadataElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGMPathElement() throws Exception { test("Element", "SVGMPathElement"); } @@ -1654,7 +1660,7 @@ public void _Element_SVGMPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGPathElement() throws Exception { test("Element", "SVGPathElement"); } @@ -1663,7 +1669,7 @@ public void _Element_SVGPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGPatternElement() throws Exception { test("Element", "SVGPatternElement"); } @@ -1672,7 +1678,7 @@ public void _Element_SVGPatternElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGPolygonElement() throws Exception { test("Element", "SVGPolygonElement"); } @@ -1681,7 +1687,7 @@ public void _Element_SVGPolygonElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGPolylineElement() throws Exception { test("Element", "SVGPolylineElement"); } @@ -1690,7 +1696,7 @@ public void _Element_SVGPolylineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGRadialGradientElement() throws Exception { test("Element", "SVGRadialGradientElement"); } @@ -1699,7 +1705,7 @@ public void _Element_SVGRadialGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGRectElement() throws Exception { test("Element", "SVGRectElement"); } @@ -1708,7 +1714,7 @@ public void _Element_SVGRectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGScriptElement() throws Exception { test("Element", "SVGScriptElement"); } @@ -1717,7 +1723,7 @@ public void _Element_SVGScriptElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGSetElement() throws Exception { test("Element", "SVGSetElement"); } @@ -1726,7 +1732,7 @@ public void _Element_SVGSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGStopElement() throws Exception { test("Element", "SVGStopElement"); } @@ -1735,7 +1741,7 @@ public void _Element_SVGStopElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGStyleElement() throws Exception { test("Element", "SVGStyleElement"); } @@ -1744,7 +1750,7 @@ public void _Element_SVGStyleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGSVGElement() throws Exception { test("Element", "SVGSVGElement"); } @@ -1753,7 +1759,7 @@ public void _Element_SVGSVGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGSwitchElement() throws Exception { test("Element", "SVGSwitchElement"); } @@ -1762,7 +1768,7 @@ public void _Element_SVGSwitchElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGSymbolElement() throws Exception { test("Element", "SVGSymbolElement"); } @@ -1771,7 +1777,7 @@ public void _Element_SVGSymbolElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGTextContentElement() throws Exception { test("Element", "SVGTextContentElement"); } @@ -1780,7 +1786,7 @@ public void _Element_SVGTextContentElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGTextElement() throws Exception { test("Element", "SVGTextElement"); } @@ -1789,7 +1795,7 @@ public void _Element_SVGTextElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGTextPathElement() throws Exception { test("Element", "SVGTextPathElement"); } @@ -1798,7 +1804,7 @@ public void _Element_SVGTextPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGTextPositioningElement() throws Exception { test("Element", "SVGTextPositioningElement"); } @@ -1807,7 +1813,7 @@ public void _Element_SVGTextPositioningElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGTitleElement() throws Exception { test("Element", "SVGTitleElement"); } @@ -1816,7 +1822,7 @@ public void _Element_SVGTitleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGTSpanElement() throws Exception { test("Element", "SVGTSpanElement"); } @@ -1825,7 +1831,7 @@ public void _Element_SVGTSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGUseElement() throws Exception { test("Element", "SVGUseElement"); } @@ -1834,7 +1840,7 @@ public void _Element_SVGUseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Element_SVGViewElement() throws Exception { test("Element", "SVGViewElement"); } @@ -1843,7 +1849,7 @@ public void _Element_SVGViewElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Enumerator_Enumerator() throws Exception { test("Enumerator", "Enumerator"); } @@ -1852,11 +1858,11 @@ public void _Enumerator_Enumerator() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") - @HtmlUnitNYI(CHROME = "false", - EDGE = "false", - FF = "false", - FF_ESR = "false") + @Alerts("true/false") + @HtmlUnitNYI(CHROME = "false/false", + EDGE = "false/false", + FF = "false/false", + FF_ESR = "false/false") public void _Error_DOMException() throws Exception { test("Error", "DOMException"); } @@ -1865,7 +1871,7 @@ public void _Error_DOMException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Error_Error() throws Exception { test("Error", "Error"); } @@ -1874,7 +1880,7 @@ public void _Error_Error() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ErrorEvent_ErrorEvent() throws Exception { test("ErrorEvent", "ErrorEvent"); } @@ -1883,7 +1889,7 @@ public void _ErrorEvent_ErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_AnimationEvent() throws Exception { test("Event", "AnimationEvent"); } @@ -1892,7 +1898,7 @@ public void _Event_AnimationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Event_ApplicationCacheErrorEvent() throws Exception { test("Event", "ApplicationCacheErrorEvent"); } @@ -1901,7 +1907,7 @@ public void _Event_ApplicationCacheErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_AudioProcessingEvent() throws Exception { test("Event", "AudioProcessingEvent"); } @@ -1910,9 +1916,9 @@ public void _Event_AudioProcessingEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _Event_BeforeInstallPromptEvent() throws Exception { test("Event", "BeforeInstallPromptEvent"); } @@ -1921,7 +1927,7 @@ public void _Event_BeforeInstallPromptEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_BeforeUnloadEvent() throws Exception { test("Event", "BeforeUnloadEvent"); } @@ -1930,7 +1936,7 @@ public void _Event_BeforeUnloadEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_BlobEvent() throws Exception { test("Event", "BlobEvent"); } @@ -1939,7 +1945,7 @@ public void _Event_BlobEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_ClipboardEvent() throws Exception { test("Event", "ClipboardEvent"); } @@ -1948,7 +1954,7 @@ public void _Event_ClipboardEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_CloseEvent() throws Exception { test("Event", "CloseEvent"); } @@ -1957,7 +1963,7 @@ public void _Event_CloseEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Event_CompositionEvent() throws Exception { test("Event", "CompositionEvent"); } @@ -1966,7 +1972,7 @@ public void _Event_CompositionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_CustomEvent() throws Exception { test("Event", "CustomEvent"); } @@ -1975,7 +1981,7 @@ public void _Event_CustomEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Event_DeviceLightEvent() throws Exception { test("Event", "DeviceLightEvent"); } @@ -1984,7 +1990,7 @@ public void _Event_DeviceLightEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_DeviceMotionEvent() throws Exception { test("Event", "DeviceMotionEvent"); } @@ -1993,7 +1999,7 @@ public void _Event_DeviceMotionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_DeviceOrientationEvent() throws Exception { test("Event", "DeviceOrientationEvent"); } @@ -2002,7 +2008,7 @@ public void _Event_DeviceOrientationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Event_DeviceProximityEvent() throws Exception { test("Event", "DeviceProximityEvent"); } @@ -2011,7 +2017,7 @@ public void _Event_DeviceProximityEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Event_DragEvent() throws Exception { test("Event", "DragEvent"); } @@ -2020,7 +2026,7 @@ public void _Event_DragEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_ErrorEvent() throws Exception { test("Event", "ErrorEvent"); } @@ -2029,7 +2035,7 @@ public void _Event_ErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Event_Event() throws Exception { test("Event", "Event"); } @@ -2038,7 +2044,7 @@ public void _Event_Event() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Event_FocusEvent() throws Exception { test("Event", "FocusEvent"); } @@ -2047,7 +2053,7 @@ public void _Event_FocusEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_GamepadEvent() throws Exception { test("Event", "GamepadEvent"); } @@ -2056,7 +2062,7 @@ public void _Event_GamepadEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_HashChangeEvent() throws Exception { test("Event", "HashChangeEvent"); } @@ -2065,7 +2071,7 @@ public void _Event_HashChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_IDBVersionChangeEvent() throws Exception { test("Event", "IDBVersionChangeEvent"); } @@ -2074,7 +2080,7 @@ public void _Event_IDBVersionChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Event_InputEvent() throws Exception { test("Event", "InputEvent"); } @@ -2083,7 +2089,7 @@ public void _Event_InputEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Event_KeyboardEvent() throws Exception { test("Event", "KeyboardEvent"); } @@ -2092,7 +2098,7 @@ public void _Event_KeyboardEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_MediaEncryptedEvent() throws Exception { test("Event", "MediaEncryptedEvent"); } @@ -2101,9 +2107,9 @@ public void _Event_MediaEncryptedEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/true", + FF_ESR = "true/true") public void _Event_MediaKeyError() throws Exception { test("Event", "MediaKeyError"); } @@ -2112,7 +2118,7 @@ public void _Event_MediaKeyError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_MediaKeyMessageEvent() throws Exception { test("Event", "MediaKeyMessageEvent"); } @@ -2121,7 +2127,7 @@ public void _Event_MediaKeyMessageEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_MediaQueryListEvent() throws Exception { test("Event", "MediaQueryListEvent"); } @@ -2130,7 +2136,7 @@ public void _Event_MediaQueryListEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_MediaStreamEvent() throws Exception { test("Event", "MediaStreamEvent"); } @@ -2139,7 +2145,7 @@ public void _Event_MediaStreamEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_MediaStreamTrackEvent() throws Exception { test("Event", "MediaStreamTrackEvent"); } @@ -2148,7 +2154,7 @@ public void _Event_MediaStreamTrackEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_MessageEvent() throws Exception { test("Event", "MessageEvent"); } @@ -2157,7 +2163,7 @@ public void _Event_MessageEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_MIDIConnectionEvent() throws Exception { test("Event", "MIDIConnectionEvent"); } @@ -2166,7 +2172,7 @@ public void _Event_MIDIConnectionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_MIDIMessageEvent() throws Exception { test("Event", "MIDIMessageEvent"); } @@ -2175,7 +2181,7 @@ public void _Event_MIDIMessageEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Event_MouseEvent() throws Exception { test("Event", "MouseEvent"); } @@ -2184,9 +2190,9 @@ public void _Event_MouseEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _Event_MouseScrollEvent() throws Exception { test("Event", "MouseScrollEvent"); } @@ -2195,7 +2201,7 @@ public void _Event_MouseScrollEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Event_MouseWheelEvent() throws Exception { test("Event", "MouseWheelEvent"); } @@ -2204,7 +2210,7 @@ public void _Event_MouseWheelEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Event_MSGestureEvent() throws Exception { test("Event", "MSGestureEvent"); } @@ -2213,9 +2219,9 @@ public void _Event_MSGestureEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/true", + FF_ESR = "true/true") public void _Event_MutationEvent() throws Exception { test("Event", "MutationEvent"); } @@ -2224,7 +2230,7 @@ public void _Event_MutationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_OfflineAudioCompletionEvent() throws Exception { test("Event", "OfflineAudioCompletionEvent"); } @@ -2233,7 +2239,7 @@ public void _Event_OfflineAudioCompletionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_PageTransitionEvent() throws Exception { test("Event", "PageTransitionEvent"); } @@ -2242,7 +2248,7 @@ public void _Event_PageTransitionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Event_PointerEvent() throws Exception { test("Event", "PointerEvent"); } @@ -2251,7 +2257,7 @@ public void _Event_PointerEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_PopStateEvent() throws Exception { test("Event", "PopStateEvent"); } @@ -2260,9 +2266,9 @@ public void _Event_PopStateEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _Event_PresentationConnectionAvailableEvent() throws Exception { test("Event", "PresentationConnectionAvailableEvent"); } @@ -2271,9 +2277,9 @@ public void _Event_PresentationConnectionAvailableEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _Event_PresentationConnectionCloseEvent() throws Exception { test("Event", "PresentationConnectionCloseEvent"); } @@ -2282,7 +2288,7 @@ public void _Event_PresentationConnectionCloseEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_ProgressEvent() throws Exception { test("Event", "ProgressEvent"); } @@ -2291,7 +2297,7 @@ public void _Event_ProgressEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_PromiseRejectionEvent() throws Exception { test("Event", "PromiseRejectionEvent"); } @@ -2300,7 +2306,7 @@ public void _Event_PromiseRejectionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_RTCDataChannelEvent() throws Exception { test("Event", "RTCDataChannelEvent"); } @@ -2309,7 +2315,7 @@ public void _Event_RTCDataChannelEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_RTCPeerConnectionIceEvent() throws Exception { test("Event", "RTCPeerConnectionIceEvent"); } @@ -2318,7 +2324,7 @@ public void _Event_RTCPeerConnectionIceEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_SecurityPolicyViolationEvent() throws Exception { test("Event", "SecurityPolicyViolationEvent"); } @@ -2327,7 +2333,7 @@ public void _Event_SecurityPolicyViolationEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_SpeechSynthesisEvent() throws Exception { test("Event", "SpeechSynthesisEvent"); } @@ -2336,7 +2342,7 @@ public void _Event_SpeechSynthesisEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_StorageEvent() throws Exception { test("Event", "StorageEvent"); } @@ -2345,7 +2351,7 @@ public void _Event_StorageEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_SubmitEvent() throws Exception { test("Event", "SubmitEvent"); } @@ -2354,7 +2360,7 @@ public void _Event_SubmitEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Event_SVGZoomEvent() throws Exception { test("Event", "SVGZoomEvent"); } @@ -2363,8 +2369,8 @@ public void _Event_SVGZoomEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "true", - FF_ESR = "false") + @Alerts(DEFAULT = "true/false", + FF_ESR = "false/false") public void _Event_TextEvent() throws Exception { test("Event", "TextEvent"); } @@ -2373,9 +2379,9 @@ public void _Event_TextEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/true", + FF_ESR = "true/true") public void _Event_TimeEvent() throws Exception { test("Event", "TimeEvent"); } @@ -2384,9 +2390,9 @@ public void _Event_TimeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _Event_TouchEvent() throws Exception { test("Event", "TouchEvent"); } @@ -2395,7 +2401,7 @@ public void _Event_TouchEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_TrackEvent() throws Exception { test("Event", "TrackEvent"); } @@ -2404,7 +2410,7 @@ public void _Event_TrackEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_TransitionEvent() throws Exception { test("Event", "TransitionEvent"); } @@ -2413,7 +2419,7 @@ public void _Event_TransitionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_UIEvent() throws Exception { test("Event", "UIEvent"); } @@ -2422,7 +2428,7 @@ public void _Event_UIEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Event_UserProximityEvent() throws Exception { test("Event", "UserProximityEvent"); } @@ -2431,7 +2437,7 @@ public void _Event_UserProximityEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Event_WebGLContextEvent() throws Exception { test("Event", "WebGLContextEvent"); } @@ -2440,9 +2446,9 @@ public void _Event_WebGLContextEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _Event_webkitSpeechRecognitionError() throws Exception { test("Event", "webkitSpeechRecognitionError"); } @@ -2451,9 +2457,9 @@ public void _Event_webkitSpeechRecognitionError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _Event_webkitSpeechRecognitionEvent() throws Exception { test("Event", "webkitSpeechRecognitionEvent"); } @@ -2462,7 +2468,7 @@ public void _Event_webkitSpeechRecognitionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Event_WheelEvent() throws Exception { test("Event", "WheelEvent"); } @@ -2471,7 +2477,7 @@ public void _Event_WheelEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventSource_EventSource() throws Exception { test("EventSource", "EventSource"); } @@ -2480,7 +2486,7 @@ public void _EventSource_EventSource() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_AbortSignal() throws Exception { test("EventTarget", "AbortSignal"); } @@ -2489,7 +2495,7 @@ public void _EventTarget_AbortSignal() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_AnalyserNode() throws Exception { test("EventTarget", "AnalyserNode"); } @@ -2498,7 +2504,7 @@ public void _EventTarget_AnalyserNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_Animation() throws Exception { test("EventTarget", "Animation"); } @@ -2507,7 +2513,7 @@ public void _EventTarget_Animation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _EventTarget_ApplicationCache() throws Exception { test("EventTarget", "ApplicationCache"); } @@ -2516,7 +2522,7 @@ public void _EventTarget_ApplicationCache() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_Attr() throws Exception { test("EventTarget", "Attr"); } @@ -2525,7 +2531,7 @@ public void _EventTarget_Attr() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_Audio() throws Exception { test("EventTarget", "Audio"); } @@ -2534,7 +2540,7 @@ public void _EventTarget_Audio() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_AudioBufferSourceNode() throws Exception { test("EventTarget", "AudioBufferSourceNode"); } @@ -2543,7 +2549,7 @@ public void _EventTarget_AudioBufferSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_AudioContext() throws Exception { test("EventTarget", "AudioContext"); } @@ -2552,7 +2558,7 @@ public void _EventTarget_AudioContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_AudioDestinationNode() throws Exception { test("EventTarget", "AudioDestinationNode"); } @@ -2561,7 +2567,7 @@ public void _EventTarget_AudioDestinationNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_AudioNode() throws Exception { test("EventTarget", "AudioNode"); } @@ -2570,7 +2576,7 @@ public void _EventTarget_AudioNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_AudioScheduledSourceNode() throws Exception { test("EventTarget", "AudioScheduledSourceNode"); } @@ -2579,7 +2585,7 @@ public void _EventTarget_AudioScheduledSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_BaseAudioContext() throws Exception { test("EventTarget", "BaseAudioContext"); } @@ -2588,9 +2594,9 @@ public void _EventTarget_BaseAudioContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "true", - FF = "false", - FF_ESR = "false") + @Alerts(DEFAULT = "true/true", + FF = "false/false", + FF_ESR = "false/false") public void _EventTarget_BatteryManager() throws Exception { test("EventTarget", "BatteryManager"); } @@ -2599,7 +2605,7 @@ public void _EventTarget_BatteryManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_BiquadFilterNode() throws Exception { test("EventTarget", "BiquadFilterNode"); } @@ -2608,7 +2614,7 @@ public void _EventTarget_BiquadFilterNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_BroadcastChannel() throws Exception { test("EventTarget", "BroadcastChannel"); } @@ -2617,9 +2623,9 @@ public void _EventTarget_BroadcastChannel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _EventTarget_CanvasCaptureMediaStream() throws Exception { test("EventTarget", "CanvasCaptureMediaStream"); } @@ -2628,9 +2634,9 @@ public void _EventTarget_CanvasCaptureMediaStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _EventTarget_CanvasCaptureMediaStreamTrack() throws Exception { test("EventTarget", "CanvasCaptureMediaStreamTrack"); } @@ -2639,7 +2645,7 @@ public void _EventTarget_CanvasCaptureMediaStreamTrack() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_CDATASection() throws Exception { test("EventTarget", "CDATASection"); } @@ -2648,7 +2654,7 @@ public void _EventTarget_CDATASection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_ChannelMergerNode() throws Exception { test("EventTarget", "ChannelMergerNode"); } @@ -2657,7 +2663,7 @@ public void _EventTarget_ChannelMergerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_ChannelSplitterNode() throws Exception { test("EventTarget", "ChannelSplitterNode"); } @@ -2666,7 +2672,7 @@ public void _EventTarget_ChannelSplitterNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_CharacterData() throws Exception { test("EventTarget", "CharacterData"); } @@ -2675,7 +2681,7 @@ public void _EventTarget_CharacterData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_Comment() throws Exception { test("EventTarget", "Comment"); } @@ -2684,7 +2690,7 @@ public void _EventTarget_Comment() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_ConstantSourceNode() throws Exception { test("EventTarget", "ConstantSourceNode"); } @@ -2693,7 +2699,7 @@ public void _EventTarget_ConstantSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_ConvolverNode() throws Exception { test("EventTarget", "ConvolverNode"); } @@ -2702,7 +2708,7 @@ public void _EventTarget_ConvolverNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_DelayNode() throws Exception { test("EventTarget", "DelayNode"); } @@ -2711,7 +2717,7 @@ public void _EventTarget_DelayNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_Document() throws Exception { test("EventTarget", "Document"); } @@ -2720,7 +2726,7 @@ public void _EventTarget_Document() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_DocumentFragment() throws Exception { test("EventTarget", "DocumentFragment"); } @@ -2729,7 +2735,7 @@ public void _EventTarget_DocumentFragment() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_DocumentType() throws Exception { test("EventTarget", "DocumentType"); } @@ -2738,7 +2744,7 @@ public void _EventTarget_DocumentType() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _EventTarget_DOMCursor() throws Exception { test("EventTarget", "DOMCursor"); } @@ -2747,7 +2753,7 @@ public void _EventTarget_DOMCursor() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _EventTarget_DOMRequest() throws Exception { test("EventTarget", "DOMRequest"); } @@ -2756,7 +2762,7 @@ public void _EventTarget_DOMRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_DynamicsCompressorNode() throws Exception { test("EventTarget", "DynamicsCompressorNode"); } @@ -2765,7 +2771,7 @@ public void _EventTarget_DynamicsCompressorNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_Element() throws Exception { test("EventTarget", "Element"); } @@ -2774,7 +2780,7 @@ public void _EventTarget_Element() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_EventSource() throws Exception { test("EventTarget", "EventSource"); } @@ -2783,7 +2789,7 @@ public void _EventTarget_EventSource() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_EventTarget() throws Exception { test("EventTarget", "EventTarget"); } @@ -2792,7 +2798,7 @@ public void _EventTarget_EventTarget() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_FileReader() throws Exception { test("EventTarget", "FileReader"); } @@ -2801,9 +2807,9 @@ public void _EventTarget_FileReader() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/true", + FF_ESR = "true/true") public void _EventTarget_FontFaceSet() throws Exception { test("EventTarget", "FontFaceSet"); } @@ -2812,7 +2818,7 @@ public void _EventTarget_FontFaceSet() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_GainNode() throws Exception { test("EventTarget", "GainNode"); } @@ -2821,7 +2827,7 @@ public void _EventTarget_GainNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLAnchorElement() throws Exception { test("EventTarget", "HTMLAnchorElement"); } @@ -2830,7 +2836,7 @@ public void _EventTarget_HTMLAnchorElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLAreaElement() throws Exception { test("EventTarget", "HTMLAreaElement"); } @@ -2839,7 +2845,7 @@ public void _EventTarget_HTMLAreaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLAudioElement() throws Exception { test("EventTarget", "HTMLAudioElement"); } @@ -2848,7 +2854,7 @@ public void _EventTarget_HTMLAudioElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLBaseElement() throws Exception { test("EventTarget", "HTMLBaseElement"); } @@ -2857,7 +2863,7 @@ public void _EventTarget_HTMLBaseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLBodyElement() throws Exception { test("EventTarget", "HTMLBodyElement"); } @@ -2866,7 +2872,7 @@ public void _EventTarget_HTMLBodyElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLBRElement() throws Exception { test("EventTarget", "HTMLBRElement"); } @@ -2875,7 +2881,7 @@ public void _EventTarget_HTMLBRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLButtonElement() throws Exception { test("EventTarget", "HTMLButtonElement"); } @@ -2884,7 +2890,7 @@ public void _EventTarget_HTMLButtonElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLCanvasElement() throws Exception { test("EventTarget", "HTMLCanvasElement"); } @@ -2893,7 +2899,7 @@ public void _EventTarget_HTMLCanvasElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLDataElement() throws Exception { test("EventTarget", "HTMLDataElement"); } @@ -2902,7 +2908,7 @@ public void _EventTarget_HTMLDataElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLDataListElement() throws Exception { test("EventTarget", "HTMLDataListElement"); } @@ -2911,7 +2917,7 @@ public void _EventTarget_HTMLDataListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLDetailsElement() throws Exception { test("EventTarget", "HTMLDetailsElement"); } @@ -2920,7 +2926,7 @@ public void _EventTarget_HTMLDetailsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLDialogElement() throws Exception { test("EventTarget", "HTMLDialogElement"); } @@ -2929,7 +2935,7 @@ public void _EventTarget_HTMLDialogElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLDirectoryElement() throws Exception { test("EventTarget", "HTMLDirectoryElement"); } @@ -2938,7 +2944,7 @@ public void _EventTarget_HTMLDirectoryElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLDivElement() throws Exception { test("EventTarget", "HTMLDivElement"); } @@ -2947,7 +2953,7 @@ public void _EventTarget_HTMLDivElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLDListElement() throws Exception { test("EventTarget", "HTMLDListElement"); } @@ -2956,7 +2962,7 @@ public void _EventTarget_HTMLDListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLDocument() throws Exception { test("EventTarget", "HTMLDocument"); } @@ -2965,7 +2971,7 @@ public void _EventTarget_HTMLDocument() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLElement() throws Exception { test("EventTarget", "HTMLElement"); } @@ -2974,7 +2980,7 @@ public void _EventTarget_HTMLElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLEmbedElement() throws Exception { test("EventTarget", "HTMLEmbedElement"); } @@ -2983,7 +2989,7 @@ public void _EventTarget_HTMLEmbedElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLFieldSetElement() throws Exception { test("EventTarget", "HTMLFieldSetElement"); } @@ -2992,7 +2998,7 @@ public void _EventTarget_HTMLFieldSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLFontElement() throws Exception { test("EventTarget", "HTMLFontElement"); } @@ -3001,7 +3007,7 @@ public void _EventTarget_HTMLFontElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLFormElement() throws Exception { test("EventTarget", "HTMLFormElement"); } @@ -3010,7 +3016,7 @@ public void _EventTarget_HTMLFormElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLFrameElement() throws Exception { test("EventTarget", "HTMLFrameElement"); } @@ -3019,7 +3025,7 @@ public void _EventTarget_HTMLFrameElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLFrameSetElement() throws Exception { test("EventTarget", "HTMLFrameSetElement"); } @@ -3028,7 +3034,7 @@ public void _EventTarget_HTMLFrameSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLHeadElement() throws Exception { test("EventTarget", "HTMLHeadElement"); } @@ -3037,7 +3043,7 @@ public void _EventTarget_HTMLHeadElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLHeadingElement() throws Exception { test("EventTarget", "HTMLHeadingElement"); } @@ -3046,7 +3052,7 @@ public void _EventTarget_HTMLHeadingElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLHRElement() throws Exception { test("EventTarget", "HTMLHRElement"); } @@ -3055,7 +3061,7 @@ public void _EventTarget_HTMLHRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLHtmlElement() throws Exception { test("EventTarget", "HTMLHtmlElement"); } @@ -3064,7 +3070,7 @@ public void _EventTarget_HTMLHtmlElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLIFrameElement() throws Exception { test("EventTarget", "HTMLIFrameElement"); } @@ -3073,7 +3079,7 @@ public void _EventTarget_HTMLIFrameElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLImageElement() throws Exception { test("EventTarget", "HTMLImageElement"); } @@ -3082,7 +3088,7 @@ public void _EventTarget_HTMLImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLInputElement() throws Exception { test("EventTarget", "HTMLInputElement"); } @@ -3091,7 +3097,7 @@ public void _EventTarget_HTMLInputElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLLabelElement() throws Exception { test("EventTarget", "HTMLLabelElement"); } @@ -3100,7 +3106,7 @@ public void _EventTarget_HTMLLabelElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLLegendElement() throws Exception { test("EventTarget", "HTMLLegendElement"); } @@ -3109,7 +3115,7 @@ public void _EventTarget_HTMLLegendElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLLIElement() throws Exception { test("EventTarget", "HTMLLIElement"); } @@ -3118,7 +3124,7 @@ public void _EventTarget_HTMLLIElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLLinkElement() throws Exception { test("EventTarget", "HTMLLinkElement"); } @@ -3127,7 +3133,7 @@ public void _EventTarget_HTMLLinkElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLMapElement() throws Exception { test("EventTarget", "HTMLMapElement"); } @@ -3136,7 +3142,7 @@ public void _EventTarget_HTMLMapElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLMarqueeElement() throws Exception { test("EventTarget", "HTMLMarqueeElement"); } @@ -3145,7 +3151,7 @@ public void _EventTarget_HTMLMarqueeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLMediaElement() throws Exception { test("EventTarget", "HTMLMediaElement"); } @@ -3154,7 +3160,7 @@ public void _EventTarget_HTMLMediaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLMenuElement() throws Exception { test("EventTarget", "HTMLMenuElement"); } @@ -3163,7 +3169,7 @@ public void _EventTarget_HTMLMenuElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _EventTarget_HTMLMenuItemElement() throws Exception { test("EventTarget", "HTMLMenuItemElement"); } @@ -3172,7 +3178,7 @@ public void _EventTarget_HTMLMenuItemElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLMetaElement() throws Exception { test("EventTarget", "HTMLMetaElement"); } @@ -3181,7 +3187,7 @@ public void _EventTarget_HTMLMetaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLMeterElement() throws Exception { test("EventTarget", "HTMLMeterElement"); } @@ -3190,7 +3196,7 @@ public void _EventTarget_HTMLMeterElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLModElement() throws Exception { test("EventTarget", "HTMLModElement"); } @@ -3199,7 +3205,7 @@ public void _EventTarget_HTMLModElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLObjectElement() throws Exception { test("EventTarget", "HTMLObjectElement"); } @@ -3208,7 +3214,7 @@ public void _EventTarget_HTMLObjectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLOListElement() throws Exception { test("EventTarget", "HTMLOListElement"); } @@ -3217,7 +3223,7 @@ public void _EventTarget_HTMLOListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLOptGroupElement() throws Exception { test("EventTarget", "HTMLOptGroupElement"); } @@ -3226,7 +3232,7 @@ public void _EventTarget_HTMLOptGroupElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLOptionElement() throws Exception { test("EventTarget", "HTMLOptionElement"); } @@ -3235,7 +3241,7 @@ public void _EventTarget_HTMLOptionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLOutputElement() throws Exception { test("EventTarget", "HTMLOutputElement"); } @@ -3244,7 +3250,7 @@ public void _EventTarget_HTMLOutputElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLParagraphElement() throws Exception { test("EventTarget", "HTMLParagraphElement"); } @@ -3253,7 +3259,7 @@ public void _EventTarget_HTMLParagraphElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLParamElement() throws Exception { test("EventTarget", "HTMLParamElement"); } @@ -3262,7 +3268,7 @@ public void _EventTarget_HTMLParamElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLPictureElement() throws Exception { test("EventTarget", "HTMLPictureElement"); } @@ -3271,7 +3277,7 @@ public void _EventTarget_HTMLPictureElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLPreElement() throws Exception { test("EventTarget", "HTMLPreElement"); } @@ -3280,7 +3286,7 @@ public void _EventTarget_HTMLPreElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLProgressElement() throws Exception { test("EventTarget", "HTMLProgressElement"); } @@ -3289,7 +3295,7 @@ public void _EventTarget_HTMLProgressElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLQuoteElement() throws Exception { test("EventTarget", "HTMLQuoteElement"); } @@ -3298,7 +3304,7 @@ public void _EventTarget_HTMLQuoteElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLScriptElement() throws Exception { test("EventTarget", "HTMLScriptElement"); } @@ -3307,7 +3313,7 @@ public void _EventTarget_HTMLScriptElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLSelectElement() throws Exception { test("EventTarget", "HTMLSelectElement"); } @@ -3316,7 +3322,7 @@ public void _EventTarget_HTMLSelectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLSlotElement() throws Exception { test("EventTarget", "HTMLSlotElement"); } @@ -3325,7 +3331,7 @@ public void _EventTarget_HTMLSlotElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLSourceElement() throws Exception { test("EventTarget", "HTMLSourceElement"); } @@ -3334,7 +3340,7 @@ public void _EventTarget_HTMLSourceElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLSpanElement() throws Exception { test("EventTarget", "HTMLSpanElement"); } @@ -3343,7 +3349,7 @@ public void _EventTarget_HTMLSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLStyleElement() throws Exception { test("EventTarget", "HTMLStyleElement"); } @@ -3352,7 +3358,7 @@ public void _EventTarget_HTMLStyleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLTableCaptionElement() throws Exception { test("EventTarget", "HTMLTableCaptionElement"); } @@ -3361,7 +3367,7 @@ public void _EventTarget_HTMLTableCaptionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLTableCellElement() throws Exception { test("EventTarget", "HTMLTableCellElement"); } @@ -3370,7 +3376,7 @@ public void _EventTarget_HTMLTableCellElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLTableColElement() throws Exception { test("EventTarget", "HTMLTableColElement"); } @@ -3379,7 +3385,7 @@ public void _EventTarget_HTMLTableColElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLTableElement() throws Exception { test("EventTarget", "HTMLTableElement"); } @@ -3388,7 +3394,7 @@ public void _EventTarget_HTMLTableElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLTableRowElement() throws Exception { test("EventTarget", "HTMLTableRowElement"); } @@ -3397,7 +3403,7 @@ public void _EventTarget_HTMLTableRowElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLTableSectionElement() throws Exception { test("EventTarget", "HTMLTableSectionElement"); } @@ -3406,7 +3412,7 @@ public void _EventTarget_HTMLTableSectionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLTemplateElement() throws Exception { test("EventTarget", "HTMLTemplateElement"); } @@ -3415,7 +3421,7 @@ public void _EventTarget_HTMLTemplateElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLTextAreaElement() throws Exception { test("EventTarget", "HTMLTextAreaElement"); } @@ -3424,7 +3430,7 @@ public void _EventTarget_HTMLTextAreaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLTimeElement() throws Exception { test("EventTarget", "HTMLTimeElement"); } @@ -3433,7 +3439,7 @@ public void _EventTarget_HTMLTimeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLTitleElement() throws Exception { test("EventTarget", "HTMLTitleElement"); } @@ -3442,7 +3448,7 @@ public void _EventTarget_HTMLTitleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLTrackElement() throws Exception { test("EventTarget", "HTMLTrackElement"); } @@ -3451,7 +3457,7 @@ public void _EventTarget_HTMLTrackElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLUListElement() throws Exception { test("EventTarget", "HTMLUListElement"); } @@ -3460,7 +3466,7 @@ public void _EventTarget_HTMLUListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLUnknownElement() throws Exception { test("EventTarget", "HTMLUnknownElement"); } @@ -3469,7 +3475,7 @@ public void _EventTarget_HTMLUnknownElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_HTMLVideoElement() throws Exception { test("EventTarget", "HTMLVideoElement"); } @@ -3478,7 +3484,7 @@ public void _EventTarget_HTMLVideoElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_IDBDatabase() throws Exception { test("EventTarget", "IDBDatabase"); } @@ -3487,7 +3493,7 @@ public void _EventTarget_IDBDatabase() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _EventTarget_IDBMutableFile() throws Exception { test("EventTarget", "IDBMutableFile"); } @@ -3496,7 +3502,7 @@ public void _EventTarget_IDBMutableFile() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_IDBOpenDBRequest() throws Exception { test("EventTarget", "IDBOpenDBRequest"); } @@ -3505,7 +3511,7 @@ public void _EventTarget_IDBOpenDBRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_IDBRequest() throws Exception { test("EventTarget", "IDBRequest"); } @@ -3514,7 +3520,7 @@ public void _EventTarget_IDBRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_IDBTransaction() throws Exception { test("EventTarget", "IDBTransaction"); } @@ -3523,7 +3529,7 @@ public void _EventTarget_IDBTransaction() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_IIRFilterNode() throws Exception { test("EventTarget", "IIRFilterNode"); } @@ -3532,7 +3538,7 @@ public void _EventTarget_IIRFilterNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_Image() throws Exception { test("EventTarget", "Image"); } @@ -3541,7 +3547,7 @@ public void _EventTarget_Image() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _EventTarget_LocalMediaStream() throws Exception { test("EventTarget", "LocalMediaStream"); } @@ -3550,7 +3556,7 @@ public void _EventTarget_LocalMediaStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_MediaDevices() throws Exception { test("EventTarget", "MediaDevices"); } @@ -3559,7 +3565,7 @@ public void _EventTarget_MediaDevices() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_MediaElementAudioSourceNode() throws Exception { test("EventTarget", "MediaElementAudioSourceNode"); } @@ -3568,7 +3574,7 @@ public void _EventTarget_MediaElementAudioSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_MediaKeySession() throws Exception { test("EventTarget", "MediaKeySession"); } @@ -3577,7 +3583,7 @@ public void _EventTarget_MediaKeySession() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_MediaQueryList() throws Exception { test("EventTarget", "MediaQueryList"); } @@ -3586,7 +3592,7 @@ public void _EventTarget_MediaQueryList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_MediaRecorder() throws Exception { test("EventTarget", "MediaRecorder"); } @@ -3595,7 +3601,7 @@ public void _EventTarget_MediaRecorder() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_MediaSource() throws Exception { test("EventTarget", "MediaSource"); } @@ -3604,7 +3610,7 @@ public void _EventTarget_MediaSource() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_MediaStream() throws Exception { test("EventTarget", "MediaStream"); } @@ -3613,7 +3619,7 @@ public void _EventTarget_MediaStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_MediaStreamAudioDestinationNode() throws Exception { test("EventTarget", "MediaStreamAudioDestinationNode"); } @@ -3622,7 +3628,7 @@ public void _EventTarget_MediaStreamAudioDestinationNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_MediaStreamAudioSourceNode() throws Exception { test("EventTarget", "MediaStreamAudioSourceNode"); } @@ -3631,7 +3637,7 @@ public void _EventTarget_MediaStreamAudioSourceNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_MediaStreamTrack() throws Exception { test("EventTarget", "MediaStreamTrack"); } @@ -3640,7 +3646,7 @@ public void _EventTarget_MediaStreamTrack() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_MessagePort() throws Exception { test("EventTarget", "MessagePort"); } @@ -3649,7 +3655,7 @@ public void _EventTarget_MessagePort() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_MIDIAccess() throws Exception { test("EventTarget", "MIDIAccess"); } @@ -3658,7 +3664,7 @@ public void _EventTarget_MIDIAccess() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_MIDIInput() throws Exception { test("EventTarget", "MIDIInput"); } @@ -3667,7 +3673,7 @@ public void _EventTarget_MIDIInput() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_MIDIOutput() throws Exception { test("EventTarget", "MIDIOutput"); } @@ -3676,7 +3682,7 @@ public void _EventTarget_MIDIOutput() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_MIDIPort() throws Exception { test("EventTarget", "MIDIPort"); } @@ -3685,7 +3691,7 @@ public void _EventTarget_MIDIPort() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _EventTarget_mozRTCPeerConnection() throws Exception { test("EventTarget", "mozRTCPeerConnection"); } @@ -3694,9 +3700,9 @@ public void _EventTarget_mozRTCPeerConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _EventTarget_NetworkInformation() throws Exception { test("EventTarget", "NetworkInformation"); } @@ -3705,7 +3711,7 @@ public void _EventTarget_NetworkInformation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_Node() throws Exception { test("EventTarget", "Node"); } @@ -3714,7 +3720,7 @@ public void _EventTarget_Node() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_Notification() throws Exception { test("EventTarget", "Notification"); } @@ -3723,7 +3729,7 @@ public void _EventTarget_Notification() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_OfflineAudioContext() throws Exception { test("EventTarget", "OfflineAudioContext"); } @@ -3732,7 +3738,7 @@ public void _EventTarget_OfflineAudioContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _EventTarget_OfflineResourceList() throws Exception { test("EventTarget", "OfflineResourceList"); } @@ -3741,7 +3747,7 @@ public void _EventTarget_OfflineResourceList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_Option() throws Exception { test("EventTarget", "Option"); } @@ -3750,7 +3756,7 @@ public void _EventTarget_Option() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_OscillatorNode() throws Exception { test("EventTarget", "OscillatorNode"); } @@ -3759,7 +3765,7 @@ public void _EventTarget_OscillatorNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_PannerNode() throws Exception { test("EventTarget", "PannerNode"); } @@ -3768,9 +3774,9 @@ public void _EventTarget_PannerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _EventTarget_PaymentRequest() throws Exception { test("EventTarget", "PaymentRequest"); } @@ -3779,9 +3785,9 @@ public void _EventTarget_PaymentRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _EventTarget_PaymentResponse() throws Exception { test("EventTarget", "PaymentResponse"); } @@ -3790,7 +3796,7 @@ public void _EventTarget_PaymentResponse() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_Performance() throws Exception { test("EventTarget", "Performance"); } @@ -3799,7 +3805,7 @@ public void _EventTarget_Performance() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_PermissionStatus() throws Exception { test("EventTarget", "PermissionStatus"); } @@ -3808,9 +3814,9 @@ public void _EventTarget_PermissionStatus() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _EventTarget_PresentationAvailability() throws Exception { test("EventTarget", "PresentationAvailability"); } @@ -3819,9 +3825,9 @@ public void _EventTarget_PresentationAvailability() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _EventTarget_PresentationConnection() throws Exception { test("EventTarget", "PresentationConnection"); } @@ -3830,9 +3836,9 @@ public void _EventTarget_PresentationConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _EventTarget_PresentationRequest() throws Exception { test("EventTarget", "PresentationRequest"); } @@ -3841,7 +3847,7 @@ public void _EventTarget_PresentationRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_ProcessingInstruction() throws Exception { test("EventTarget", "ProcessingInstruction"); } @@ -3850,9 +3856,9 @@ public void _EventTarget_ProcessingInstruction() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _EventTarget_RemotePlayback() throws Exception { test("EventTarget", "RemotePlayback"); } @@ -3861,7 +3867,7 @@ public void _EventTarget_RemotePlayback() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_RTCPeerConnection() throws Exception { test("EventTarget", "RTCPeerConnection"); } @@ -3870,7 +3876,7 @@ public void _EventTarget_RTCPeerConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_RTCSctpTransport() throws Exception { test("EventTarget", "RTCSctpTransport"); } @@ -3879,7 +3885,7 @@ public void _EventTarget_RTCSctpTransport() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_Screen() throws Exception { test("EventTarget", "Screen"); } @@ -3888,7 +3894,7 @@ public void _EventTarget_Screen() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_ScreenOrientation() throws Exception { test("EventTarget", "ScreenOrientation"); } @@ -3897,7 +3903,7 @@ public void _EventTarget_ScreenOrientation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_ScriptProcessorNode() throws Exception { test("EventTarget", "ScriptProcessorNode"); } @@ -3906,7 +3912,7 @@ public void _EventTarget_ScriptProcessorNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_ServiceWorker() throws Exception { test("EventTarget", "ServiceWorker"); } @@ -3915,7 +3921,7 @@ public void _EventTarget_ServiceWorker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_ServiceWorkerContainer() throws Exception { test("EventTarget", "ServiceWorkerContainer"); } @@ -3924,7 +3930,7 @@ public void _EventTarget_ServiceWorkerContainer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_ServiceWorkerRegistration() throws Exception { test("EventTarget", "ServiceWorkerRegistration"); } @@ -3933,7 +3939,7 @@ public void _EventTarget_ServiceWorkerRegistration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_ShadowRoot() throws Exception { test("EventTarget", "ShadowRoot"); } @@ -3942,7 +3948,7 @@ public void _EventTarget_ShadowRoot() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_SharedWorker() throws Exception { test("EventTarget", "SharedWorker"); } @@ -3951,7 +3957,7 @@ public void _EventTarget_SharedWorker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_SourceBuffer() throws Exception { test("EventTarget", "SourceBuffer"); } @@ -3960,7 +3966,7 @@ public void _EventTarget_SourceBuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_SourceBufferList() throws Exception { test("EventTarget", "SourceBufferList"); } @@ -3969,7 +3975,7 @@ public void _EventTarget_SourceBufferList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_SpeechSynthesis() throws Exception { test("EventTarget", "SpeechSynthesis"); } @@ -3978,7 +3984,7 @@ public void _EventTarget_SpeechSynthesis() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_SpeechSynthesisUtterance() throws Exception { test("EventTarget", "SpeechSynthesisUtterance"); } @@ -3987,7 +3993,7 @@ public void _EventTarget_SpeechSynthesisUtterance() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_StereoPannerNode() throws Exception { test("EventTarget", "StereoPannerNode"); } @@ -3996,11 +4002,7 @@ public void _EventTarget_StereoPannerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - @HtmlUnitNYI(CHROME = "false", - EDGE = "false") + @Alerts("false/false") public void _EventTarget_StorageManager() throws Exception { test("EventTarget", "StorageManager"); } @@ -4009,7 +4011,7 @@ public void _EventTarget_StorageManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGAElement() throws Exception { test("EventTarget", "SVGAElement"); } @@ -4018,7 +4020,7 @@ public void _EventTarget_SVGAElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGAnimateElement() throws Exception { test("EventTarget", "SVGAnimateElement"); } @@ -4027,7 +4029,7 @@ public void _EventTarget_SVGAnimateElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGAnimateMotionElement() throws Exception { test("EventTarget", "SVGAnimateMotionElement"); } @@ -4036,7 +4038,7 @@ public void _EventTarget_SVGAnimateMotionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGAnimateTransformElement() throws Exception { test("EventTarget", "SVGAnimateTransformElement"); } @@ -4045,7 +4047,7 @@ public void _EventTarget_SVGAnimateTransformElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGAnimationElement() throws Exception { test("EventTarget", "SVGAnimationElement"); } @@ -4054,7 +4056,7 @@ public void _EventTarget_SVGAnimationElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGCircleElement() throws Exception { test("EventTarget", "SVGCircleElement"); } @@ -4063,7 +4065,7 @@ public void _EventTarget_SVGCircleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGClipPathElement() throws Exception { test("EventTarget", "SVGClipPathElement"); } @@ -4072,7 +4074,7 @@ public void _EventTarget_SVGClipPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGComponentTransferFunctionElement() throws Exception { test("EventTarget", "SVGComponentTransferFunctionElement"); } @@ -4081,7 +4083,7 @@ public void _EventTarget_SVGComponentTransferFunctionElement() throws Exception * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGDefsElement() throws Exception { test("EventTarget", "SVGDefsElement"); } @@ -4090,7 +4092,7 @@ public void _EventTarget_SVGDefsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGDescElement() throws Exception { test("EventTarget", "SVGDescElement"); } @@ -4099,7 +4101,17 @@ public void _EventTarget_SVGDescElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("false/false") + @HtmlUnitNYI(FF = "true/false") + public void _EventTarget_SVGDiscardElement() throws Exception { + test("EventTarget", "SVGDiscardElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true/false") public void _EventTarget_SVGElement() throws Exception { test("EventTarget", "SVGElement"); } @@ -4108,7 +4120,7 @@ public void _EventTarget_SVGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGEllipseElement() throws Exception { test("EventTarget", "SVGEllipseElement"); } @@ -4117,7 +4129,7 @@ public void _EventTarget_SVGEllipseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEBlendElement() throws Exception { test("EventTarget", "SVGFEBlendElement"); } @@ -4126,7 +4138,7 @@ public void _EventTarget_SVGFEBlendElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEColorMatrixElement() throws Exception { test("EventTarget", "SVGFEColorMatrixElement"); } @@ -4135,7 +4147,7 @@ public void _EventTarget_SVGFEColorMatrixElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEComponentTransferElement() throws Exception { test("EventTarget", "SVGFEComponentTransferElement"); } @@ -4144,7 +4156,7 @@ public void _EventTarget_SVGFEComponentTransferElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFECompositeElement() throws Exception { test("EventTarget", "SVGFECompositeElement"); } @@ -4153,7 +4165,7 @@ public void _EventTarget_SVGFECompositeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEConvolveMatrixElement() throws Exception { test("EventTarget", "SVGFEConvolveMatrixElement"); } @@ -4162,7 +4174,7 @@ public void _EventTarget_SVGFEConvolveMatrixElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEDiffuseLightingElement() throws Exception { test("EventTarget", "SVGFEDiffuseLightingElement"); } @@ -4171,7 +4183,7 @@ public void _EventTarget_SVGFEDiffuseLightingElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEDisplacementMapElement() throws Exception { test("EventTarget", "SVGFEDisplacementMapElement"); } @@ -4180,7 +4192,7 @@ public void _EventTarget_SVGFEDisplacementMapElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEDistantLightElement() throws Exception { test("EventTarget", "SVGFEDistantLightElement"); } @@ -4189,7 +4201,7 @@ public void _EventTarget_SVGFEDistantLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEDropShadowElement() throws Exception { test("EventTarget", "SVGFEDropShadowElement"); } @@ -4198,7 +4210,7 @@ public void _EventTarget_SVGFEDropShadowElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEFloodElement() throws Exception { test("EventTarget", "SVGFEFloodElement"); } @@ -4207,7 +4219,7 @@ public void _EventTarget_SVGFEFloodElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEFuncAElement() throws Exception { test("EventTarget", "SVGFEFuncAElement"); } @@ -4216,7 +4228,7 @@ public void _EventTarget_SVGFEFuncAElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEFuncBElement() throws Exception { test("EventTarget", "SVGFEFuncBElement"); } @@ -4225,7 +4237,7 @@ public void _EventTarget_SVGFEFuncBElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEFuncGElement() throws Exception { test("EventTarget", "SVGFEFuncGElement"); } @@ -4234,7 +4246,7 @@ public void _EventTarget_SVGFEFuncGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEFuncRElement() throws Exception { test("EventTarget", "SVGFEFuncRElement"); } @@ -4243,7 +4255,7 @@ public void _EventTarget_SVGFEFuncRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEGaussianBlurElement() throws Exception { test("EventTarget", "SVGFEGaussianBlurElement"); } @@ -4252,7 +4264,7 @@ public void _EventTarget_SVGFEGaussianBlurElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEImageElement() throws Exception { test("EventTarget", "SVGFEImageElement"); } @@ -4261,7 +4273,7 @@ public void _EventTarget_SVGFEImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEMergeElement() throws Exception { test("EventTarget", "SVGFEMergeElement"); } @@ -4270,7 +4282,7 @@ public void _EventTarget_SVGFEMergeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEMergeNodeElement() throws Exception { test("EventTarget", "SVGFEMergeNodeElement"); } @@ -4279,7 +4291,7 @@ public void _EventTarget_SVGFEMergeNodeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEMorphologyElement() throws Exception { test("EventTarget", "SVGFEMorphologyElement"); } @@ -4288,7 +4300,7 @@ public void _EventTarget_SVGFEMorphologyElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEOffsetElement() throws Exception { test("EventTarget", "SVGFEOffsetElement"); } @@ -4297,7 +4309,7 @@ public void _EventTarget_SVGFEOffsetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFEPointLightElement() throws Exception { test("EventTarget", "SVGFEPointLightElement"); } @@ -4306,7 +4318,7 @@ public void _EventTarget_SVGFEPointLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFESpecularLightingElement() throws Exception { test("EventTarget", "SVGFESpecularLightingElement"); } @@ -4315,7 +4327,7 @@ public void _EventTarget_SVGFESpecularLightingElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFESpotLightElement() throws Exception { test("EventTarget", "SVGFESpotLightElement"); } @@ -4324,7 +4336,7 @@ public void _EventTarget_SVGFESpotLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFETileElement() throws Exception { test("EventTarget", "SVGFETileElement"); } @@ -4333,7 +4345,7 @@ public void _EventTarget_SVGFETileElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFETurbulenceElement() throws Exception { test("EventTarget", "SVGFETurbulenceElement"); } @@ -4342,7 +4354,7 @@ public void _EventTarget_SVGFETurbulenceElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGFilterElement() throws Exception { test("EventTarget", "SVGFilterElement"); } @@ -4351,7 +4363,7 @@ public void _EventTarget_SVGFilterElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGForeignObjectElement() throws Exception { test("EventTarget", "SVGForeignObjectElement"); } @@ -4360,7 +4372,7 @@ public void _EventTarget_SVGForeignObjectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGGElement() throws Exception { test("EventTarget", "SVGGElement"); } @@ -4369,7 +4381,7 @@ public void _EventTarget_SVGGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGGeometryElement() throws Exception { test("EventTarget", "SVGGeometryElement"); } @@ -4378,7 +4390,7 @@ public void _EventTarget_SVGGeometryElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGGradientElement() throws Exception { test("EventTarget", "SVGGradientElement"); } @@ -4387,7 +4399,7 @@ public void _EventTarget_SVGGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGGraphicsElement() throws Exception { test("EventTarget", "SVGGraphicsElement"); } @@ -4396,7 +4408,7 @@ public void _EventTarget_SVGGraphicsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGImageElement() throws Exception { test("EventTarget", "SVGImageElement"); } @@ -4405,7 +4417,7 @@ public void _EventTarget_SVGImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGLinearGradientElement() throws Exception { test("EventTarget", "SVGLinearGradientElement"); } @@ -4414,7 +4426,7 @@ public void _EventTarget_SVGLinearGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGLineElement() throws Exception { test("EventTarget", "SVGLineElement"); } @@ -4423,7 +4435,7 @@ public void _EventTarget_SVGLineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGMarkerElement() throws Exception { test("EventTarget", "SVGMarkerElement"); } @@ -4432,7 +4444,7 @@ public void _EventTarget_SVGMarkerElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGMaskElement() throws Exception { test("EventTarget", "SVGMaskElement"); } @@ -4441,7 +4453,7 @@ public void _EventTarget_SVGMaskElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGMetadataElement() throws Exception { test("EventTarget", "SVGMetadataElement"); } @@ -4450,7 +4462,7 @@ public void _EventTarget_SVGMetadataElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGMPathElement() throws Exception { test("EventTarget", "SVGMPathElement"); } @@ -4459,7 +4471,7 @@ public void _EventTarget_SVGMPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGPathElement() throws Exception { test("EventTarget", "SVGPathElement"); } @@ -4468,7 +4480,7 @@ public void _EventTarget_SVGPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGPatternElement() throws Exception { test("EventTarget", "SVGPatternElement"); } @@ -4477,7 +4489,7 @@ public void _EventTarget_SVGPatternElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGPolygonElement() throws Exception { test("EventTarget", "SVGPolygonElement"); } @@ -4486,7 +4498,7 @@ public void _EventTarget_SVGPolygonElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGPolylineElement() throws Exception { test("EventTarget", "SVGPolylineElement"); } @@ -4495,7 +4507,7 @@ public void _EventTarget_SVGPolylineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGRadialGradientElement() throws Exception { test("EventTarget", "SVGRadialGradientElement"); } @@ -4504,7 +4516,7 @@ public void _EventTarget_SVGRadialGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGRectElement() throws Exception { test("EventTarget", "SVGRectElement"); } @@ -4513,7 +4525,7 @@ public void _EventTarget_SVGRectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGScriptElement() throws Exception { test("EventTarget", "SVGScriptElement"); } @@ -4522,7 +4534,7 @@ public void _EventTarget_SVGScriptElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGSetElement() throws Exception { test("EventTarget", "SVGSetElement"); } @@ -4531,7 +4543,7 @@ public void _EventTarget_SVGSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGStopElement() throws Exception { test("EventTarget", "SVGStopElement"); } @@ -4540,7 +4552,7 @@ public void _EventTarget_SVGStopElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGStyleElement() throws Exception { test("EventTarget", "SVGStyleElement"); } @@ -4549,7 +4561,7 @@ public void _EventTarget_SVGStyleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGSVGElement() throws Exception { test("EventTarget", "SVGSVGElement"); } @@ -4558,7 +4570,7 @@ public void _EventTarget_SVGSVGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGSwitchElement() throws Exception { test("EventTarget", "SVGSwitchElement"); } @@ -4567,7 +4579,7 @@ public void _EventTarget_SVGSwitchElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGSymbolElement() throws Exception { test("EventTarget", "SVGSymbolElement"); } @@ -4576,7 +4588,7 @@ public void _EventTarget_SVGSymbolElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGTextContentElement() throws Exception { test("EventTarget", "SVGTextContentElement"); } @@ -4585,7 +4597,7 @@ public void _EventTarget_SVGTextContentElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGTextElement() throws Exception { test("EventTarget", "SVGTextElement"); } @@ -4594,7 +4606,7 @@ public void _EventTarget_SVGTextElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGTextPathElement() throws Exception { test("EventTarget", "SVGTextPathElement"); } @@ -4603,7 +4615,7 @@ public void _EventTarget_SVGTextPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGTextPositioningElement() throws Exception { test("EventTarget", "SVGTextPositioningElement"); } @@ -4612,7 +4624,7 @@ public void _EventTarget_SVGTextPositioningElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGTitleElement() throws Exception { test("EventTarget", "SVGTitleElement"); } @@ -4621,7 +4633,7 @@ public void _EventTarget_SVGTitleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGTSpanElement() throws Exception { test("EventTarget", "SVGTSpanElement"); } @@ -4630,7 +4642,7 @@ public void _EventTarget_SVGTSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGUseElement() throws Exception { test("EventTarget", "SVGUseElement"); } @@ -4639,7 +4651,7 @@ public void _EventTarget_SVGUseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_SVGViewElement() throws Exception { test("EventTarget", "SVGViewElement"); } @@ -4648,7 +4660,7 @@ public void _EventTarget_SVGViewElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_Text() throws Exception { test("EventTarget", "Text"); } @@ -4657,7 +4669,7 @@ public void _EventTarget_Text() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_TextTrack() throws Exception { test("EventTarget", "TextTrack"); } @@ -4666,7 +4678,7 @@ public void _EventTarget_TextTrack() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_TextTrackCue() throws Exception { test("EventTarget", "TextTrackCue"); } @@ -4675,7 +4687,7 @@ public void _EventTarget_TextTrackCue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_TextTrackList() throws Exception { test("EventTarget", "TextTrackList"); } @@ -4684,7 +4696,7 @@ public void _EventTarget_TextTrackList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_VTTCue() throws Exception { test("EventTarget", "VTTCue"); } @@ -4693,7 +4705,7 @@ public void _EventTarget_VTTCue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_WaveShaperNode() throws Exception { test("EventTarget", "WaveShaperNode"); } @@ -4702,9 +4714,9 @@ public void _EventTarget_WaveShaperNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _EventTarget_webkitMediaStream() throws Exception { test("EventTarget", "webkitMediaStream"); } @@ -4713,9 +4725,9 @@ public void _EventTarget_webkitMediaStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _EventTarget_webkitRTCPeerConnection() throws Exception { test("EventTarget", "webkitRTCPeerConnection"); } @@ -4724,9 +4736,9 @@ public void _EventTarget_webkitRTCPeerConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _EventTarget_webkitSpeechRecognition() throws Exception { test("EventTarget", "webkitSpeechRecognition"); } @@ -4735,7 +4747,7 @@ public void _EventTarget_webkitSpeechRecognition() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_WebSocket() throws Exception { test("EventTarget", "WebSocket"); } @@ -4744,7 +4756,7 @@ public void _EventTarget_WebSocket() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_Window() throws Exception { test("EventTarget", "Window"); } @@ -4753,7 +4765,7 @@ public void _EventTarget_Window() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_Worker() throws Exception { test("EventTarget", "Worker"); } @@ -4762,7 +4774,7 @@ public void _EventTarget_Worker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_XMLDocument() throws Exception { test("EventTarget", "XMLDocument"); } @@ -4771,7 +4783,7 @@ public void _EventTarget_XMLDocument() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_XMLHttpRequest() throws Exception { test("EventTarget", "XMLHttpRequest"); } @@ -4780,7 +4792,7 @@ public void _EventTarget_XMLHttpRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _EventTarget_XMLHttpRequestEventTarget() throws Exception { test("EventTarget", "XMLHttpRequestEventTarget"); } @@ -4789,7 +4801,7 @@ public void _EventTarget_XMLHttpRequestEventTarget() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _EventTarget_XMLHttpRequestUpload() throws Exception { test("EventTarget", "XMLHttpRequestUpload"); } @@ -4798,7 +4810,7 @@ public void _EventTarget_XMLHttpRequestUpload() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Event_SpeechSynthesisErrorEvent() throws Exception { test("Event", "SpeechSynthesisErrorEvent"); } @@ -4807,7 +4819,7 @@ public void _Event_SpeechSynthesisErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _EXT_texture_filter_anisotropic_EXT_texture_filter_anisotropic() throws Exception { test("EXT_texture_filter_anisotropic", "EXT_texture_filter_anisotropic"); } @@ -4816,9 +4828,9 @@ public void _EXT_texture_filter_anisotropic_EXT_texture_filter_anisotropic() thr * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _External_External() throws Exception { test("External", "External"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfFTest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfFTest.java index 569716dad66..1746ade408f 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfFTest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfFTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -50,9 +50,9 @@ public static Collection data() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _FederatedCredential_FederatedCredential() throws Exception { test("FederatedCredential", "FederatedCredential"); } @@ -61,7 +61,7 @@ public void _FederatedCredential_FederatedCredential() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _File_File() throws Exception { test("File", "File"); } @@ -70,7 +70,7 @@ public void _File_File() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _FileList_FileList() throws Exception { test("FileList", "FileList"); } @@ -79,7 +79,7 @@ public void _FileList_FileList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _FileReader_FileReader() throws Exception { test("FileReader", "FileReader"); } @@ -88,9 +88,9 @@ public void _FileReader_FileReader() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _FileSystem_FileSystem() throws Exception { test("FileSystem", "FileSystem"); } @@ -99,9 +99,9 @@ public void _FileSystem_FileSystem() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _FileSystemDirectoryEntry_FileSystemDirectoryEntry() throws Exception { test("FileSystemDirectoryEntry", "FileSystemDirectoryEntry"); } @@ -110,9 +110,9 @@ public void _FileSystemDirectoryEntry_FileSystemDirectoryEntry() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _FileSystemDirectoryReader_FileSystemDirectoryReader() throws Exception { test("FileSystemDirectoryReader", "FileSystemDirectoryReader"); } @@ -121,9 +121,9 @@ public void _FileSystemDirectoryReader_FileSystemDirectoryReader() throws Except * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/true", + FF_ESR = "true/true") public void _FileSystemEntry_FileSystemDirectoryEntry() throws Exception { test("FileSystemEntry", "FileSystemDirectoryEntry"); } @@ -132,9 +132,9 @@ public void _FileSystemEntry_FileSystemDirectoryEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _FileSystemEntry_FileSystemEntry() throws Exception { test("FileSystemEntry", "FileSystemEntry"); } @@ -143,9 +143,9 @@ public void _FileSystemEntry_FileSystemEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/true", + FF_ESR = "true/true") public void _FileSystemEntry_FileSystemFileEntry() throws Exception { test("FileSystemEntry", "FileSystemFileEntry"); } @@ -154,9 +154,9 @@ public void _FileSystemEntry_FileSystemFileEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _FileSystemFileEntry_FileSystemFileEntry() throws Exception { test("FileSystemFileEntry", "FileSystemFileEntry"); } @@ -165,7 +165,7 @@ public void _FileSystemFileEntry_FileSystemFileEntry() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Float32Array_Float32Array() throws Exception { test("Float32Array", "Float32Array"); } @@ -174,7 +174,7 @@ public void _Float32Array_Float32Array() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Float64Array_Float64Array() throws Exception { test("Float64Array", "Float64Array"); } @@ -183,7 +183,7 @@ public void _Float64Array_Float64Array() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _FocusEvent_FocusEvent() throws Exception { test("FocusEvent", "FocusEvent"); } @@ -192,7 +192,7 @@ public void _FocusEvent_FocusEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _FontFace_FontFace() throws Exception { test("FontFace", "FontFace"); } @@ -201,9 +201,9 @@ public void _FontFace_FontFace() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _FontFaceSet_FontFaceSet() throws Exception { test("FontFaceSet", "FontFaceSet"); } @@ -212,7 +212,7 @@ public void _FontFaceSet_FontFaceSet() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _FormData_FormData() throws Exception { test("FormData", "FormData"); } @@ -221,7 +221,7 @@ public void _FormData_FormData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _GainNode_GainNode() throws Exception { test("GainNode", "GainNode"); } @@ -230,7 +230,7 @@ public void _GainNode_GainNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Gamepad_Gamepad() throws Exception { test("Gamepad", "Gamepad"); } @@ -239,7 +239,7 @@ public void _Gamepad_Gamepad() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _GamepadButton_GamepadButton() throws Exception { test("GamepadButton", "GamepadButton"); } @@ -248,7 +248,7 @@ public void _GamepadButton_GamepadButton() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _GamepadEvent_GamepadEvent() throws Exception { test("GamepadEvent", "GamepadEvent"); } @@ -257,7 +257,7 @@ public void _GamepadEvent_GamepadEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Geolocation_Geolocation() throws Exception { test("Geolocation", "Geolocation"); } @@ -266,7 +266,7 @@ public void _Geolocation_Geolocation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _GeolocationCoordinates_GeolocationCoordinates() throws Exception { test("GeolocationCoordinates", "GeolocationCoordinates"); } @@ -275,7 +275,7 @@ public void _GeolocationCoordinates_GeolocationCoordinates() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _GeolocationPosition_GeolocationPosition() throws Exception { test("GeolocationPosition", "GeolocationPosition"); } @@ -284,7 +284,7 @@ public void _GeolocationPosition_GeolocationPosition() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _GeolocationPositionError_GeolocationPositionError() throws Exception { test("GeolocationPositionError", "GeolocationPositionError"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfHTest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfHTest.java index c0eb78f9db2..671e75e62d0 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfHTest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfHTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -51,7 +51,7 @@ public static Collection data() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HashChangeEvent_HashChangeEvent() throws Exception { test("HashChangeEvent", "HashChangeEvent"); } @@ -60,7 +60,7 @@ public void _HashChangeEvent_HashChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Headers_Headers() throws Exception { test("Headers", "Headers"); } @@ -69,7 +69,7 @@ public void _Headers_Headers() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _History_History() throws Exception { test("History", "History"); } @@ -78,7 +78,7 @@ public void _History_History() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLAllCollection_HTMLAllCollection() throws Exception { test("HTMLAllCollection", "HTMLAllCollection"); } @@ -87,7 +87,7 @@ public void _HTMLAllCollection_HTMLAllCollection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLAnchorElement_HTMLAnchorElement() throws Exception { test("HTMLAnchorElement", "HTMLAnchorElement"); } @@ -96,7 +96,7 @@ public void _HTMLAnchorElement_HTMLAnchorElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLAppletElement_HTMLAppletElement() throws Exception { test("HTMLAppletElement", "HTMLAppletElement"); } @@ -105,7 +105,7 @@ public void _HTMLAppletElement_HTMLAppletElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLAreaElement_HTMLAreaElement() throws Exception { test("HTMLAreaElement", "HTMLAreaElement"); } @@ -114,7 +114,11 @@ public void _HTMLAreaElement_HTMLAreaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") + @HtmlUnitNYI(CHROME = "true/true", + EDGE = "true/true", + FF = "true/true", + FF_ESR = "true/true") public void _HTMLAudioElement_Audio() throws Exception { test("HTMLAudioElement", "Audio"); } @@ -123,7 +127,7 @@ public void _HTMLAudioElement_Audio() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLAudioElement_HTMLAudioElement() throws Exception { test("HTMLAudioElement", "HTMLAudioElement"); } @@ -132,7 +136,7 @@ public void _HTMLAudioElement_HTMLAudioElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLBaseElement_HTMLBaseElement() throws Exception { test("HTMLBaseElement", "HTMLBaseElement"); } @@ -141,7 +145,7 @@ public void _HTMLBaseElement_HTMLBaseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLBaseFontElement_HTMLBaseFontElement() throws Exception { test("HTMLBaseFontElement", "HTMLBaseFontElement"); } @@ -150,7 +154,7 @@ public void _HTMLBaseFontElement_HTMLBaseFontElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLBGSoundElement_HTMLBGSoundElement() throws Exception { test("HTMLBGSoundElement", "HTMLBGSoundElement"); } @@ -159,7 +163,7 @@ public void _HTMLBGSoundElement_HTMLBGSoundElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLBlockElement_HTMLBlockElement() throws Exception { test("HTMLBlockElement", "HTMLBlockElement"); } @@ -168,7 +172,7 @@ public void _HTMLBlockElement_HTMLBlockElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLBodyElement_HTMLBodyElement() throws Exception { test("HTMLBodyElement", "HTMLBodyElement"); } @@ -177,7 +181,7 @@ public void _HTMLBodyElement_HTMLBodyElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLBRElement_HTMLBRElement() throws Exception { test("HTMLBRElement", "HTMLBRElement"); } @@ -186,7 +190,7 @@ public void _HTMLBRElement_HTMLBRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLButtonElement_HTMLButtonElement() throws Exception { test("HTMLButtonElement", "HTMLButtonElement"); } @@ -195,7 +199,7 @@ public void _HTMLButtonElement_HTMLButtonElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLCanvasElement_HTMLCanvasElement() throws Exception { test("HTMLCanvasElement", "HTMLCanvasElement"); } @@ -204,11 +208,7 @@ public void _HTMLCanvasElement_HTMLCanvasElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") - @HtmlUnitNYI(CHROME = "true", - EDGE = "true", - FF = "true", - FF_ESR = "true") + @Alerts("false/false") public void _HTMLCollection_HTMLAllCollection() throws Exception { test("HTMLCollection", "HTMLAllCollection"); } @@ -217,7 +217,7 @@ public void _HTMLCollection_HTMLAllCollection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLCollection_HTMLCollection() throws Exception { test("HTMLCollection", "HTMLCollection"); } @@ -226,7 +226,7 @@ public void _HTMLCollection_HTMLCollection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLCollection_HTMLFormControlsCollection() throws Exception { test("HTMLCollection", "HTMLFormControlsCollection"); } @@ -235,11 +235,11 @@ public void _HTMLCollection_HTMLFormControlsCollection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") - @HtmlUnitNYI(CHROME = "false", - EDGE = "false", - FF = "false", - FF_ESR = "false") + @Alerts("true/true") + @HtmlUnitNYI(CHROME = "false/false", + EDGE = "false/false", + FF = "false/false", + FF_ESR = "false/false") public void _HTMLCollection_HTMLOptionsCollection() throws Exception { test("HTMLCollection", "HTMLOptionsCollection"); } @@ -248,7 +248,7 @@ public void _HTMLCollection_HTMLOptionsCollection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLDataElement_HTMLDataElement() throws Exception { test("HTMLDataElement", "HTMLDataElement"); } @@ -257,7 +257,7 @@ public void _HTMLDataElement_HTMLDataElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLDataListElement_HTMLDataListElement() throws Exception { test("HTMLDataListElement", "HTMLDataListElement"); } @@ -266,7 +266,7 @@ public void _HTMLDataListElement_HTMLDataListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLDDElement_HTMLDDElement() throws Exception { test("HTMLDDElement", "HTMLDDElement"); } @@ -275,7 +275,7 @@ public void _HTMLDDElement_HTMLDDElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLDetailsElement_HTMLDetailsElement() throws Exception { test("HTMLDetailsElement", "HTMLDetailsElement"); } @@ -284,7 +284,7 @@ public void _HTMLDetailsElement_HTMLDetailsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLDialogElement_HTMLDialogElement() throws Exception { test("HTMLDialogElement", "HTMLDialogElement"); } @@ -293,7 +293,7 @@ public void _HTMLDialogElement_HTMLDialogElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLDirectoryElement_HTMLDirectoryElement() throws Exception { test("HTMLDirectoryElement", "HTMLDirectoryElement"); } @@ -302,7 +302,7 @@ public void _HTMLDirectoryElement_HTMLDirectoryElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLDivElement_HTMLDivElement() throws Exception { test("HTMLDivElement", "HTMLDivElement"); } @@ -311,7 +311,7 @@ public void _HTMLDivElement_HTMLDivElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLDListElement_HTMLDListElement() throws Exception { test("HTMLDListElement", "HTMLDListElement"); } @@ -320,7 +320,7 @@ public void _HTMLDListElement_HTMLDListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLDocument_HTMLDocument() throws Exception { test("HTMLDocument", "HTMLDocument"); } @@ -329,7 +329,7 @@ public void _HTMLDocument_HTMLDocument() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLDTElement_HTMLDTElement() throws Exception { test("HTMLDTElement", "HTMLDTElement"); } @@ -338,7 +338,7 @@ public void _HTMLDTElement_HTMLDTElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLElement_Audio() throws Exception { test("HTMLElement", "Audio"); } @@ -347,7 +347,7 @@ public void _HTMLElement_Audio() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLAnchorElement() throws Exception { test("HTMLElement", "HTMLAnchorElement"); } @@ -356,7 +356,7 @@ public void _HTMLElement_HTMLAnchorElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLAppletElement() throws Exception { test("HTMLElement", "HTMLAppletElement"); } @@ -365,7 +365,7 @@ public void _HTMLElement_HTMLAppletElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLAreaElement() throws Exception { test("HTMLElement", "HTMLAreaElement"); } @@ -374,7 +374,7 @@ public void _HTMLElement_HTMLAreaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLElement_HTMLAudioElement() throws Exception { test("HTMLElement", "HTMLAudioElement"); } @@ -383,7 +383,7 @@ public void _HTMLElement_HTMLAudioElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLBaseElement() throws Exception { test("HTMLElement", "HTMLBaseElement"); } @@ -392,7 +392,7 @@ public void _HTMLElement_HTMLBaseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLBaseFontElement() throws Exception { test("HTMLElement", "HTMLBaseFontElement"); } @@ -401,7 +401,7 @@ public void _HTMLElement_HTMLBaseFontElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLBGSoundElement() throws Exception { test("HTMLElement", "HTMLBGSoundElement"); } @@ -410,7 +410,7 @@ public void _HTMLElement_HTMLBGSoundElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLBlockElement() throws Exception { test("HTMLElement", "HTMLBlockElement"); } @@ -419,7 +419,7 @@ public void _HTMLElement_HTMLBlockElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLBodyElement() throws Exception { test("HTMLElement", "HTMLBodyElement"); } @@ -428,7 +428,7 @@ public void _HTMLElement_HTMLBodyElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLBRElement() throws Exception { test("HTMLElement", "HTMLBRElement"); } @@ -437,7 +437,7 @@ public void _HTMLElement_HTMLBRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLButtonElement() throws Exception { test("HTMLElement", "HTMLButtonElement"); } @@ -446,7 +446,7 @@ public void _HTMLElement_HTMLButtonElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLCanvasElement() throws Exception { test("HTMLElement", "HTMLCanvasElement"); } @@ -455,7 +455,7 @@ public void _HTMLElement_HTMLCanvasElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLDataElement() throws Exception { test("HTMLElement", "HTMLDataElement"); } @@ -464,7 +464,7 @@ public void _HTMLElement_HTMLDataElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLDataListElement() throws Exception { test("HTMLElement", "HTMLDataListElement"); } @@ -473,7 +473,7 @@ public void _HTMLElement_HTMLDataListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLDDElement() throws Exception { test("HTMLElement", "HTMLDDElement"); } @@ -482,7 +482,7 @@ public void _HTMLElement_HTMLDDElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLDetailsElement() throws Exception { test("HTMLElement", "HTMLDetailsElement"); } @@ -491,7 +491,7 @@ public void _HTMLElement_HTMLDetailsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLDialogElement() throws Exception { test("HTMLElement", "HTMLDialogElement"); } @@ -500,7 +500,7 @@ public void _HTMLElement_HTMLDialogElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLDirectoryElement() throws Exception { test("HTMLElement", "HTMLDirectoryElement"); } @@ -509,7 +509,7 @@ public void _HTMLElement_HTMLDirectoryElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLDivElement() throws Exception { test("HTMLElement", "HTMLDivElement"); } @@ -518,7 +518,7 @@ public void _HTMLElement_HTMLDivElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLDListElement() throws Exception { test("HTMLElement", "HTMLDListElement"); } @@ -527,7 +527,7 @@ public void _HTMLElement_HTMLDListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLDTElement() throws Exception { test("HTMLElement", "HTMLDTElement"); } @@ -536,7 +536,7 @@ public void _HTMLElement_HTMLDTElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLElement_HTMLElement() throws Exception { test("HTMLElement", "HTMLElement"); } @@ -545,7 +545,7 @@ public void _HTMLElement_HTMLElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLEmbedElement() throws Exception { test("HTMLElement", "HTMLEmbedElement"); } @@ -554,7 +554,7 @@ public void _HTMLElement_HTMLEmbedElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLFieldSetElement() throws Exception { test("HTMLElement", "HTMLFieldSetElement"); } @@ -563,7 +563,7 @@ public void _HTMLElement_HTMLFieldSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLFontElement() throws Exception { test("HTMLElement", "HTMLFontElement"); } @@ -572,7 +572,7 @@ public void _HTMLElement_HTMLFontElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLFormElement() throws Exception { test("HTMLElement", "HTMLFormElement"); } @@ -581,7 +581,7 @@ public void _HTMLElement_HTMLFormElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLFrameElement() throws Exception { test("HTMLElement", "HTMLFrameElement"); } @@ -590,7 +590,7 @@ public void _HTMLElement_HTMLFrameElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLFrameSetElement() throws Exception { test("HTMLElement", "HTMLFrameSetElement"); } @@ -599,7 +599,7 @@ public void _HTMLElement_HTMLFrameSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLHeadElement() throws Exception { test("HTMLElement", "HTMLHeadElement"); } @@ -608,7 +608,7 @@ public void _HTMLElement_HTMLHeadElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLHeadingElement() throws Exception { test("HTMLElement", "HTMLHeadingElement"); } @@ -617,7 +617,7 @@ public void _HTMLElement_HTMLHeadingElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLHRElement() throws Exception { test("HTMLElement", "HTMLHRElement"); } @@ -626,7 +626,7 @@ public void _HTMLElement_HTMLHRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLHtmlElement() throws Exception { test("HTMLElement", "HTMLHtmlElement"); } @@ -635,7 +635,7 @@ public void _HTMLElement_HTMLHtmlElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLIFrameElement() throws Exception { test("HTMLElement", "HTMLIFrameElement"); } @@ -644,7 +644,7 @@ public void _HTMLElement_HTMLIFrameElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLImageElement() throws Exception { test("HTMLElement", "HTMLImageElement"); } @@ -653,7 +653,7 @@ public void _HTMLElement_HTMLImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLInputElement() throws Exception { test("HTMLElement", "HTMLInputElement"); } @@ -662,7 +662,7 @@ public void _HTMLElement_HTMLInputElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLIsIndexElement() throws Exception { test("HTMLElement", "HTMLIsIndexElement"); } @@ -671,7 +671,7 @@ public void _HTMLElement_HTMLIsIndexElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLLabelElement() throws Exception { test("HTMLElement", "HTMLLabelElement"); } @@ -680,7 +680,7 @@ public void _HTMLElement_HTMLLabelElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLLegendElement() throws Exception { test("HTMLElement", "HTMLLegendElement"); } @@ -689,7 +689,7 @@ public void _HTMLElement_HTMLLegendElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLLIElement() throws Exception { test("HTMLElement", "HTMLLIElement"); } @@ -698,7 +698,7 @@ public void _HTMLElement_HTMLLIElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLLinkElement() throws Exception { test("HTMLElement", "HTMLLinkElement"); } @@ -707,7 +707,7 @@ public void _HTMLElement_HTMLLinkElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLMapElement() throws Exception { test("HTMLElement", "HTMLMapElement"); } @@ -716,7 +716,7 @@ public void _HTMLElement_HTMLMapElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLMarqueeElement() throws Exception { test("HTMLElement", "HTMLMarqueeElement"); } @@ -725,7 +725,7 @@ public void _HTMLElement_HTMLMarqueeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLMediaElement() throws Exception { test("HTMLElement", "HTMLMediaElement"); } @@ -734,7 +734,7 @@ public void _HTMLElement_HTMLMediaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLMenuElement() throws Exception { test("HTMLElement", "HTMLMenuElement"); } @@ -743,7 +743,7 @@ public void _HTMLElement_HTMLMenuElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLMenuItemElement() throws Exception { test("HTMLElement", "HTMLMenuItemElement"); } @@ -752,7 +752,7 @@ public void _HTMLElement_HTMLMenuItemElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLMetaElement() throws Exception { test("HTMLElement", "HTMLMetaElement"); } @@ -761,7 +761,7 @@ public void _HTMLElement_HTMLMetaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLMeterElement() throws Exception { test("HTMLElement", "HTMLMeterElement"); } @@ -770,7 +770,7 @@ public void _HTMLElement_HTMLMeterElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLModElement() throws Exception { test("HTMLElement", "HTMLModElement"); } @@ -779,7 +779,7 @@ public void _HTMLElement_HTMLModElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLNextIdElement() throws Exception { test("HTMLElement", "HTMLNextIdElement"); } @@ -788,7 +788,7 @@ public void _HTMLElement_HTMLNextIdElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLObjectElement() throws Exception { test("HTMLElement", "HTMLObjectElement"); } @@ -797,7 +797,7 @@ public void _HTMLElement_HTMLObjectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLOListElement() throws Exception { test("HTMLElement", "HTMLOListElement"); } @@ -806,7 +806,7 @@ public void _HTMLElement_HTMLOListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLOptGroupElement() throws Exception { test("HTMLElement", "HTMLOptGroupElement"); } @@ -815,7 +815,7 @@ public void _HTMLElement_HTMLOptGroupElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLOptionElement() throws Exception { test("HTMLElement", "HTMLOptionElement"); } @@ -824,7 +824,7 @@ public void _HTMLElement_HTMLOptionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLOutputElement() throws Exception { test("HTMLElement", "HTMLOutputElement"); } @@ -833,7 +833,7 @@ public void _HTMLElement_HTMLOutputElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLParagraphElement() throws Exception { test("HTMLElement", "HTMLParagraphElement"); } @@ -842,7 +842,7 @@ public void _HTMLElement_HTMLParagraphElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLParamElement() throws Exception { test("HTMLElement", "HTMLParamElement"); } @@ -851,7 +851,7 @@ public void _HTMLElement_HTMLParamElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLPhraseElement() throws Exception { test("HTMLElement", "HTMLPhraseElement"); } @@ -860,7 +860,7 @@ public void _HTMLElement_HTMLPhraseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLPictureElement() throws Exception { test("HTMLElement", "HTMLPictureElement"); } @@ -869,7 +869,7 @@ public void _HTMLElement_HTMLPictureElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLPreElement() throws Exception { test("HTMLElement", "HTMLPreElement"); } @@ -878,7 +878,7 @@ public void _HTMLElement_HTMLPreElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLProgressElement() throws Exception { test("HTMLElement", "HTMLProgressElement"); } @@ -887,7 +887,7 @@ public void _HTMLElement_HTMLProgressElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLQuoteElement() throws Exception { test("HTMLElement", "HTMLQuoteElement"); } @@ -896,7 +896,7 @@ public void _HTMLElement_HTMLQuoteElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLScriptElement() throws Exception { test("HTMLElement", "HTMLScriptElement"); } @@ -905,7 +905,7 @@ public void _HTMLElement_HTMLScriptElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLSelectElement() throws Exception { test("HTMLElement", "HTMLSelectElement"); } @@ -914,7 +914,7 @@ public void _HTMLElement_HTMLSelectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLSlotElement() throws Exception { test("HTMLElement", "HTMLSlotElement"); } @@ -923,7 +923,7 @@ public void _HTMLElement_HTMLSlotElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLSourceElement() throws Exception { test("HTMLElement", "HTMLSourceElement"); } @@ -932,7 +932,7 @@ public void _HTMLElement_HTMLSourceElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLSpanElement() throws Exception { test("HTMLElement", "HTMLSpanElement"); } @@ -941,7 +941,7 @@ public void _HTMLElement_HTMLSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLStyleElement() throws Exception { test("HTMLElement", "HTMLStyleElement"); } @@ -950,7 +950,7 @@ public void _HTMLElement_HTMLStyleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLTableCaptionElement() throws Exception { test("HTMLElement", "HTMLTableCaptionElement"); } @@ -959,7 +959,7 @@ public void _HTMLElement_HTMLTableCaptionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLTableCellElement() throws Exception { test("HTMLElement", "HTMLTableCellElement"); } @@ -968,7 +968,7 @@ public void _HTMLElement_HTMLTableCellElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLTableColElement() throws Exception { test("HTMLElement", "HTMLTableColElement"); } @@ -977,7 +977,7 @@ public void _HTMLElement_HTMLTableColElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLTableDataCellElement() throws Exception { test("HTMLElement", "HTMLTableDataCellElement"); } @@ -986,7 +986,7 @@ public void _HTMLElement_HTMLTableDataCellElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLTableElement() throws Exception { test("HTMLElement", "HTMLTableElement"); } @@ -995,7 +995,7 @@ public void _HTMLElement_HTMLTableElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLElement_HTMLTableHeaderCellElement() throws Exception { test("HTMLElement", "HTMLTableHeaderCellElement"); } @@ -1004,7 +1004,7 @@ public void _HTMLElement_HTMLTableHeaderCellElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLTableRowElement() throws Exception { test("HTMLElement", "HTMLTableRowElement"); } @@ -1013,7 +1013,7 @@ public void _HTMLElement_HTMLTableRowElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLTableSectionElement() throws Exception { test("HTMLElement", "HTMLTableSectionElement"); } @@ -1022,7 +1022,7 @@ public void _HTMLElement_HTMLTableSectionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLTemplateElement() throws Exception { test("HTMLElement", "HTMLTemplateElement"); } @@ -1031,7 +1031,7 @@ public void _HTMLElement_HTMLTemplateElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLTextAreaElement() throws Exception { test("HTMLElement", "HTMLTextAreaElement"); } @@ -1040,7 +1040,7 @@ public void _HTMLElement_HTMLTextAreaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLTimeElement() throws Exception { test("HTMLElement", "HTMLTimeElement"); } @@ -1049,7 +1049,7 @@ public void _HTMLElement_HTMLTimeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLTitleElement() throws Exception { test("HTMLElement", "HTMLTitleElement"); } @@ -1058,7 +1058,7 @@ public void _HTMLElement_HTMLTitleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLTrackElement() throws Exception { test("HTMLElement", "HTMLTrackElement"); } @@ -1067,7 +1067,7 @@ public void _HTMLElement_HTMLTrackElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLUListElement() throws Exception { test("HTMLElement", "HTMLUListElement"); } @@ -1076,7 +1076,7 @@ public void _HTMLElement_HTMLUListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLElement_HTMLUnknownElement() throws Exception { test("HTMLElement", "HTMLUnknownElement"); } @@ -1085,7 +1085,7 @@ public void _HTMLElement_HTMLUnknownElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLElement_HTMLVideoElement() throws Exception { test("HTMLElement", "HTMLVideoElement"); } @@ -1094,7 +1094,7 @@ public void _HTMLElement_HTMLVideoElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLElement_Image() throws Exception { test("HTMLElement", "Image"); } @@ -1103,7 +1103,7 @@ public void _HTMLElement_Image() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLElement_Option() throws Exception { test("HTMLElement", "Option"); } @@ -1112,7 +1112,7 @@ public void _HTMLElement_Option() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLEmbedElement_HTMLEmbedElement() throws Exception { test("HTMLEmbedElement", "HTMLEmbedElement"); } @@ -1121,7 +1121,7 @@ public void _HTMLEmbedElement_HTMLEmbedElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLFieldSetElement_HTMLFieldSetElement() throws Exception { test("HTMLFieldSetElement", "HTMLFieldSetElement"); } @@ -1130,7 +1130,7 @@ public void _HTMLFieldSetElement_HTMLFieldSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLFontElement_HTMLFontElement() throws Exception { test("HTMLFontElement", "HTMLFontElement"); } @@ -1139,7 +1139,7 @@ public void _HTMLFontElement_HTMLFontElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLFormControlsCollection_HTMLFormControlsCollection() throws Exception { test("HTMLFormControlsCollection", "HTMLFormControlsCollection"); } @@ -1148,7 +1148,7 @@ public void _HTMLFormControlsCollection_HTMLFormControlsCollection() throws Exce * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLFormElement_HTMLFormElement() throws Exception { test("HTMLFormElement", "HTMLFormElement"); } @@ -1157,7 +1157,7 @@ public void _HTMLFormElement_HTMLFormElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLFrameElement_HTMLFrameElement() throws Exception { test("HTMLFrameElement", "HTMLFrameElement"); } @@ -1166,7 +1166,7 @@ public void _HTMLFrameElement_HTMLFrameElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLFrameSetElement_HTMLFrameSetElement() throws Exception { test("HTMLFrameSetElement", "HTMLFrameSetElement"); } @@ -1175,7 +1175,7 @@ public void _HTMLFrameSetElement_HTMLFrameSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLHeadElement_HTMLHeadElement() throws Exception { test("HTMLHeadElement", "HTMLHeadElement"); } @@ -1184,7 +1184,7 @@ public void _HTMLHeadElement_HTMLHeadElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLHeadingElement_HTMLHeadingElement() throws Exception { test("HTMLHeadingElement", "HTMLHeadingElement"); } @@ -1193,7 +1193,7 @@ public void _HTMLHeadingElement_HTMLHeadingElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLHRElement_HTMLHRElement() throws Exception { test("HTMLHRElement", "HTMLHRElement"); } @@ -1202,7 +1202,7 @@ public void _HTMLHRElement_HTMLHRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLHtmlElement_HTMLHtmlElement() throws Exception { test("HTMLHtmlElement", "HTMLHtmlElement"); } @@ -1211,7 +1211,7 @@ public void _HTMLHtmlElement_HTMLHtmlElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLIFrameElement_HTMLIFrameElement() throws Exception { test("HTMLIFrameElement", "HTMLIFrameElement"); } @@ -1220,7 +1220,7 @@ public void _HTMLIFrameElement_HTMLIFrameElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLImageElement_HTMLImageElement() throws Exception { test("HTMLImageElement", "HTMLImageElement"); } @@ -1229,7 +1229,7 @@ public void _HTMLImageElement_HTMLImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLImageElement_Image() throws Exception { //although Image != HTMLImageElement, they seem to be synonyms!!! test("HTMLImageElement", "Image"); @@ -1239,7 +1239,7 @@ public void _HTMLImageElement_Image() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLInputElement_HTMLInputElement() throws Exception { test("HTMLInputElement", "HTMLInputElement"); } @@ -1248,7 +1248,7 @@ public void _HTMLInputElement_HTMLInputElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLIsIndexElement_HTMLIsIndexElement() throws Exception { test("HTMLIsIndexElement", "HTMLIsIndexElement"); } @@ -1257,7 +1257,7 @@ public void _HTMLIsIndexElement_HTMLIsIndexElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLLabelElement_HTMLLabelElement() throws Exception { test("HTMLLabelElement", "HTMLLabelElement"); } @@ -1266,7 +1266,7 @@ public void _HTMLLabelElement_HTMLLabelElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLLegendElement_HTMLLegendElement() throws Exception { test("HTMLLegendElement", "HTMLLegendElement"); } @@ -1275,7 +1275,7 @@ public void _HTMLLegendElement_HTMLLegendElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLLIElement_HTMLLIElement() throws Exception { test("HTMLLIElement", "HTMLLIElement"); } @@ -1284,7 +1284,7 @@ public void _HTMLLIElement_HTMLLIElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLLinkElement_HTMLLinkElement() throws Exception { test("HTMLLinkElement", "HTMLLinkElement"); } @@ -1293,7 +1293,7 @@ public void _HTMLLinkElement_HTMLLinkElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLMapElement_HTMLMapElement() throws Exception { test("HTMLMapElement", "HTMLMapElement"); } @@ -1302,7 +1302,7 @@ public void _HTMLMapElement_HTMLMapElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLMarqueeElement_HTMLMarqueeElement() throws Exception { test("HTMLMarqueeElement", "HTMLMarqueeElement"); } @@ -1311,7 +1311,7 @@ public void _HTMLMarqueeElement_HTMLMarqueeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLMediaElement_Audio() throws Exception { test("HTMLMediaElement", "Audio"); } @@ -1320,7 +1320,7 @@ public void _HTMLMediaElement_Audio() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLMediaElement_HTMLAudioElement() throws Exception { test("HTMLMediaElement", "HTMLAudioElement"); } @@ -1329,7 +1329,7 @@ public void _HTMLMediaElement_HTMLAudioElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLMediaElement_HTMLMediaElement() throws Exception { test("HTMLMediaElement", "HTMLMediaElement"); } @@ -1338,7 +1338,7 @@ public void _HTMLMediaElement_HTMLMediaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _HTMLMediaElement_HTMLVideoElement() throws Exception { test("HTMLMediaElement", "HTMLVideoElement"); } @@ -1347,7 +1347,7 @@ public void _HTMLMediaElement_HTMLVideoElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLMenuElement_HTMLMenuElement() throws Exception { test("HTMLMenuElement", "HTMLMenuElement"); } @@ -1356,7 +1356,7 @@ public void _HTMLMenuElement_HTMLMenuElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLMenuItemElement_HTMLMenuItemElement() throws Exception { test("HTMLMenuItemElement", "HTMLMenuItemElement"); } @@ -1365,7 +1365,7 @@ public void _HTMLMenuItemElement_HTMLMenuItemElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLMetaElement_HTMLMetaElement() throws Exception { test("HTMLMetaElement", "HTMLMetaElement"); } @@ -1374,7 +1374,7 @@ public void _HTMLMetaElement_HTMLMetaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLMeterElement_HTMLMeterElement() throws Exception { test("HTMLMeterElement", "HTMLMeterElement"); } @@ -1383,7 +1383,7 @@ public void _HTMLMeterElement_HTMLMeterElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLModElement_HTMLModElement() throws Exception { test("HTMLModElement", "HTMLModElement"); } @@ -1392,7 +1392,7 @@ public void _HTMLModElement_HTMLModElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLNextIdElement_HTMLNextIdElement() throws Exception { test("HTMLNextIdElement", "HTMLNextIdElement"); } @@ -1401,7 +1401,7 @@ public void _HTMLNextIdElement_HTMLNextIdElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLObjectElement_HTMLObjectElement() throws Exception { test("HTMLObjectElement", "HTMLObjectElement"); } @@ -1410,7 +1410,7 @@ public void _HTMLObjectElement_HTMLObjectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLOListElement_HTMLOListElement() throws Exception { test("HTMLOListElement", "HTMLOListElement"); } @@ -1419,7 +1419,7 @@ public void _HTMLOListElement_HTMLOListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLOptGroupElement_HTMLOptGroupElement() throws Exception { test("HTMLOptGroupElement", "HTMLOptGroupElement"); } @@ -1428,7 +1428,7 @@ public void _HTMLOptGroupElement_HTMLOptGroupElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLOptionElement_HTMLOptionElement() throws Exception { test("HTMLOptionElement", "HTMLOptionElement"); } @@ -1437,7 +1437,7 @@ public void _HTMLOptionElement_HTMLOptionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLOptionElement_Option() throws Exception { //although Option != HTMLOptionElement, they seem to be synonyms!!! test("HTMLOptionElement", "Option"); @@ -1447,7 +1447,7 @@ public void _HTMLOptionElement_Option() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLOptionsCollection_HTMLOptionsCollection() throws Exception { test("HTMLOptionsCollection", "HTMLOptionsCollection"); } @@ -1456,7 +1456,7 @@ public void _HTMLOptionsCollection_HTMLOptionsCollection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLOutputElement_HTMLOutputElement() throws Exception { test("HTMLOutputElement", "HTMLOutputElement"); } @@ -1465,7 +1465,7 @@ public void _HTMLOutputElement_HTMLOutputElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLParagraphElement_HTMLParagraphElement() throws Exception { test("HTMLParagraphElement", "HTMLParagraphElement"); } @@ -1474,7 +1474,7 @@ public void _HTMLParagraphElement_HTMLParagraphElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLParamElement_HTMLParamElement() throws Exception { test("HTMLParamElement", "HTMLParamElement"); } @@ -1483,7 +1483,7 @@ public void _HTMLParamElement_HTMLParamElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLPhraseElement_HTMLPhraseElement() throws Exception { test("HTMLPhraseElement", "HTMLPhraseElement"); } @@ -1492,7 +1492,7 @@ public void _HTMLPhraseElement_HTMLPhraseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLPictureElement_HTMLPictureElement() throws Exception { test("HTMLPictureElement", "HTMLPictureElement"); } @@ -1501,7 +1501,7 @@ public void _HTMLPictureElement_HTMLPictureElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLPreElement_HTMLPreElement() throws Exception { test("HTMLPreElement", "HTMLPreElement"); } @@ -1510,7 +1510,7 @@ public void _HTMLPreElement_HTMLPreElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLProgressElement_HTMLProgressElement() throws Exception { test("HTMLProgressElement", "HTMLProgressElement"); } @@ -1519,7 +1519,7 @@ public void _HTMLProgressElement_HTMLProgressElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLQuoteElement_HTMLQuoteElement() throws Exception { test("HTMLQuoteElement", "HTMLQuoteElement"); } @@ -1528,7 +1528,7 @@ public void _HTMLQuoteElement_HTMLQuoteElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLScriptElement_HTMLScriptElement() throws Exception { test("HTMLScriptElement", "HTMLScriptElement"); } @@ -1537,7 +1537,7 @@ public void _HTMLScriptElement_HTMLScriptElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLSelectElement_HTMLSelectElement() throws Exception { test("HTMLSelectElement", "HTMLSelectElement"); } @@ -1546,7 +1546,7 @@ public void _HTMLSelectElement_HTMLSelectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLSlotElement_HTMLSlotElement() throws Exception { test("HTMLSlotElement", "HTMLSlotElement"); } @@ -1555,7 +1555,7 @@ public void _HTMLSlotElement_HTMLSlotElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLSourceElement_HTMLSourceElement() throws Exception { test("HTMLSourceElement", "HTMLSourceElement"); } @@ -1564,7 +1564,7 @@ public void _HTMLSourceElement_HTMLSourceElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLSpanElement_HTMLSpanElement() throws Exception { test("HTMLSpanElement", "HTMLSpanElement"); } @@ -1573,7 +1573,7 @@ public void _HTMLSpanElement_HTMLSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLStyleElement_HTMLStyleElement() throws Exception { test("HTMLStyleElement", "HTMLStyleElement"); } @@ -1582,7 +1582,7 @@ public void _HTMLStyleElement_HTMLStyleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLTableCaptionElement_HTMLTableCaptionElement() throws Exception { test("HTMLTableCaptionElement", "HTMLTableCaptionElement"); } @@ -1591,7 +1591,7 @@ public void _HTMLTableCaptionElement_HTMLTableCaptionElement() throws Exception * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLTableCellElement_HTMLTableCellElement() throws Exception { test("HTMLTableCellElement", "HTMLTableCellElement"); } @@ -1600,7 +1600,7 @@ public void _HTMLTableCellElement_HTMLTableCellElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLTableCellElement_HTMLTableDataCellElement() throws Exception { test("HTMLTableCellElement", "HTMLTableDataCellElement"); } @@ -1609,7 +1609,7 @@ public void _HTMLTableCellElement_HTMLTableDataCellElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLTableCellElement_HTMLTableHeaderCellElement() throws Exception { test("HTMLTableCellElement", "HTMLTableHeaderCellElement"); } @@ -1618,7 +1618,7 @@ public void _HTMLTableCellElement_HTMLTableHeaderCellElement() throws Exception * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLTableColElement_HTMLTableColElement() throws Exception { test("HTMLTableColElement", "HTMLTableColElement"); } @@ -1627,7 +1627,7 @@ public void _HTMLTableColElement_HTMLTableColElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLTableDataCellElement_HTMLTableDataCellElement() throws Exception { test("HTMLTableDataCellElement", "HTMLTableDataCellElement"); } @@ -1636,7 +1636,7 @@ public void _HTMLTableDataCellElement_HTMLTableDataCellElement() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLTableElement_HTMLTableElement() throws Exception { test("HTMLTableElement", "HTMLTableElement"); } @@ -1645,7 +1645,7 @@ public void _HTMLTableElement_HTMLTableElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _HTMLTableHeaderCellElement_HTMLTableHeaderCellElement() throws Exception { test("HTMLTableHeaderCellElement", "HTMLTableHeaderCellElement"); } @@ -1654,7 +1654,7 @@ public void _HTMLTableHeaderCellElement_HTMLTableHeaderCellElement() throws Exce * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLTableRowElement_HTMLTableRowElement() throws Exception { test("HTMLTableRowElement", "HTMLTableRowElement"); } @@ -1663,7 +1663,7 @@ public void _HTMLTableRowElement_HTMLTableRowElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLTableSectionElement_HTMLTableSectionElement() throws Exception { test("HTMLTableSectionElement", "HTMLTableSectionElement"); } @@ -1672,7 +1672,7 @@ public void _HTMLTableSectionElement_HTMLTableSectionElement() throws Exception * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLTemplateElement_HTMLTemplateElement() throws Exception { test("HTMLTemplateElement", "HTMLTemplateElement"); } @@ -1681,7 +1681,7 @@ public void _HTMLTemplateElement_HTMLTemplateElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLTextAreaElement_HTMLTextAreaElement() throws Exception { test("HTMLTextAreaElement", "HTMLTextAreaElement"); } @@ -1690,7 +1690,7 @@ public void _HTMLTextAreaElement_HTMLTextAreaElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLTimeElement_HTMLTimeElement() throws Exception { test("HTMLTimeElement", "HTMLTimeElement"); } @@ -1699,7 +1699,7 @@ public void _HTMLTimeElement_HTMLTimeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLTitleElement_HTMLTitleElement() throws Exception { test("HTMLTitleElement", "HTMLTitleElement"); } @@ -1708,7 +1708,7 @@ public void _HTMLTitleElement_HTMLTitleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLTrackElement_HTMLTrackElement() throws Exception { test("HTMLTrackElement", "HTMLTrackElement"); } @@ -1717,7 +1717,7 @@ public void _HTMLTrackElement_HTMLTrackElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLUListElement_HTMLUListElement() throws Exception { test("HTMLUListElement", "HTMLUListElement"); } @@ -1726,7 +1726,7 @@ public void _HTMLUListElement_HTMLUListElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLUnknownElement_HTMLUnknownElement() throws Exception { test("HTMLUnknownElement", "HTMLUnknownElement"); } @@ -1735,7 +1735,7 @@ public void _HTMLUnknownElement_HTMLUnknownElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _HTMLVideoElement_HTMLVideoElement() throws Exception { test("HTMLVideoElement", "HTMLVideoElement"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfITest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfITest.java index 2046de55e75..ce431b3ecad 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfITest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfITest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -53,7 +53,7 @@ public static Collection data() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IDBCursor_IDBCursor() throws Exception { test("IDBCursor", "IDBCursor"); } @@ -63,7 +63,7 @@ public void _IDBCursor_IDBCursor() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _IDBCursor_IDBCursorWithValue() throws Exception { test("IDBCursor", "IDBCursorWithValue"); } @@ -73,7 +73,7 @@ public void _IDBCursor_IDBCursorWithValue() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IDBCursorWithValue_IDBCursorWithValue() throws Exception { test("IDBCursorWithValue", "IDBCursorWithValue"); } @@ -83,7 +83,7 @@ public void _IDBCursorWithValue_IDBCursorWithValue() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IDBDatabase_IDBDatabase() throws Exception { test("IDBDatabase", "IDBDatabase"); } @@ -93,7 +93,7 @@ public void _IDBDatabase_IDBDatabase() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IDBFactory_IDBFactory() throws Exception { test("IDBFactory", "IDBFactory"); } @@ -103,7 +103,7 @@ public void _IDBFactory_IDBFactory() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IDBIndex_IDBIndex() throws Exception { test("IDBIndex", "IDBIndex"); } @@ -113,7 +113,7 @@ public void _IDBIndex_IDBIndex() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IDBKeyRange_IDBKeyRange() throws Exception { test("IDBKeyRange", "IDBKeyRange"); } @@ -122,7 +122,7 @@ public void _IDBKeyRange_IDBKeyRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _IDBMutableFile_IDBMutableFile() throws Exception { test("IDBMutableFile", "IDBMutableFile"); } @@ -132,7 +132,7 @@ public void _IDBMutableFile_IDBMutableFile() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IDBObjectStore_IDBObjectStore() throws Exception { test("IDBObjectStore", "IDBObjectStore"); } @@ -142,7 +142,7 @@ public void _IDBObjectStore_IDBObjectStore() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IDBOpenDBRequest_IDBOpenDBRequest() throws Exception { test("IDBOpenDBRequest", "IDBOpenDBRequest"); } @@ -152,7 +152,7 @@ public void _IDBOpenDBRequest_IDBOpenDBRequest() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _IDBRequest_IDBOpenDBRequest() throws Exception { test("IDBRequest", "IDBOpenDBRequest"); } @@ -162,7 +162,7 @@ public void _IDBRequest_IDBOpenDBRequest() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IDBRequest_IDBRequest() throws Exception { test("IDBRequest", "IDBRequest"); } @@ -172,7 +172,7 @@ public void _IDBRequest_IDBRequest() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IDBTransaction_IDBTransaction() throws Exception { test("IDBTransaction", "IDBTransaction"); } @@ -182,7 +182,7 @@ public void _IDBTransaction_IDBTransaction() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IDBVersionChangeEvent_IDBVersionChangeEvent() throws Exception { test("IDBVersionChangeEvent", "IDBVersionChangeEvent"); } @@ -191,7 +191,7 @@ public void _IDBVersionChangeEvent_IDBVersionChangeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IdleDeadline_IdleDeadline() throws Exception { test("IdleDeadline", "IdleDeadline"); } @@ -200,7 +200,7 @@ public void _IdleDeadline_IdleDeadline() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IIRFilterNode_IIRFilterNode() throws Exception { test("IIRFilterNode", "IIRFilterNode"); } @@ -210,7 +210,7 @@ public void _IIRFilterNode_IIRFilterNode() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Image_HTMLImageElement() throws Exception { // although Image != HTMLImageElement, they seem to be synonyms!!! test("Image", "HTMLImageElement"); @@ -221,7 +221,7 @@ public void _Image_HTMLImageElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Image_Image() throws Exception { test("Image", "Image"); } @@ -231,7 +231,7 @@ public void _Image_Image() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ImageBitmap_ImageBitmap() throws Exception { test("ImageBitmap", "ImageBitmap"); } @@ -240,7 +240,7 @@ public void _ImageBitmap_ImageBitmap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ImageBitmapRenderingContext_ImageBitmapRenderingContext() throws Exception { test("ImageBitmapRenderingContext", "ImageBitmapRenderingContext"); } @@ -250,7 +250,7 @@ public void _ImageBitmapRenderingContext_ImageBitmapRenderingContext() throws Ex * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ImageData_ImageData() throws Exception { test("ImageData", "ImageData"); } @@ -259,9 +259,9 @@ public void _ImageData_ImageData() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _InputDeviceCapabilities_InputDeviceCapabilities() throws Exception { test("InputDeviceCapabilities", "InputDeviceCapabilities"); } @@ -271,7 +271,7 @@ public void _InputDeviceCapabilities_InputDeviceCapabilities() throws Exception * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _InputEvent_InputEvent() throws Exception { test("InputEvent", "InputEvent"); } @@ -280,7 +280,7 @@ public void _InputEvent_InputEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _InstallTrigger_InstallTrigger() throws Exception { test("InstallTrigger", "InstallTrigger"); } @@ -290,7 +290,7 @@ public void _InstallTrigger_InstallTrigger() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Int16Array_Int16Array() throws Exception { test("Int16Array", "Int16Array"); } @@ -300,7 +300,7 @@ public void _Int16Array_Int16Array() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Int32Array_Int32Array() throws Exception { test("Int32Array", "Int32Array"); } @@ -310,7 +310,7 @@ public void _Int32Array_Int32Array() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Int8Array_Int8Array() throws Exception { test("Int8Array", "Int8Array"); } @@ -319,7 +319,7 @@ public void _Int8Array_Int8Array() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IntersectionObserver_IntersectionObserver() throws Exception { test("IntersectionObserver", "IntersectionObserver"); } @@ -328,7 +328,7 @@ public void _IntersectionObserver_IntersectionObserver() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _IntersectionObserverEntry_IntersectionObserverEntry() throws Exception { test("IntersectionObserverEntry", "IntersectionObserverEntry"); } @@ -338,7 +338,7 @@ public void _IntersectionObserverEntry_IntersectionObserverEntry() throws Except * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _KeyboardEvent_KeyboardEvent() throws Exception { test("KeyboardEvent", "KeyboardEvent"); } @@ -348,7 +348,7 @@ public void _KeyboardEvent_KeyboardEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _KeyframeEffect_KeyframeEffect() throws Exception { test("KeyframeEffect", "KeyframeEffect"); } @@ -358,7 +358,7 @@ public void _KeyframeEffect_KeyframeEffect() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _LocalMediaStream_LocalMediaStream() throws Exception { test("LocalMediaStream", "LocalMediaStream"); } @@ -368,7 +368,7 @@ public void _LocalMediaStream_LocalMediaStream() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Location_Location() throws Exception { test("Location", "Location"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfMTest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfMTest.java index bdfe2faa99e..78974cbb741 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfMTest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfMTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -53,7 +53,7 @@ public static Collection data() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MIDIAccess_MIDIAccess() throws Exception { test("MIDIAccess", "MIDIAccess"); } @@ -63,7 +63,7 @@ public void _MIDIAccess_MIDIAccess() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MIDIConnectionEvent_MIDIConnectionEvent() throws Exception { test("MIDIConnectionEvent", "MIDIConnectionEvent"); } @@ -73,7 +73,7 @@ public void _MIDIConnectionEvent_MIDIConnectionEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MIDIInputMap_MIDIInputMap() throws Exception { test("MIDIInputMap", "MIDIInputMap"); } @@ -83,7 +83,7 @@ public void _MIDIInputMap_MIDIInputMap() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MIDIInput_MIDIInput() throws Exception { test("MIDIInput", "MIDIInput"); } @@ -93,7 +93,7 @@ public void _MIDIInput_MIDIInput() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MIDIMessageEvent_MIDIMessageEvent() throws Exception { test("MIDIMessageEvent", "MIDIMessageEvent"); } @@ -103,7 +103,7 @@ public void _MIDIMessageEvent_MIDIMessageEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MIDIOutputMap_MIDIOutputMap() throws Exception { test("MIDIOutputMap", "MIDIOutputMap"); } @@ -113,7 +113,7 @@ public void _MIDIOutputMap_MIDIOutputMap() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MIDIOutput_MIDIOutput() throws Exception { test("MIDIOutput", "MIDIOutput"); } @@ -123,7 +123,7 @@ public void _MIDIOutput_MIDIOutput() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _MIDIPort_MIDIInput() throws Exception { test("MIDIPort", "MIDIInput"); } @@ -133,7 +133,7 @@ public void _MIDIPort_MIDIInput() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _MIDIPort_MIDIOutput() throws Exception { test("MIDIPort", "MIDIOutput"); } @@ -143,7 +143,7 @@ public void _MIDIPort_MIDIOutput() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MIDIPort_MIDIPort() throws Exception { test("MIDIPort", "MIDIPort"); } @@ -153,7 +153,7 @@ public void _MIDIPort_MIDIPort() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaDeviceInfo_MediaDeviceInfo() throws Exception { test("MediaDeviceInfo", "MediaDeviceInfo"); } @@ -163,7 +163,7 @@ public void _MediaDeviceInfo_MediaDeviceInfo() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaDevices_MediaDevices() throws Exception { test("MediaDevices", "MediaDevices"); } @@ -173,7 +173,7 @@ public void _MediaDevices_MediaDevices() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaElementAudioSourceNode_MediaElementAudioSourceNode() throws Exception { test("MediaElementAudioSourceNode", "MediaElementAudioSourceNode"); } @@ -183,7 +183,7 @@ public void _MediaElementAudioSourceNode_MediaElementAudioSourceNode() throws Ex * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaEncryptedEvent_MediaEncryptedEvent() throws Exception { test("MediaEncryptedEvent", "MediaEncryptedEvent"); } @@ -193,7 +193,7 @@ public void _MediaEncryptedEvent_MediaEncryptedEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaError_MediaError() throws Exception { test("MediaError", "MediaError"); } @@ -203,9 +203,9 @@ public void _MediaError_MediaError() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _MediaKeyError_MediaKeyError() throws Exception { test("MediaKeyError", "MediaKeyError"); } @@ -215,7 +215,7 @@ public void _MediaKeyError_MediaKeyError() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaKeyMessageEvent_MediaKeyMessageEvent() throws Exception { test("MediaKeyMessageEvent", "MediaKeyMessageEvent"); } @@ -225,7 +225,7 @@ public void _MediaKeyMessageEvent_MediaKeyMessageEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaKeySession_MediaKeySession() throws Exception { test("MediaKeySession", "MediaKeySession"); } @@ -235,7 +235,7 @@ public void _MediaKeySession_MediaKeySession() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaKeyStatusMap_MediaKeyStatusMap() throws Exception { test("MediaKeyStatusMap", "MediaKeyStatusMap"); } @@ -245,7 +245,7 @@ public void _MediaKeyStatusMap_MediaKeyStatusMap() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaKeySystemAccess_MediaKeySystemAccess() throws Exception { test("MediaKeySystemAccess", "MediaKeySystemAccess"); } @@ -255,7 +255,7 @@ public void _MediaKeySystemAccess_MediaKeySystemAccess() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaKeys_MediaKeys() throws Exception { test("MediaKeys", "MediaKeys"); } @@ -265,7 +265,7 @@ public void _MediaKeys_MediaKeys() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaList_MediaList() throws Exception { test("MediaList", "MediaList"); } @@ -275,7 +275,7 @@ public void _MediaList_MediaList() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaQueryListEvent_MediaQueryListEvent() throws Exception { test("MediaQueryListEvent", "MediaQueryListEvent"); } @@ -285,7 +285,7 @@ public void _MediaQueryListEvent_MediaQueryListEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaQueryList_MediaQueryList() throws Exception { test("MediaQueryList", "MediaQueryList"); } @@ -295,7 +295,7 @@ public void _MediaQueryList_MediaQueryList() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaRecorder_MediaRecorder() throws Exception { test("MediaRecorder", "MediaRecorder"); } @@ -305,7 +305,7 @@ public void _MediaRecorder_MediaRecorder() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaSource_MediaSource() throws Exception { test("MediaSource", "MediaSource"); } @@ -315,7 +315,7 @@ public void _MediaSource_MediaSource() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaStreamAudioDestinationNode_MediaStreamAudioDestinationNode() throws Exception { test("MediaStreamAudioDestinationNode", "MediaStreamAudioDestinationNode"); } @@ -325,7 +325,7 @@ public void _MediaStreamAudioDestinationNode_MediaStreamAudioDestinationNode() t * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaStreamAudioSourceNode_MediaStreamAudioSourceNode() throws Exception { test("MediaStreamAudioSourceNode", "MediaStreamAudioSourceNode"); } @@ -335,7 +335,7 @@ public void _MediaStreamAudioSourceNode_MediaStreamAudioSourceNode() throws Exce * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaStreamEvent_MediaStreamEvent() throws Exception { test("MediaStreamEvent", "MediaStreamEvent"); } @@ -345,7 +345,7 @@ public void _MediaStreamEvent_MediaStreamEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaStreamTrackEvent_MediaStreamTrackEvent() throws Exception { test("MediaStreamTrackEvent", "MediaStreamTrackEvent"); } @@ -355,9 +355,9 @@ public void _MediaStreamTrackEvent_MediaStreamTrackEvent() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "true", - FF = "false", - FF_ESR = "false") + @Alerts(DEFAULT = "true/true", + FF = "false/false", + FF_ESR = "false/false") public void _MediaStreamTrack_CanvasCaptureMediaStreamTrack() throws Exception { test("MediaStreamTrack", "CanvasCaptureMediaStreamTrack"); } @@ -367,7 +367,7 @@ public void _MediaStreamTrack_CanvasCaptureMediaStreamTrack() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaStreamTrack_MediaStreamTrack() throws Exception { test("MediaStreamTrack", "MediaStreamTrack"); } @@ -377,7 +377,7 @@ public void _MediaStreamTrack_MediaStreamTrack() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MediaStream_MediaStream() throws Exception { test("MediaStream", "MediaStream"); } @@ -387,9 +387,9 @@ public void _MediaStream_MediaStream() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/true", + FF_ESR = "true/true") public void _MediaStream_CanvasCaptureMediaStream() throws Exception { test("MediaStream", "CanvasCaptureMediaStream"); } @@ -399,9 +399,9 @@ public void _MediaStream_CanvasCaptureMediaStream() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "true", - FF = "false", - FF_ESR = "false") + @Alerts(DEFAULT = "true/false", + FF = "false/false", + FF_ESR = "false/false") public void _MediaStream_webkitMediaStream() throws Exception { test("MediaStream", "webkitMediaStream"); } @@ -411,7 +411,7 @@ public void _MediaStream_webkitMediaStream() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MessageChannel_MessageChannel() throws Exception { test("MessageChannel", "MessageChannel"); } @@ -421,7 +421,7 @@ public void _MessageChannel_MessageChannel() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MessageEvent_MessageEvent() throws Exception { test("MessageEvent", "MessageEvent"); } @@ -431,7 +431,7 @@ public void _MessageEvent_MessageEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MessagePort_MessagePort() throws Exception { test("MessagePort", "MessagePort"); } @@ -441,7 +441,7 @@ public void _MessagePort_MessagePort() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MimeTypeArray_MimeTypeArray() throws Exception { test("MimeTypeArray", "MimeTypeArray"); } @@ -451,7 +451,7 @@ public void _MimeTypeArray_MimeTypeArray() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MimeType_MimeType() throws Exception { test("MimeType", "MimeType"); } @@ -461,7 +461,7 @@ public void _MimeType_MimeType() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _MouseEvent_DragEvent() throws Exception { test("MouseEvent", "DragEvent"); } @@ -471,7 +471,7 @@ public void _MouseEvent_DragEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MouseEvent_MouseEvent() throws Exception { test("MouseEvent", "MouseEvent"); } @@ -481,9 +481,9 @@ public void _MouseEvent_MouseEvent() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/true", + FF_ESR = "true/true") public void _MouseEvent_MouseScrollEvent() throws Exception { test("MouseEvent", "MouseScrollEvent"); } @@ -493,7 +493,7 @@ public void _MouseEvent_MouseScrollEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _MouseEvent_PointerEvent() throws Exception { test("MouseEvent", "PointerEvent"); } @@ -503,7 +503,7 @@ public void _MouseEvent_PointerEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _MouseEvent_WheelEvent() throws Exception { test("MouseEvent", "WheelEvent"); } @@ -513,9 +513,9 @@ public void _MouseEvent_WheelEvent() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _MouseScrollEvent_MouseScrollEvent() throws Exception { test("MouseScrollEvent", "MouseScrollEvent"); } @@ -525,9 +525,9 @@ public void _MouseScrollEvent_MouseScrollEvent() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _MutationEvent_MutationEvent() throws Exception { test("MutationEvent", "MutationEvent"); } @@ -537,7 +537,7 @@ public void _MutationEvent_MutationEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MutationObserver_MutationObserver() throws Exception { test("MutationObserver", "MutationObserver"); } @@ -547,9 +547,9 @@ public void _MutationObserver_MutationObserver() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "true", - FF = "false", - FF_ESR = "false") + @Alerts(DEFAULT = "true/false", + FF = "false/false", + FF_ESR = "false/false") public void _MutationObserver_WebKitMutationObserver() throws Exception { test("MutationObserver", "WebKitMutationObserver"); } @@ -559,7 +559,7 @@ public void _MutationObserver_WebKitMutationObserver() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _MutationRecord_MutationRecord() throws Exception { test("MutationRecord", "MutationRecord"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfNTest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfNTest.java index 568384ba250..57dc9f9d826 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfNTest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfNTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -54,7 +54,7 @@ public static Collection data() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _NamedNodeMap_NamedNodeMap() throws Exception { test("NamedNodeMap", "NamedNodeMap"); } @@ -64,7 +64,7 @@ public void _NamedNodeMap_NamedNodeMap() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Navigator_Navigator() throws Exception { test("Navigator", "Navigator"); } @@ -74,9 +74,9 @@ public void _Navigator_Navigator() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "true/false", + FF = "false/false", + FF_ESR = "false/false") public void _NetworkInformation_NetworkInformation() throws Exception { test("NetworkInformation", "NetworkInformation"); } @@ -86,7 +86,7 @@ public void _NetworkInformation_NetworkInformation() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Node_Attr() throws Exception { test("Node", "Attr"); } @@ -96,7 +96,7 @@ public void _Node_Attr() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_Audio() throws Exception { test("Node", "Audio"); } @@ -106,7 +106,7 @@ public void _Node_Audio() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_CDATASection() throws Exception { test("Node", "CDATASection"); } @@ -116,7 +116,7 @@ public void _Node_CDATASection() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Node_CharacterData() throws Exception { test("Node", "CharacterData"); } @@ -126,7 +126,7 @@ public void _Node_CharacterData() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_Comment() throws Exception { test("Node", "Comment"); } @@ -136,7 +136,7 @@ public void _Node_Comment() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Node_Document() throws Exception { test("Node", "Document"); } @@ -146,7 +146,7 @@ public void _Node_Document() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Node_DocumentFragment() throws Exception { test("Node", "DocumentFragment"); } @@ -156,7 +156,7 @@ public void _Node_DocumentFragment() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Node_DocumentType() throws Exception { test("Node", "DocumentType"); } @@ -166,7 +166,7 @@ public void _Node_DocumentType() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Node_Element() throws Exception { test("Node", "Element"); } @@ -176,7 +176,7 @@ public void _Node_Element() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLAnchorElement() throws Exception { test("Node", "HTMLAnchorElement"); } @@ -186,7 +186,7 @@ public void _Node_HTMLAnchorElement() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLAppletElement() throws Exception { test("Node", "HTMLAppletElement"); } @@ -196,7 +196,7 @@ public void _Node_HTMLAppletElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLAreaElement() throws Exception { test("Node", "HTMLAreaElement"); } @@ -206,7 +206,7 @@ public void _Node_HTMLAreaElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLAudioElement() throws Exception { test("Node", "HTMLAudioElement"); } @@ -216,7 +216,7 @@ public void _Node_HTMLAudioElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLBaseElement() throws Exception { test("Node", "HTMLBaseElement"); } @@ -226,7 +226,7 @@ public void _Node_HTMLBaseElement() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLBaseFontElement() throws Exception { test("Node", "HTMLBaseFontElement"); } @@ -236,7 +236,7 @@ public void _Node_HTMLBaseFontElement() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLBGSoundElement() throws Exception { test("Node", "HTMLBGSoundElement"); } @@ -246,7 +246,7 @@ public void _Node_HTMLBGSoundElement() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLBlockElement() throws Exception { test("Node", "HTMLBlockElement"); } @@ -256,7 +256,7 @@ public void _Node_HTMLBlockElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLBodyElement() throws Exception { test("Node", "HTMLBodyElement"); } @@ -266,7 +266,7 @@ public void _Node_HTMLBodyElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLBRElement() throws Exception { test("Node", "HTMLBRElement"); } @@ -276,7 +276,7 @@ public void _Node_HTMLBRElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLButtonElement() throws Exception { test("Node", "HTMLButtonElement"); } @@ -286,7 +286,7 @@ public void _Node_HTMLButtonElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLCanvasElement() throws Exception { test("Node", "HTMLCanvasElement"); } @@ -296,7 +296,7 @@ public void _Node_HTMLCanvasElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLDataElement() throws Exception { test("Node", "HTMLDataElement"); } @@ -306,7 +306,7 @@ public void _Node_HTMLDataElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLDataListElement() throws Exception { test("Node", "HTMLDataListElement"); } @@ -316,7 +316,7 @@ public void _Node_HTMLDataListElement() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLDDElement() throws Exception { test("Node", "HTMLDDElement"); } @@ -326,7 +326,7 @@ public void _Node_HTMLDDElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLDetailsElement() throws Exception { test("Node", "HTMLDetailsElement"); } @@ -336,7 +336,7 @@ public void _Node_HTMLDetailsElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLDialogElement() throws Exception { test("Node", "HTMLDialogElement"); } @@ -346,7 +346,7 @@ public void _Node_HTMLDialogElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLDirectoryElement() throws Exception { test("Node", "HTMLDirectoryElement"); } @@ -356,7 +356,7 @@ public void _Node_HTMLDirectoryElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLDivElement() throws Exception { test("Node", "HTMLDivElement"); } @@ -366,7 +366,7 @@ public void _Node_HTMLDivElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLDListElement() throws Exception { test("Node", "HTMLDListElement"); } @@ -376,7 +376,7 @@ public void _Node_HTMLDListElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLDocument() throws Exception { test("Node", "HTMLDocument"); } @@ -386,7 +386,7 @@ public void _Node_HTMLDocument() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLDTElement() throws Exception { test("Node", "HTMLDTElement"); } @@ -396,7 +396,7 @@ public void _Node_HTMLDTElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLElement() throws Exception { test("Node", "HTMLElement"); } @@ -406,7 +406,7 @@ public void _Node_HTMLElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLEmbedElement() throws Exception { test("Node", "HTMLEmbedElement"); } @@ -416,7 +416,7 @@ public void _Node_HTMLEmbedElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLFieldSetElement() throws Exception { test("Node", "HTMLFieldSetElement"); } @@ -426,7 +426,7 @@ public void _Node_HTMLFieldSetElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLFontElement() throws Exception { test("Node", "HTMLFontElement"); } @@ -436,7 +436,7 @@ public void _Node_HTMLFontElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLFormElement() throws Exception { test("Node", "HTMLFormElement"); } @@ -446,7 +446,7 @@ public void _Node_HTMLFormElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLFrameElement() throws Exception { test("Node", "HTMLFrameElement"); } @@ -456,7 +456,7 @@ public void _Node_HTMLFrameElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLFrameSetElement() throws Exception { test("Node", "HTMLFrameSetElement"); } @@ -466,7 +466,7 @@ public void _Node_HTMLFrameSetElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLHeadElement() throws Exception { test("Node", "HTMLHeadElement"); } @@ -476,7 +476,7 @@ public void _Node_HTMLHeadElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLHeadingElement() throws Exception { test("Node", "HTMLHeadingElement"); } @@ -486,7 +486,7 @@ public void _Node_HTMLHeadingElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLHRElement() throws Exception { test("Node", "HTMLHRElement"); } @@ -496,7 +496,7 @@ public void _Node_HTMLHRElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLHtmlElement() throws Exception { test("Node", "HTMLHtmlElement"); } @@ -506,7 +506,7 @@ public void _Node_HTMLHtmlElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLIFrameElement() throws Exception { test("Node", "HTMLIFrameElement"); } @@ -516,7 +516,7 @@ public void _Node_HTMLIFrameElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLImageElement() throws Exception { test("Node", "HTMLImageElement"); } @@ -526,7 +526,7 @@ public void _Node_HTMLImageElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLInputElement() throws Exception { test("Node", "HTMLInputElement"); } @@ -536,7 +536,7 @@ public void _Node_HTMLInputElement() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLIsIndexElement() throws Exception { test("Node", "HTMLIsIndexElement"); } @@ -546,7 +546,7 @@ public void _Node_HTMLIsIndexElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLLabelElement() throws Exception { test("Node", "HTMLLabelElement"); } @@ -556,7 +556,7 @@ public void _Node_HTMLLabelElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLLegendElement() throws Exception { test("Node", "HTMLLegendElement"); } @@ -566,7 +566,7 @@ public void _Node_HTMLLegendElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLLIElement() throws Exception { test("Node", "HTMLLIElement"); } @@ -576,7 +576,7 @@ public void _Node_HTMLLIElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLLinkElement() throws Exception { test("Node", "HTMLLinkElement"); } @@ -586,7 +586,7 @@ public void _Node_HTMLLinkElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLMapElement() throws Exception { test("Node", "HTMLMapElement"); } @@ -596,7 +596,7 @@ public void _Node_HTMLMapElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLMarqueeElement() throws Exception { test("Node", "HTMLMarqueeElement"); } @@ -606,7 +606,7 @@ public void _Node_HTMLMarqueeElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLMediaElement() throws Exception { test("Node", "HTMLMediaElement"); } @@ -616,7 +616,7 @@ public void _Node_HTMLMediaElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLMenuElement() throws Exception { test("Node", "HTMLMenuElement"); } @@ -626,7 +626,7 @@ public void _Node_HTMLMenuElement() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLMenuItemElement() throws Exception { test("Node", "HTMLMenuItemElement"); } @@ -636,7 +636,7 @@ public void _Node_HTMLMenuItemElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLMetaElement() throws Exception { test("Node", "HTMLMetaElement"); } @@ -646,7 +646,7 @@ public void _Node_HTMLMetaElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLMeterElement() throws Exception { test("Node", "HTMLMeterElement"); } @@ -656,7 +656,7 @@ public void _Node_HTMLMeterElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLModElement() throws Exception { test("Node", "HTMLModElement"); } @@ -666,7 +666,7 @@ public void _Node_HTMLModElement() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLNextIdElement() throws Exception { test("Node", "HTMLNextIdElement"); } @@ -676,7 +676,7 @@ public void _Node_HTMLNextIdElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLObjectElement() throws Exception { test("Node", "HTMLObjectElement"); } @@ -686,7 +686,7 @@ public void _Node_HTMLObjectElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLOListElement() throws Exception { test("Node", "HTMLOListElement"); } @@ -696,7 +696,7 @@ public void _Node_HTMLOListElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLOptGroupElement() throws Exception { test("Node", "HTMLOptGroupElement"); } @@ -706,7 +706,7 @@ public void _Node_HTMLOptGroupElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLOptionElement() throws Exception { test("Node", "HTMLOptionElement"); } @@ -716,7 +716,7 @@ public void _Node_HTMLOptionElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLOutputElement() throws Exception { test("Node", "HTMLOutputElement"); } @@ -726,7 +726,7 @@ public void _Node_HTMLOutputElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLParagraphElement() throws Exception { test("Node", "HTMLParagraphElement"); } @@ -736,7 +736,7 @@ public void _Node_HTMLParagraphElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLParamElement() throws Exception { test("Node", "HTMLParamElement"); } @@ -746,7 +746,7 @@ public void _Node_HTMLParamElement() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLPhraseElement() throws Exception { test("Node", "HTMLPhraseElement"); } @@ -756,7 +756,7 @@ public void _Node_HTMLPhraseElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLPictureElement() throws Exception { test("Node", "HTMLPictureElement"); } @@ -766,7 +766,7 @@ public void _Node_HTMLPictureElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLPreElement() throws Exception { test("Node", "HTMLPreElement"); } @@ -776,7 +776,7 @@ public void _Node_HTMLPreElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLProgressElement() throws Exception { test("Node", "HTMLProgressElement"); } @@ -786,7 +786,7 @@ public void _Node_HTMLProgressElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLQuoteElement() throws Exception { test("Node", "HTMLQuoteElement"); } @@ -796,7 +796,7 @@ public void _Node_HTMLQuoteElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLScriptElement() throws Exception { test("Node", "HTMLScriptElement"); } @@ -806,7 +806,7 @@ public void _Node_HTMLScriptElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLSelectElement() throws Exception { test("Node", "HTMLSelectElement"); } @@ -815,7 +815,7 @@ public void _Node_HTMLSelectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLSlotElement() throws Exception { test("Node", "HTMLSlotElement"); } @@ -825,7 +825,7 @@ public void _Node_HTMLSlotElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLSourceElement() throws Exception { test("Node", "HTMLSourceElement"); } @@ -835,7 +835,7 @@ public void _Node_HTMLSourceElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLSpanElement() throws Exception { test("Node", "HTMLSpanElement"); } @@ -845,7 +845,7 @@ public void _Node_HTMLSpanElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLStyleElement() throws Exception { test("Node", "HTMLStyleElement"); } @@ -855,7 +855,7 @@ public void _Node_HTMLStyleElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLTableCaptionElement() throws Exception { test("Node", "HTMLTableCaptionElement"); } @@ -865,7 +865,7 @@ public void _Node_HTMLTableCaptionElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLTableCellElement() throws Exception { test("Node", "HTMLTableCellElement"); } @@ -875,7 +875,7 @@ public void _Node_HTMLTableCellElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLTableColElement() throws Exception { test("Node", "HTMLTableColElement"); } @@ -885,7 +885,7 @@ public void _Node_HTMLTableColElement() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLTableDataCellElement() throws Exception { test("Node", "HTMLTableDataCellElement"); } @@ -895,7 +895,7 @@ public void _Node_HTMLTableDataCellElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLTableElement() throws Exception { test("Node", "HTMLTableElement"); } @@ -905,7 +905,7 @@ public void _Node_HTMLTableElement() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Node_HTMLTableHeaderCellElement() throws Exception { test("Node", "HTMLTableHeaderCellElement"); } @@ -915,7 +915,7 @@ public void _Node_HTMLTableHeaderCellElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLTableRowElement() throws Exception { test("Node", "HTMLTableRowElement"); } @@ -925,7 +925,7 @@ public void _Node_HTMLTableRowElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLTableSectionElement() throws Exception { test("Node", "HTMLTableSectionElement"); } @@ -935,7 +935,7 @@ public void _Node_HTMLTableSectionElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLTemplateElement() throws Exception { test("Node", "HTMLTemplateElement"); } @@ -945,7 +945,7 @@ public void _Node_HTMLTemplateElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLTextAreaElement() throws Exception { test("Node", "HTMLTextAreaElement"); } @@ -955,7 +955,7 @@ public void _Node_HTMLTextAreaElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLTimeElement() throws Exception { test("Node", "HTMLTimeElement"); } @@ -965,7 +965,7 @@ public void _Node_HTMLTimeElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLTitleElement() throws Exception { test("Node", "HTMLTitleElement"); } @@ -975,7 +975,7 @@ public void _Node_HTMLTitleElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLTrackElement() throws Exception { test("Node", "HTMLTrackElement"); } @@ -985,7 +985,7 @@ public void _Node_HTMLTrackElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLUListElement() throws Exception { test("Node", "HTMLUListElement"); } @@ -995,7 +995,7 @@ public void _Node_HTMLUListElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLUnknownElement() throws Exception { test("Node", "HTMLUnknownElement"); } @@ -1005,7 +1005,7 @@ public void _Node_HTMLUnknownElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_HTMLVideoElement() throws Exception { test("Node", "HTMLVideoElement"); } @@ -1015,7 +1015,7 @@ public void _Node_HTMLVideoElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_Image() throws Exception { test("Node", "Image"); } @@ -1025,7 +1025,7 @@ public void _Node_Image() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_Node() throws Exception { test("Node", "Node"); } @@ -1035,7 +1035,7 @@ public void _Node_Node() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_Option() throws Exception { test("Node", "Option"); } @@ -1045,7 +1045,7 @@ public void _Node_Option() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_ProcessingInstruction() throws Exception { test("Node", "ProcessingInstruction"); } @@ -1055,7 +1055,7 @@ public void _Node_ProcessingInstruction() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_ShadowRoot() throws Exception { test("Node", "ShadowRoot"); } @@ -1065,7 +1065,7 @@ public void _Node_ShadowRoot() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGAElement() throws Exception { test("Node", "SVGAElement"); } @@ -1075,7 +1075,7 @@ public void _Node_SVGAElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGAnimateElement() throws Exception { test("Node", "SVGAnimateElement"); } @@ -1085,7 +1085,7 @@ public void _Node_SVGAnimateElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGAnimateMotionElement() throws Exception { test("Node", "SVGAnimateMotionElement"); } @@ -1095,7 +1095,7 @@ public void _Node_SVGAnimateMotionElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGAnimateTransformElement() throws Exception { test("Node", "SVGAnimateTransformElement"); } @@ -1105,7 +1105,7 @@ public void _Node_SVGAnimateTransformElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGAnimationElement() throws Exception { test("Node", "SVGAnimationElement"); } @@ -1115,7 +1115,7 @@ public void _Node_SVGAnimationElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGCircleElement() throws Exception { test("Node", "SVGCircleElement"); } @@ -1125,7 +1125,7 @@ public void _Node_SVGCircleElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGClipPathElement() throws Exception { test("Node", "SVGClipPathElement"); } @@ -1135,7 +1135,7 @@ public void _Node_SVGClipPathElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGComponentTransferFunctionElement() throws Exception { test("Node", "SVGComponentTransferFunctionElement"); } @@ -1145,7 +1145,7 @@ public void _Node_SVGComponentTransferFunctionElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGDefsElement() throws Exception { test("Node", "SVGDefsElement"); } @@ -1155,7 +1155,7 @@ public void _Node_SVGDefsElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGDescElement() throws Exception { test("Node", "SVGDescElement"); } @@ -1165,7 +1165,18 @@ public void _Node_SVGDescElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("false/false") + @HtmlUnitNYI(FF = "true/false") + public void _Node_SVGDiscardElement() throws Exception { + test("Node", "SVGDiscardElement"); + } + + /** + * @throws Exception + * if the test fails + */ + @Test + @Alerts("true/false") public void _Node_SVGElement() throws Exception { test("Node", "SVGElement"); } @@ -1175,7 +1186,7 @@ public void _Node_SVGElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGEllipseElement() throws Exception { test("Node", "SVGEllipseElement"); } @@ -1185,7 +1196,7 @@ public void _Node_SVGEllipseElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEBlendElement() throws Exception { test("Node", "SVGFEBlendElement"); } @@ -1195,7 +1206,7 @@ public void _Node_SVGFEBlendElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEColorMatrixElement() throws Exception { test("Node", "SVGFEColorMatrixElement"); } @@ -1205,7 +1216,7 @@ public void _Node_SVGFEColorMatrixElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEComponentTransferElement() throws Exception { test("Node", "SVGFEComponentTransferElement"); } @@ -1215,7 +1226,7 @@ public void _Node_SVGFEComponentTransferElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFECompositeElement() throws Exception { test("Node", "SVGFECompositeElement"); } @@ -1225,7 +1236,7 @@ public void _Node_SVGFECompositeElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEConvolveMatrixElement() throws Exception { test("Node", "SVGFEConvolveMatrixElement"); } @@ -1235,7 +1246,7 @@ public void _Node_SVGFEConvolveMatrixElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEDiffuseLightingElement() throws Exception { test("Node", "SVGFEDiffuseLightingElement"); } @@ -1245,7 +1256,7 @@ public void _Node_SVGFEDiffuseLightingElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEDisplacementMapElement() throws Exception { test("Node", "SVGFEDisplacementMapElement"); } @@ -1255,7 +1266,7 @@ public void _Node_SVGFEDisplacementMapElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEDistantLightElement() throws Exception { test("Node", "SVGFEDistantLightElement"); } @@ -1265,7 +1276,7 @@ public void _Node_SVGFEDistantLightElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEDropShadowElement() throws Exception { test("Node", "SVGFEDropShadowElement"); } @@ -1275,7 +1286,7 @@ public void _Node_SVGFEDropShadowElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEFloodElement() throws Exception { test("Node", "SVGFEFloodElement"); } @@ -1285,7 +1296,7 @@ public void _Node_SVGFEFloodElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEFuncAElement() throws Exception { test("Node", "SVGFEFuncAElement"); } @@ -1295,7 +1306,7 @@ public void _Node_SVGFEFuncAElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEFuncBElement() throws Exception { test("Node", "SVGFEFuncBElement"); } @@ -1305,7 +1316,7 @@ public void _Node_SVGFEFuncBElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEFuncGElement() throws Exception { test("Node", "SVGFEFuncGElement"); } @@ -1315,7 +1326,7 @@ public void _Node_SVGFEFuncGElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEFuncRElement() throws Exception { test("Node", "SVGFEFuncRElement"); } @@ -1325,7 +1336,7 @@ public void _Node_SVGFEFuncRElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEGaussianBlurElement() throws Exception { test("Node", "SVGFEGaussianBlurElement"); } @@ -1335,7 +1346,7 @@ public void _Node_SVGFEGaussianBlurElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEImageElement() throws Exception { test("Node", "SVGFEImageElement"); } @@ -1345,7 +1356,7 @@ public void _Node_SVGFEImageElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEMergeElement() throws Exception { test("Node", "SVGFEMergeElement"); } @@ -1355,7 +1366,7 @@ public void _Node_SVGFEMergeElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEMergeNodeElement() throws Exception { test("Node", "SVGFEMergeNodeElement"); } @@ -1365,7 +1376,7 @@ public void _Node_SVGFEMergeNodeElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEMorphologyElement() throws Exception { test("Node", "SVGFEMorphologyElement"); } @@ -1375,7 +1386,7 @@ public void _Node_SVGFEMorphologyElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEOffsetElement() throws Exception { test("Node", "SVGFEOffsetElement"); } @@ -1385,7 +1396,7 @@ public void _Node_SVGFEOffsetElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFEPointLightElement() throws Exception { test("Node", "SVGFEPointLightElement"); } @@ -1395,7 +1406,7 @@ public void _Node_SVGFEPointLightElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFESpecularLightingElement() throws Exception { test("Node", "SVGFESpecularLightingElement"); } @@ -1405,7 +1416,7 @@ public void _Node_SVGFESpecularLightingElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFESpotLightElement() throws Exception { test("Node", "SVGFESpotLightElement"); } @@ -1415,7 +1426,7 @@ public void _Node_SVGFESpotLightElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFETileElement() throws Exception { test("Node", "SVGFETileElement"); } @@ -1425,7 +1436,7 @@ public void _Node_SVGFETileElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFETurbulenceElement() throws Exception { test("Node", "SVGFETurbulenceElement"); } @@ -1435,7 +1446,7 @@ public void _Node_SVGFETurbulenceElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGFilterElement() throws Exception { test("Node", "SVGFilterElement"); } @@ -1445,7 +1456,7 @@ public void _Node_SVGFilterElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGForeignObjectElement() throws Exception { test("Node", "SVGForeignObjectElement"); } @@ -1455,7 +1466,7 @@ public void _Node_SVGForeignObjectElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGGElement() throws Exception { test("Node", "SVGGElement"); } @@ -1465,7 +1476,7 @@ public void _Node_SVGGElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGGeometryElement() throws Exception { test("Node", "SVGGeometryElement"); } @@ -1475,7 +1486,7 @@ public void _Node_SVGGeometryElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGGradientElement() throws Exception { test("Node", "SVGGradientElement"); } @@ -1485,7 +1496,7 @@ public void _Node_SVGGradientElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGGraphicsElement() throws Exception { test("Node", "SVGGraphicsElement"); } @@ -1495,7 +1506,7 @@ public void _Node_SVGGraphicsElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGImageElement() throws Exception { test("Node", "SVGImageElement"); } @@ -1505,7 +1516,7 @@ public void _Node_SVGImageElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGLinearGradientElement() throws Exception { test("Node", "SVGLinearGradientElement"); } @@ -1515,7 +1526,7 @@ public void _Node_SVGLinearGradientElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGLineElement() throws Exception { test("Node", "SVGLineElement"); } @@ -1525,7 +1536,7 @@ public void _Node_SVGLineElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGMarkerElement() throws Exception { test("Node", "SVGMarkerElement"); } @@ -1535,7 +1546,7 @@ public void _Node_SVGMarkerElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGMaskElement() throws Exception { test("Node", "SVGMaskElement"); } @@ -1545,7 +1556,7 @@ public void _Node_SVGMaskElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGMetadataElement() throws Exception { test("Node", "SVGMetadataElement"); } @@ -1555,7 +1566,7 @@ public void _Node_SVGMetadataElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGMPathElement() throws Exception { test("Node", "SVGMPathElement"); } @@ -1565,7 +1576,7 @@ public void _Node_SVGMPathElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGPathElement() throws Exception { test("Node", "SVGPathElement"); } @@ -1575,7 +1586,7 @@ public void _Node_SVGPathElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGPatternElement() throws Exception { test("Node", "SVGPatternElement"); } @@ -1585,7 +1596,7 @@ public void _Node_SVGPatternElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGPolygonElement() throws Exception { test("Node", "SVGPolygonElement"); } @@ -1595,7 +1606,7 @@ public void _Node_SVGPolygonElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGPolylineElement() throws Exception { test("Node", "SVGPolylineElement"); } @@ -1605,7 +1616,7 @@ public void _Node_SVGPolylineElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGRadialGradientElement() throws Exception { test("Node", "SVGRadialGradientElement"); } @@ -1615,7 +1626,7 @@ public void _Node_SVGRadialGradientElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGRectElement() throws Exception { test("Node", "SVGRectElement"); } @@ -1625,7 +1636,7 @@ public void _Node_SVGRectElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGScriptElement() throws Exception { test("Node", "SVGScriptElement"); } @@ -1635,7 +1646,7 @@ public void _Node_SVGScriptElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGSetElement() throws Exception { test("Node", "SVGSetElement"); } @@ -1645,7 +1656,7 @@ public void _Node_SVGSetElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGStopElement() throws Exception { test("Node", "SVGStopElement"); } @@ -1655,7 +1666,7 @@ public void _Node_SVGStopElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGStyleElement() throws Exception { test("Node", "SVGStyleElement"); } @@ -1665,7 +1676,7 @@ public void _Node_SVGStyleElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGSVGElement() throws Exception { test("Node", "SVGSVGElement"); } @@ -1675,7 +1686,7 @@ public void _Node_SVGSVGElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGSwitchElement() throws Exception { test("Node", "SVGSwitchElement"); } @@ -1685,7 +1696,7 @@ public void _Node_SVGSwitchElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGSymbolElement() throws Exception { test("Node", "SVGSymbolElement"); } @@ -1695,7 +1706,7 @@ public void _Node_SVGSymbolElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGTextContentElement() throws Exception { test("Node", "SVGTextContentElement"); } @@ -1705,7 +1716,7 @@ public void _Node_SVGTextContentElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGTextElement() throws Exception { test("Node", "SVGTextElement"); } @@ -1715,7 +1726,7 @@ public void _Node_SVGTextElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGTextPathElement() throws Exception { test("Node", "SVGTextPathElement"); } @@ -1725,7 +1736,7 @@ public void _Node_SVGTextPathElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGTextPositioningElement() throws Exception { test("Node", "SVGTextPositioningElement"); } @@ -1735,7 +1746,7 @@ public void _Node_SVGTextPositioningElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGTitleElement() throws Exception { test("Node", "SVGTitleElement"); } @@ -1745,7 +1756,7 @@ public void _Node_SVGTitleElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGTSpanElement() throws Exception { test("Node", "SVGTSpanElement"); } @@ -1755,7 +1766,7 @@ public void _Node_SVGTSpanElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGUseElement() throws Exception { test("Node", "SVGUseElement"); } @@ -1765,7 +1776,7 @@ public void _Node_SVGUseElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_SVGViewElement() throws Exception { test("Node", "SVGViewElement"); } @@ -1775,7 +1786,7 @@ public void _Node_SVGViewElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_Text() throws Exception { test("Node", "Text"); } @@ -1785,7 +1796,7 @@ public void _Node_Text() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Node_XMLDocument() throws Exception { test("Node", "XMLDocument"); } @@ -1795,11 +1806,11 @@ public void _Node_XMLDocument() throws Exception { * if the test fails */ @Test - @Alerts("false") - @HtmlUnitNYI(CHROME = "true", - EDGE = "true", - FF = "true", - FF_ESR = "true") + @Alerts("false/false") + @HtmlUnitNYI(CHROME = "true/false", + EDGE = "true/false", + FF = "true/false", + FF_ESR = "true/false") public void _NodeFilter_NodeFilter() throws Exception { test("NodeFilter", "NodeFilter"); } @@ -1809,7 +1820,7 @@ public void _NodeFilter_NodeFilter() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _NodeIterator_NodeIterator() throws Exception { test("NodeIterator", "NodeIterator"); } @@ -1819,7 +1830,7 @@ public void _NodeIterator_NodeIterator() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _NodeList_NodeList() throws Exception { test("NodeList", "NodeList"); } @@ -1829,7 +1840,7 @@ public void _NodeList_NodeList() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _NodeList_RadioNodeList() throws Exception { test("NodeList", "RadioNodeList"); } @@ -1839,7 +1850,7 @@ public void _NodeList_RadioNodeList() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Notification_Notification() throws Exception { test("Notification", "Notification"); } @@ -1848,7 +1859,7 @@ public void _Notification_Notification() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _OES_element_index_uint_OES_element_index_uint() throws Exception { test("OES_element_index_uint", "OES_element_index_uint"); } @@ -1857,7 +1868,7 @@ public void _OES_element_index_uint_OES_element_index_uint() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _OES_standard_derivatives_OES_standard_derivatives() throws Exception { test("OES_standard_derivatives", "OES_standard_derivatives"); } @@ -1866,7 +1877,7 @@ public void _OES_standard_derivatives_OES_standard_derivatives() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _OES_texture_float_linear_OES_texture_float_linear() throws Exception { test("OES_texture_float_linear", "OES_texture_float_linear"); } @@ -1875,7 +1886,7 @@ public void _OES_texture_float_linear_OES_texture_float_linear() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _OES_texture_float_OES_texture_float() throws Exception { test("OES_texture_float", "OES_texture_float"); } @@ -1885,7 +1896,7 @@ public void _OES_texture_float_OES_texture_float() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _OfflineAudioCompletionEvent_OfflineAudioCompletionEvent() throws Exception { test("OfflineAudioCompletionEvent", "OfflineAudioCompletionEvent"); } @@ -1895,7 +1906,7 @@ public void _OfflineAudioCompletionEvent_OfflineAudioCompletionEvent() throws Ex * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _OfflineAudioContext_OfflineAudioContext() throws Exception { test("OfflineAudioContext", "OfflineAudioContext"); } @@ -1905,7 +1916,7 @@ public void _OfflineAudioContext_OfflineAudioContext() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _OfflineResourceList_OfflineResourceList() throws Exception { test("OfflineResourceList", "OfflineResourceList"); } @@ -1915,7 +1926,7 @@ public void _OfflineResourceList_OfflineResourceList() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Option_HTMLOptionElement() throws Exception { // although Option != HTMLOptionElement, they seem to be synonyms!!! test("Option", "HTMLOptionElement"); @@ -1926,7 +1937,7 @@ public void _Option_HTMLOptionElement() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Option_Option() throws Exception { test("Option", "Option"); } @@ -1936,7 +1947,7 @@ public void _Option_Option() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _OscillatorNode_OscillatorNode() throws Exception { test("OscillatorNode", "OscillatorNode"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfPTest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfPTest.java index 66f9966e52a..40b1d754e49 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfPTest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfPTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -53,7 +53,7 @@ public static Collection data() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PageTransitionEvent_PageTransitionEvent() throws Exception { test("PageTransitionEvent", "PageTransitionEvent"); } @@ -63,7 +63,7 @@ public void _PageTransitionEvent_PageTransitionEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PannerNode_PannerNode() throws Exception { test("PannerNode", "PannerNode"); } @@ -72,9 +72,9 @@ public void _PannerNode_PannerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _PasswordCredential_PasswordCredential() throws Exception { test("PasswordCredential", "PasswordCredential"); } @@ -84,7 +84,7 @@ public void _PasswordCredential_PasswordCredential() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Path2D_Path2D() throws Exception { test("Path2D", "Path2D"); } @@ -94,9 +94,9 @@ public void _Path2D_Path2D() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _PaymentAddress_PaymentAddress() throws Exception { test("PaymentAddress", "PaymentAddress"); } @@ -106,9 +106,9 @@ public void _PaymentAddress_PaymentAddress() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _PaymentRequest_PaymentRequest() throws Exception { test("PaymentRequest", "PaymentRequest"); } @@ -118,9 +118,9 @@ public void _PaymentRequest_PaymentRequest() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _PaymentResponse_PaymentResponse() throws Exception { test("PaymentResponse", "PaymentResponse"); } @@ -130,7 +130,7 @@ public void _PaymentResponse_PaymentResponse() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Performance_Performance() throws Exception { test("Performance", "Performance"); } @@ -140,7 +140,7 @@ public void _Performance_Performance() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PerformanceEntry_PerformanceEntry() throws Exception { test("PerformanceEntry", "PerformanceEntry"); } @@ -150,7 +150,7 @@ public void _PerformanceEntry_PerformanceEntry() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _PerformanceEntry_PerformanceMark() throws Exception { test("PerformanceEntry", "PerformanceMark"); } @@ -160,7 +160,7 @@ public void _PerformanceEntry_PerformanceMark() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _PerformanceEntry_PerformanceMeasure() throws Exception { test("PerformanceEntry", "PerformanceMeasure"); } @@ -170,7 +170,7 @@ public void _PerformanceEntry_PerformanceMeasure() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PerformanceEntry_PerformanceNavigationTiming() throws Exception { test("PerformanceEntry", "PerformanceNavigationTiming"); } @@ -180,7 +180,7 @@ public void _PerformanceEntry_PerformanceNavigationTiming() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _PerformanceEntry_PerformanceResourceTiming() throws Exception { test("PerformanceEntry", "PerformanceResourceTiming"); } @@ -190,7 +190,7 @@ public void _PerformanceEntry_PerformanceResourceTiming() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PerformanceMark_PerformanceMark() throws Exception { test("PerformanceMark", "PerformanceMark"); } @@ -200,7 +200,7 @@ public void _PerformanceMark_PerformanceMark() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PerformanceMeasure_PerformanceMeasure() throws Exception { test("PerformanceMeasure", "PerformanceMeasure"); } @@ -210,7 +210,7 @@ public void _PerformanceMeasure_PerformanceMeasure() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PerformanceNavigation_PerformanceNavigation() throws Exception { test("PerformanceNavigation", "PerformanceNavigation"); } @@ -219,7 +219,7 @@ public void _PerformanceNavigation_PerformanceNavigation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PerformanceNavigationTiming_PerformanceNavigationTiming() throws Exception { test("PerformanceNavigationTiming", "PerformanceNavigationTiming"); } @@ -229,7 +229,7 @@ public void _PerformanceNavigationTiming_PerformanceNavigationTiming() throws Ex * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PerformanceObserver_PerformanceObserver() throws Exception { test("PerformanceObserver", "PerformanceObserver"); } @@ -239,7 +239,7 @@ public void _PerformanceObserver_PerformanceObserver() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PerformanceObserverEntryList_PerformanceObserverEntryList() throws Exception { test("PerformanceObserverEntryList", "PerformanceObserverEntryList"); } @@ -249,7 +249,7 @@ public void _PerformanceObserverEntryList_PerformanceObserverEntryList() throws * if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _PerformanceResourceTiming_PerformanceNavigationTiming() throws Exception { test("PerformanceResourceTiming", "PerformanceNavigationTiming"); } @@ -259,7 +259,7 @@ public void _PerformanceResourceTiming_PerformanceNavigationTiming() throws Exce * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PerformanceResourceTiming_PerformanceResourceTiming() throws Exception { test("PerformanceResourceTiming", "PerformanceResourceTiming"); } @@ -269,7 +269,7 @@ public void _PerformanceResourceTiming_PerformanceResourceTiming() throws Except * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PerformanceTiming_PerformanceTiming() throws Exception { test("PerformanceTiming", "PerformanceTiming"); } @@ -279,9 +279,9 @@ public void _PerformanceTiming_PerformanceTiming() throws Exception { * if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _PeriodicSyncManager_PeriodicSyncManager() throws Exception { test("PeriodicSyncManager", "PeriodicSyncManager"); } @@ -291,7 +291,7 @@ public void _PeriodicSyncManager_PeriodicSyncManager() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PeriodicWave_PeriodicWave() throws Exception { test("PeriodicWave", "PeriodicWave"); } @@ -301,7 +301,7 @@ public void _PeriodicWave_PeriodicWave() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Permissions_Permissions() throws Exception { test("Permissions", "Permissions"); } @@ -311,7 +311,7 @@ public void _Permissions_Permissions() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PermissionStatus_PermissionStatus() throws Exception { test("PermissionStatus", "PermissionStatus"); } @@ -321,7 +321,7 @@ public void _PermissionStatus_PermissionStatus() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Plugin_Plugin() throws Exception { test("Plugin", "Plugin"); } @@ -331,7 +331,7 @@ public void _Plugin_Plugin() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PluginArray_PluginArray() throws Exception { test("PluginArray", "PluginArray"); } @@ -341,7 +341,7 @@ public void _PluginArray_PluginArray() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PointerEvent_PointerEvent() throws Exception { test("PointerEvent", "PointerEvent"); } @@ -351,7 +351,7 @@ public void _PointerEvent_PointerEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PopStateEvent_PopStateEvent() throws Exception { test("PopStateEvent", "PopStateEvent"); } @@ -361,7 +361,7 @@ public void _PopStateEvent_PopStateEvent() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _Position_Position() throws Exception { test("Position", "Position"); } @@ -371,7 +371,7 @@ public void _Position_Position() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _PositionError_PositionError() throws Exception { test("PositionError", "PositionError"); } @@ -380,9 +380,9 @@ public void _PositionError_PositionError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _Presentation_Presentation() throws Exception { test("Presentation", "Presentation"); } @@ -391,9 +391,9 @@ public void _Presentation_Presentation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _PresentationAvailability_PresentationAvailability() throws Exception { test("PresentationAvailability", "PresentationAvailability"); } @@ -402,9 +402,9 @@ public void _PresentationAvailability_PresentationAvailability() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _PresentationConnection_PresentationConnection() throws Exception { test("PresentationConnection", "PresentationConnection"); } @@ -413,9 +413,9 @@ public void _PresentationConnection_PresentationConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _PresentationConnectionAvailableEvent_PresentationConnectionAvailableEvent() throws Exception { test("PresentationConnectionAvailableEvent", "PresentationConnectionAvailableEvent"); } @@ -424,9 +424,9 @@ public void _PresentationConnectionAvailableEvent_PresentationConnectionAvailabl * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _PresentationConnectionCloseEvent_PresentationConnectionCloseEvent() throws Exception { test("PresentationConnectionCloseEvent", "PresentationConnectionCloseEvent"); } @@ -435,9 +435,9 @@ public void _PresentationConnectionCloseEvent_PresentationConnectionCloseEvent() * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _PresentationRequest_PresentationRequest() throws Exception { test("PresentationRequest", "PresentationRequest"); } @@ -447,7 +447,7 @@ public void _PresentationRequest_PresentationRequest() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ProcessingInstruction_ProcessingInstruction() throws Exception { test("ProcessingInstruction", "ProcessingInstruction"); } @@ -457,7 +457,7 @@ public void _ProcessingInstruction_ProcessingInstruction() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ProgressEvent_ProgressEvent() throws Exception { test("ProgressEvent", "ProgressEvent"); } @@ -467,7 +467,7 @@ public void _ProgressEvent_ProgressEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Promise_Promise() throws Exception { test("Promise", "Promise"); } @@ -476,7 +476,7 @@ public void _Promise_Promise() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PromiseRejectionEvent_PromiseRejectionEvent() throws Exception { test("PromiseRejectionEvent", "PromiseRejectionEvent"); } @@ -486,7 +486,7 @@ public void _PromiseRejectionEvent_PromiseRejectionEvent() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PushManager_PushManager() throws Exception { test("PushManager", "PushManager"); } @@ -496,7 +496,7 @@ public void _PushManager_PushManager() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PushSubscription_PushSubscription() throws Exception { test("PushSubscription", "PushSubscription"); } @@ -505,7 +505,7 @@ public void _PushSubscription_PushSubscription() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _PushSubscriptionOptions_PushSubscriptionOptions() throws Exception { test("PushSubscriptionOptions", "PushSubscriptionOptions"); } @@ -515,7 +515,7 @@ public void _PushSubscriptionOptions_PushSubscriptionOptions() throws Exception * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _RadioNodeList_RadioNodeList() throws Exception { test("RadioNodeList", "RadioNodeList"); } @@ -525,7 +525,7 @@ public void _RadioNodeList_RadioNodeList() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Range_Range() throws Exception { test("Range", "Range"); } @@ -535,7 +535,7 @@ public void _Range_Range() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ReadableStream_ReadableStream() throws Exception { test("ReadableStream", "ReadableStream"); } @@ -544,9 +544,9 @@ public void _ReadableStream_ReadableStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _RemotePlayback_RemotePlayback() throws Exception { test("RemotePlayback", "RemotePlayback"); } @@ -556,7 +556,7 @@ public void _RemotePlayback_RemotePlayback() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Request_Request() throws Exception { test("Request", "Request"); } @@ -566,7 +566,7 @@ public void _Request_Request() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Response_Response() throws Exception { test("Response", "Response"); } @@ -575,7 +575,7 @@ public void _Response_Response() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _RTCCertificate_RTCCertificate() throws Exception { test("RTCCertificate", "RTCCertificate"); } @@ -585,7 +585,7 @@ public void _RTCCertificate_RTCCertificate() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _RTCDataChannelEvent_RTCDataChannelEvent() throws Exception { test("RTCDataChannelEvent", "RTCDataChannelEvent"); } @@ -595,7 +595,7 @@ public void _RTCDataChannelEvent_RTCDataChannelEvent() throws Exception { * if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _RTCIceCandidate_mozRTCIceCandidate() throws Exception { test("RTCIceCandidate", "mozRTCIceCandidate"); } @@ -605,7 +605,7 @@ public void _RTCIceCandidate_mozRTCIceCandidate() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _RTCIceCandidate_RTCIceCandidate() throws Exception { test("RTCIceCandidate", "RTCIceCandidate"); } @@ -614,7 +614,7 @@ public void _RTCIceCandidate_RTCIceCandidate() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _RTCPeerConnection_mozRTCPeerConnection() throws Exception { test("RTCPeerConnection", "mozRTCPeerConnection"); } @@ -623,7 +623,7 @@ public void _RTCPeerConnection_mozRTCPeerConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _RTCPeerConnection_RTCPeerConnection() throws Exception { test("RTCPeerConnection", "RTCPeerConnection"); } @@ -632,9 +632,9 @@ public void _RTCPeerConnection_RTCPeerConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _RTCPeerConnection_webkitRTCPeerConnection() throws Exception { test("RTCPeerConnection", "webkitRTCPeerConnection"); } @@ -644,7 +644,7 @@ public void _RTCPeerConnection_webkitRTCPeerConnection() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _RTCPeerConnectionIceEvent_RTCPeerConnectionIceEvent() throws Exception { test("RTCPeerConnectionIceEvent", "RTCPeerConnectionIceEvent"); } @@ -653,7 +653,7 @@ public void _RTCPeerConnectionIceEvent_RTCPeerConnectionIceEvent() throws Except * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _RTCSctpTransport_RTCSctpTransport() throws Exception { test("RTCSctpTransport", "RTCSctpTransport"); } @@ -662,7 +662,7 @@ public void _RTCSctpTransport_RTCSctpTransport() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _RTCSessionDescription_mozRTCSessionDescription() throws Exception { test("RTCSessionDescription", "mozRTCSessionDescription"); } @@ -672,7 +672,7 @@ public void _RTCSessionDescription_mozRTCSessionDescription() throws Exception { * if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _RTCSessionDescription_RTCSessionDescription() throws Exception { test("RTCSessionDescription", "RTCSessionDescription"); } @@ -681,7 +681,7 @@ public void _RTCSessionDescription_RTCSessionDescription() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _RTCStatsReport_RTCStatsReport() throws Exception { test("RTCStatsReport", "RTCStatsReport"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfS2Test.java b/src/test/java/org/htmlunit/general/huge/HostParentOfS2Test.java index de12f48fb1f..d64a7f829ab 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfS2Test.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfS2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import org.apache.commons.lang3.StringUtils; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -52,7 +52,7 @@ public static Collection data() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGElement_SVGGElement() throws Exception { test("SVGGElement", "SVGGElement"); } @@ -61,7 +61,7 @@ public void _SVGGElement_SVGGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGeometryElement_SVGCircleElement() throws Exception { test("SVGGeometryElement", "SVGCircleElement"); } @@ -70,7 +70,7 @@ public void _SVGGeometryElement_SVGCircleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGeometryElement_SVGEllipseElement() throws Exception { test("SVGGeometryElement", "SVGEllipseElement"); } @@ -79,7 +79,7 @@ public void _SVGGeometryElement_SVGEllipseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGeometryElement_SVGGeometryElement() throws Exception { test("SVGGeometryElement", "SVGGeometryElement"); } @@ -88,7 +88,7 @@ public void _SVGGeometryElement_SVGGeometryElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGeometryElement_SVGLineElement() throws Exception { test("SVGGeometryElement", "SVGLineElement"); } @@ -97,7 +97,7 @@ public void _SVGGeometryElement_SVGLineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGeometryElement_SVGPathElement() throws Exception { test("SVGGeometryElement", "SVGPathElement"); } @@ -106,7 +106,7 @@ public void _SVGGeometryElement_SVGPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGeometryElement_SVGPolygonElement() throws Exception { test("SVGGeometryElement", "SVGPolygonElement"); } @@ -115,7 +115,7 @@ public void _SVGGeometryElement_SVGPolygonElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGeometryElement_SVGPolylineElement() throws Exception { test("SVGGeometryElement", "SVGPolylineElement"); } @@ -124,7 +124,7 @@ public void _SVGGeometryElement_SVGPolylineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGeometryElement_SVGRectElement() throws Exception { test("SVGGeometryElement", "SVGRectElement"); } @@ -133,7 +133,7 @@ public void _SVGGeometryElement_SVGRectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGradientElement_SVGGradientElement() throws Exception { test("SVGGradientElement", "SVGGradientElement"); } @@ -142,7 +142,7 @@ public void _SVGGradientElement_SVGGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGradientElement_SVGLinearGradientElement() throws Exception { test("SVGGradientElement", "SVGLinearGradientElement"); } @@ -151,7 +151,7 @@ public void _SVGGradientElement_SVGLinearGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGradientElement_SVGRadialGradientElement() throws Exception { test("SVGGradientElement", "SVGRadialGradientElement"); } @@ -160,7 +160,7 @@ public void _SVGGradientElement_SVGRadialGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGraphicsElement_SVGAElement() throws Exception { test("SVGGraphicsElement", "SVGAElement"); } @@ -169,7 +169,7 @@ public void _SVGGraphicsElement_SVGAElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGCircleElement() throws Exception { test("SVGGraphicsElement", "SVGCircleElement"); } @@ -178,7 +178,7 @@ public void _SVGGraphicsElement_SVGCircleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGGraphicsElement_SVGClipPathElement() throws Exception { test("SVGGraphicsElement", "SVGClipPathElement"); } @@ -187,7 +187,7 @@ public void _SVGGraphicsElement_SVGClipPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGraphicsElement_SVGDefsElement() throws Exception { test("SVGGraphicsElement", "SVGDefsElement"); } @@ -196,7 +196,7 @@ public void _SVGGraphicsElement_SVGDefsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGEllipseElement() throws Exception { test("SVGGraphicsElement", "SVGEllipseElement"); } @@ -205,7 +205,7 @@ public void _SVGGraphicsElement_SVGEllipseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGraphicsElement_SVGForeignObjectElement() throws Exception { test("SVGGraphicsElement", "SVGForeignObjectElement"); } @@ -214,7 +214,7 @@ public void _SVGGraphicsElement_SVGForeignObjectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGraphicsElement_SVGGElement() throws Exception { test("SVGGraphicsElement", "SVGGElement"); } @@ -223,7 +223,7 @@ public void _SVGGraphicsElement_SVGGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGraphicsElement_SVGGeometryElement() throws Exception { test("SVGGraphicsElement", "SVGGeometryElement"); } @@ -232,7 +232,7 @@ public void _SVGGraphicsElement_SVGGeometryElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGGraphicsElement() throws Exception { test("SVGGraphicsElement", "SVGGraphicsElement"); } @@ -241,7 +241,7 @@ public void _SVGGraphicsElement_SVGGraphicsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGraphicsElement_SVGImageElement() throws Exception { test("SVGGraphicsElement", "SVGImageElement"); } @@ -250,7 +250,7 @@ public void _SVGGraphicsElement_SVGImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGLineElement() throws Exception { test("SVGGraphicsElement", "SVGLineElement"); } @@ -259,7 +259,7 @@ public void _SVGGraphicsElement_SVGLineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGPathElement() throws Exception { test("SVGGraphicsElement", "SVGPathElement"); } @@ -268,7 +268,7 @@ public void _SVGGraphicsElement_SVGPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGPolygonElement() throws Exception { test("SVGGraphicsElement", "SVGPolygonElement"); } @@ -277,7 +277,7 @@ public void _SVGGraphicsElement_SVGPolygonElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGPolylineElement() throws Exception { test("SVGGraphicsElement", "SVGPolylineElement"); } @@ -286,7 +286,7 @@ public void _SVGGraphicsElement_SVGPolylineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGRectElement() throws Exception { test("SVGGraphicsElement", "SVGRectElement"); } @@ -295,7 +295,7 @@ public void _SVGGraphicsElement_SVGRectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGraphicsElement_SVGSVGElement() throws Exception { test("SVGGraphicsElement", "SVGSVGElement"); } @@ -304,7 +304,7 @@ public void _SVGGraphicsElement_SVGSVGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGraphicsElement_SVGSwitchElement() throws Exception { test("SVGGraphicsElement", "SVGSwitchElement"); } @@ -313,7 +313,7 @@ public void _SVGGraphicsElement_SVGSwitchElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGraphicsElement_SVGTextContentElement() throws Exception { test("SVGGraphicsElement", "SVGTextContentElement"); } @@ -322,7 +322,7 @@ public void _SVGGraphicsElement_SVGTextContentElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGTextElement() throws Exception { test("SVGGraphicsElement", "SVGTextElement"); } @@ -331,7 +331,7 @@ public void _SVGGraphicsElement_SVGTextElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGTextPathElement() throws Exception { test("SVGGraphicsElement", "SVGTextPathElement"); } @@ -340,7 +340,7 @@ public void _SVGGraphicsElement_SVGTextPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGTextPositioningElement() throws Exception { test("SVGGraphicsElement", "SVGTextPositioningElement"); } @@ -349,7 +349,7 @@ public void _SVGGraphicsElement_SVGTextPositioningElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGGraphicsElement_SVGTSpanElement() throws Exception { test("SVGGraphicsElement", "SVGTSpanElement"); } @@ -358,7 +358,7 @@ public void _SVGGraphicsElement_SVGTSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGGraphicsElement_SVGUseElement() throws Exception { test("SVGGraphicsElement", "SVGUseElement"); } @@ -367,7 +367,7 @@ public void _SVGGraphicsElement_SVGUseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGImageElement_SVGImageElement() throws Exception { test("SVGImageElement", "SVGImageElement"); } @@ -376,7 +376,7 @@ public void _SVGImageElement_SVGImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGLength_SVGLength() throws Exception { test("SVGLength", "SVGLength"); } @@ -385,7 +385,7 @@ public void _SVGLength_SVGLength() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGLengthList_SVGLengthList() throws Exception { test("SVGLengthList", "SVGLengthList"); } @@ -394,7 +394,7 @@ public void _SVGLengthList_SVGLengthList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGLinearGradientElement_SVGLinearGradientElement() throws Exception { test("SVGLinearGradientElement", "SVGLinearGradientElement"); } @@ -403,7 +403,7 @@ public void _SVGLinearGradientElement_SVGLinearGradientElement() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGLineElement_SVGLineElement() throws Exception { test("SVGLineElement", "SVGLineElement"); } @@ -412,7 +412,7 @@ public void _SVGLineElement_SVGLineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGMarkerElement_SVGMarkerElement() throws Exception { test("SVGMarkerElement", "SVGMarkerElement"); } @@ -421,7 +421,7 @@ public void _SVGMarkerElement_SVGMarkerElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGMaskElement_SVGMaskElement() throws Exception { test("SVGMaskElement", "SVGMaskElement"); } @@ -430,7 +430,7 @@ public void _SVGMaskElement_SVGMaskElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGMatrix_SVGMatrix() throws Exception { test("SVGMatrix", "SVGMatrix"); } @@ -439,7 +439,7 @@ public void _SVGMatrix_SVGMatrix() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGMetadataElement_SVGMetadataElement() throws Exception { test("SVGMetadataElement", "SVGMetadataElement"); } @@ -448,7 +448,7 @@ public void _SVGMetadataElement_SVGMetadataElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGMPathElement_SVGMPathElement() throws Exception { test("SVGMPathElement", "SVGMPathElement"); } @@ -457,7 +457,7 @@ public void _SVGMPathElement_SVGMPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGNumber_SVGNumber() throws Exception { test("SVGNumber", "SVGNumber"); } @@ -466,7 +466,7 @@ public void _SVGNumber_SVGNumber() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGNumberList_SVGNumberList() throws Exception { test("SVGNumberList", "SVGNumberList"); } @@ -475,7 +475,7 @@ public void _SVGNumberList_SVGNumberList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGPathElement_SVGPathElement() throws Exception { test("SVGPathElement", "SVGPathElement"); } @@ -484,7 +484,7 @@ public void _SVGPathElement_SVGPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSeg() throws Exception { test("SVGPathSeg", "SVGPathSeg"); } @@ -493,7 +493,7 @@ public void _SVGPathSeg_SVGPathSeg() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegArcAbs() throws Exception { test("SVGPathSeg", "SVGPathSegArcAbs"); } @@ -502,7 +502,7 @@ public void _SVGPathSeg_SVGPathSegArcAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegArcRel() throws Exception { test("SVGPathSeg", "SVGPathSegArcRel"); } @@ -511,7 +511,7 @@ public void _SVGPathSeg_SVGPathSegArcRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegClosePath() throws Exception { test("SVGPathSeg", "SVGPathSegClosePath"); } @@ -520,7 +520,7 @@ public void _SVGPathSeg_SVGPathSegClosePath() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegCurvetoCubicAbs() throws Exception { test("SVGPathSeg", "SVGPathSegCurvetoCubicAbs"); } @@ -529,7 +529,7 @@ public void _SVGPathSeg_SVGPathSegCurvetoCubicAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegCurvetoCubicRel() throws Exception { test("SVGPathSeg", "SVGPathSegCurvetoCubicRel"); } @@ -538,7 +538,7 @@ public void _SVGPathSeg_SVGPathSegCurvetoCubicRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegCurvetoCubicSmoothAbs() throws Exception { test("SVGPathSeg", "SVGPathSegCurvetoCubicSmoothAbs"); } @@ -547,7 +547,7 @@ public void _SVGPathSeg_SVGPathSegCurvetoCubicSmoothAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegCurvetoCubicSmoothRel() throws Exception { test("SVGPathSeg", "SVGPathSegCurvetoCubicSmoothRel"); } @@ -556,7 +556,7 @@ public void _SVGPathSeg_SVGPathSegCurvetoCubicSmoothRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegCurvetoQuadraticAbs() throws Exception { test("SVGPathSeg", "SVGPathSegCurvetoQuadraticAbs"); } @@ -565,7 +565,7 @@ public void _SVGPathSeg_SVGPathSegCurvetoQuadraticAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegCurvetoQuadraticRel() throws Exception { test("SVGPathSeg", "SVGPathSegCurvetoQuadraticRel"); } @@ -574,7 +574,7 @@ public void _SVGPathSeg_SVGPathSegCurvetoQuadraticRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegCurvetoQuadraticSmoothAbs() throws Exception { test("SVGPathSeg", "SVGPathSegCurvetoQuadraticSmoothAbs"); } @@ -583,7 +583,7 @@ public void _SVGPathSeg_SVGPathSegCurvetoQuadraticSmoothAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegCurvetoQuadraticSmoothRel() throws Exception { test("SVGPathSeg", "SVGPathSegCurvetoQuadraticSmoothRel"); } @@ -592,7 +592,7 @@ public void _SVGPathSeg_SVGPathSegCurvetoQuadraticSmoothRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegLinetoAbs() throws Exception { test("SVGPathSeg", "SVGPathSegLinetoAbs"); } @@ -601,7 +601,7 @@ public void _SVGPathSeg_SVGPathSegLinetoAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegLinetoHorizontalAbs() throws Exception { test("SVGPathSeg", "SVGPathSegLinetoHorizontalAbs"); } @@ -610,7 +610,7 @@ public void _SVGPathSeg_SVGPathSegLinetoHorizontalAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegLinetoHorizontalRel() throws Exception { test("SVGPathSeg", "SVGPathSegLinetoHorizontalRel"); } @@ -619,7 +619,7 @@ public void _SVGPathSeg_SVGPathSegLinetoHorizontalRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegLinetoRel() throws Exception { test("SVGPathSeg", "SVGPathSegLinetoRel"); } @@ -628,7 +628,7 @@ public void _SVGPathSeg_SVGPathSegLinetoRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegLinetoVerticalAbs() throws Exception { test("SVGPathSeg", "SVGPathSegLinetoVerticalAbs"); } @@ -637,7 +637,7 @@ public void _SVGPathSeg_SVGPathSegLinetoVerticalAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegLinetoVerticalRel() throws Exception { test("SVGPathSeg", "SVGPathSegLinetoVerticalRel"); } @@ -646,7 +646,7 @@ public void _SVGPathSeg_SVGPathSegLinetoVerticalRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegMovetoAbs() throws Exception { test("SVGPathSeg", "SVGPathSegMovetoAbs"); } @@ -655,7 +655,7 @@ public void _SVGPathSeg_SVGPathSegMovetoAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSeg_SVGPathSegMovetoRel() throws Exception { test("SVGPathSeg", "SVGPathSegMovetoRel"); } @@ -664,7 +664,7 @@ public void _SVGPathSeg_SVGPathSegMovetoRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegArcAbs_SVGPathSegArcAbs() throws Exception { test("SVGPathSegArcAbs", "SVGPathSegArcAbs"); } @@ -673,7 +673,7 @@ public void _SVGPathSegArcAbs_SVGPathSegArcAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegArcRel_SVGPathSegArcRel() throws Exception { test("SVGPathSegArcRel", "SVGPathSegArcRel"); } @@ -682,7 +682,7 @@ public void _SVGPathSegArcRel_SVGPathSegArcRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegClosePath_SVGPathSegClosePath() throws Exception { test("SVGPathSegClosePath", "SVGPathSegClosePath"); } @@ -691,7 +691,7 @@ public void _SVGPathSegClosePath_SVGPathSegClosePath() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegCurvetoCubicAbs_SVGPathSegCurvetoCubicAbs() throws Exception { test("SVGPathSegCurvetoCubicAbs", "SVGPathSegCurvetoCubicAbs"); } @@ -700,7 +700,7 @@ public void _SVGPathSegCurvetoCubicAbs_SVGPathSegCurvetoCubicAbs() throws Except * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegCurvetoCubicRel_SVGPathSegCurvetoCubicRel() throws Exception { test("SVGPathSegCurvetoCubicRel", "SVGPathSegCurvetoCubicRel"); } @@ -709,7 +709,7 @@ public void _SVGPathSegCurvetoCubicRel_SVGPathSegCurvetoCubicRel() throws Except * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegCurvetoCubicSmoothAbs_SVGPathSegCurvetoCubicSmoothAbs() throws Exception { test("SVGPathSegCurvetoCubicSmoothAbs", "SVGPathSegCurvetoCubicSmoothAbs"); } @@ -718,7 +718,7 @@ public void _SVGPathSegCurvetoCubicSmoothAbs_SVGPathSegCurvetoCubicSmoothAbs() t * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegCurvetoCubicSmoothRel_SVGPathSegCurvetoCubicSmoothRel() throws Exception { test("SVGPathSegCurvetoCubicSmoothRel", "SVGPathSegCurvetoCubicSmoothRel"); } @@ -727,7 +727,7 @@ public void _SVGPathSegCurvetoCubicSmoothRel_SVGPathSegCurvetoCubicSmoothRel() t * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegCurvetoQuadraticAbs_SVGPathSegCurvetoQuadraticAbs() throws Exception { test("SVGPathSegCurvetoQuadraticAbs", "SVGPathSegCurvetoQuadraticAbs"); } @@ -736,7 +736,7 @@ public void _SVGPathSegCurvetoQuadraticAbs_SVGPathSegCurvetoQuadraticAbs() throw * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegCurvetoQuadraticRel_SVGPathSegCurvetoQuadraticRel() throws Exception { test("SVGPathSegCurvetoQuadraticRel", "SVGPathSegCurvetoQuadraticRel"); } @@ -745,7 +745,7 @@ public void _SVGPathSegCurvetoQuadraticRel_SVGPathSegCurvetoQuadraticRel() throw * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegCurvetoQuadraticSmoothAbs_SVGPathSegCurvetoQuadraticSmoothAbs() throws Exception { test("SVGPathSegCurvetoQuadraticSmoothAbs", "SVGPathSegCurvetoQuadraticSmoothAbs"); } @@ -754,7 +754,7 @@ public void _SVGPathSegCurvetoQuadraticSmoothAbs_SVGPathSegCurvetoQuadraticSmoot * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegCurvetoQuadraticSmoothRel_SVGPathSegCurvetoQuadraticSmoothRel() throws Exception { test("SVGPathSegCurvetoQuadraticSmoothRel", "SVGPathSegCurvetoQuadraticSmoothRel"); } @@ -763,7 +763,7 @@ public void _SVGPathSegCurvetoQuadraticSmoothRel_SVGPathSegCurvetoQuadraticSmoot * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegLinetoAbs_SVGPathSegLinetoAbs() throws Exception { test("SVGPathSegLinetoAbs", "SVGPathSegLinetoAbs"); } @@ -772,7 +772,7 @@ public void _SVGPathSegLinetoAbs_SVGPathSegLinetoAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegLinetoHorizontalAbs_SVGPathSegLinetoHorizontalAbs() throws Exception { test("SVGPathSegLinetoHorizontalAbs", "SVGPathSegLinetoHorizontalAbs"); } @@ -781,7 +781,7 @@ public void _SVGPathSegLinetoHorizontalAbs_SVGPathSegLinetoHorizontalAbs() throw * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegLinetoHorizontalRel_SVGPathSegLinetoHorizontalRel() throws Exception { test("SVGPathSegLinetoHorizontalRel", "SVGPathSegLinetoHorizontalRel"); } @@ -790,7 +790,7 @@ public void _SVGPathSegLinetoHorizontalRel_SVGPathSegLinetoHorizontalRel() throw * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegLinetoRel_SVGPathSegLinetoRel() throws Exception { test("SVGPathSegLinetoRel", "SVGPathSegLinetoRel"); } @@ -799,7 +799,7 @@ public void _SVGPathSegLinetoRel_SVGPathSegLinetoRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegLinetoVerticalAbs_SVGPathSegLinetoVerticalAbs() throws Exception { test("SVGPathSegLinetoVerticalAbs", "SVGPathSegLinetoVerticalAbs"); } @@ -808,7 +808,7 @@ public void _SVGPathSegLinetoVerticalAbs_SVGPathSegLinetoVerticalAbs() throws Ex * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegLinetoVerticalRel_SVGPathSegLinetoVerticalRel() throws Exception { test("SVGPathSegLinetoVerticalRel", "SVGPathSegLinetoVerticalRel"); } @@ -817,7 +817,7 @@ public void _SVGPathSegLinetoVerticalRel_SVGPathSegLinetoVerticalRel() throws Ex * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegList_SVGPathSegList() throws Exception { test("SVGPathSegList", "SVGPathSegList"); } @@ -826,7 +826,7 @@ public void _SVGPathSegList_SVGPathSegList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegMovetoAbs_SVGPathSegMovetoAbs() throws Exception { test("SVGPathSegMovetoAbs", "SVGPathSegMovetoAbs"); } @@ -835,7 +835,7 @@ public void _SVGPathSegMovetoAbs_SVGPathSegMovetoAbs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGPathSegMovetoRel_SVGPathSegMovetoRel() throws Exception { test("SVGPathSegMovetoRel", "SVGPathSegMovetoRel"); } @@ -844,7 +844,7 @@ public void _SVGPathSegMovetoRel_SVGPathSegMovetoRel() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGPatternElement_SVGPatternElement() throws Exception { test("SVGPatternElement", "SVGPatternElement"); } @@ -853,7 +853,7 @@ public void _SVGPatternElement_SVGPatternElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGPoint_SVGPoint() throws Exception { test("SVGPoint", "SVGPoint"); } @@ -862,7 +862,7 @@ public void _SVGPoint_SVGPoint() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGPointList_SVGPointList() throws Exception { test("SVGPointList", "SVGPointList"); } @@ -871,7 +871,7 @@ public void _SVGPointList_SVGPointList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGPolygonElement_SVGPolygonElement() throws Exception { test("SVGPolygonElement", "SVGPolygonElement"); } @@ -880,7 +880,7 @@ public void _SVGPolygonElement_SVGPolygonElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGPolylineElement_SVGPolylineElement() throws Exception { test("SVGPolylineElement", "SVGPolylineElement"); } @@ -889,7 +889,7 @@ public void _SVGPolylineElement_SVGPolylineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGPreserveAspectRatio_SVGPreserveAspectRatio() throws Exception { test("SVGPreserveAspectRatio", "SVGPreserveAspectRatio"); } @@ -898,7 +898,7 @@ public void _SVGPreserveAspectRatio_SVGPreserveAspectRatio() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGRadialGradientElement_SVGRadialGradientElement() throws Exception { test("SVGRadialGradientElement", "SVGRadialGradientElement"); } @@ -907,7 +907,7 @@ public void _SVGRadialGradientElement_SVGRadialGradientElement() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGRect_SVGRect() throws Exception { test("SVGRect", "SVGRect"); } @@ -916,7 +916,7 @@ public void _SVGRect_SVGRect() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGRectElement_SVGRectElement() throws Exception { test("SVGRectElement", "SVGRectElement"); } @@ -925,7 +925,7 @@ public void _SVGRectElement_SVGRectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGScriptElement_SVGScriptElement() throws Exception { test("SVGScriptElement", "SVGScriptElement"); } @@ -934,7 +934,7 @@ public void _SVGScriptElement_SVGScriptElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGSetElement_SVGSetElement() throws Exception { test("SVGSetElement", "SVGSetElement"); } @@ -943,7 +943,7 @@ public void _SVGSetElement_SVGSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGStopElement_SVGStopElement() throws Exception { test("SVGStopElement", "SVGStopElement"); } @@ -952,7 +952,7 @@ public void _SVGStopElement_SVGStopElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGStringList_SVGStringList() throws Exception { test("SVGStringList", "SVGStringList"); } @@ -961,7 +961,7 @@ public void _SVGStringList_SVGStringList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGStyleElement_SVGStyleElement() throws Exception { test("SVGStyleElement", "SVGStyleElement"); } @@ -970,7 +970,7 @@ public void _SVGStyleElement_SVGStyleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGSVGElement_SVGSVGElement() throws Exception { test("SVGSVGElement", "SVGSVGElement"); } @@ -979,7 +979,7 @@ public void _SVGSVGElement_SVGSVGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGSwitchElement_SVGSwitchElement() throws Exception { test("SVGSwitchElement", "SVGSwitchElement"); } @@ -988,7 +988,7 @@ public void _SVGSwitchElement_SVGSwitchElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGSymbolElement_SVGSymbolElement() throws Exception { test("SVGSymbolElement", "SVGSymbolElement"); } @@ -997,7 +997,7 @@ public void _SVGSymbolElement_SVGSymbolElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGTextContentElement_SVGTextContentElement() throws Exception { test("SVGTextContentElement", "SVGTextContentElement"); } @@ -1006,7 +1006,7 @@ public void _SVGTextContentElement_SVGTextContentElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGTextContentElement_SVGTextElement() throws Exception { test("SVGTextContentElement", "SVGTextElement"); } @@ -1015,7 +1015,7 @@ public void _SVGTextContentElement_SVGTextElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGTextContentElement_SVGTextPathElement() throws Exception { test("SVGTextContentElement", "SVGTextPathElement"); } @@ -1024,7 +1024,7 @@ public void _SVGTextContentElement_SVGTextPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGTextContentElement_SVGTextPositioningElement() throws Exception { test("SVGTextContentElement", "SVGTextPositioningElement"); } @@ -1033,7 +1033,7 @@ public void _SVGTextContentElement_SVGTextPositioningElement() throws Exception * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGTextContentElement_SVGTSpanElement() throws Exception { test("SVGTextContentElement", "SVGTSpanElement"); } @@ -1042,7 +1042,7 @@ public void _SVGTextContentElement_SVGTSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGTextElement_SVGTextElement() throws Exception { test("SVGTextElement", "SVGTextElement"); } @@ -1051,7 +1051,7 @@ public void _SVGTextElement_SVGTextElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGTextPathElement_SVGTextPathElement() throws Exception { test("SVGTextPathElement", "SVGTextPathElement"); } @@ -1060,7 +1060,7 @@ public void _SVGTextPathElement_SVGTextPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGTextPositioningElement_SVGTextElement() throws Exception { test("SVGTextPositioningElement", "SVGTextElement"); } @@ -1069,7 +1069,7 @@ public void _SVGTextPositioningElement_SVGTextElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGTextPositioningElement_SVGTextPositioningElement() throws Exception { test("SVGTextPositioningElement", "SVGTextPositioningElement"); } @@ -1078,7 +1078,7 @@ public void _SVGTextPositioningElement_SVGTextPositioningElement() throws Except * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGTextPositioningElement_SVGTSpanElement() throws Exception { test("SVGTextPositioningElement", "SVGTSpanElement"); } @@ -1087,7 +1087,7 @@ public void _SVGTextPositioningElement_SVGTSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGTitleElement_SVGTitleElement() throws Exception { test("SVGTitleElement", "SVGTitleElement"); } @@ -1096,7 +1096,7 @@ public void _SVGTitleElement_SVGTitleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGTransform_SVGTransform() throws Exception { test("SVGTransform", "SVGTransform"); } @@ -1105,7 +1105,7 @@ public void _SVGTransform_SVGTransform() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGTransformList_SVGTransformList() throws Exception { test("SVGTransformList", "SVGTransformList"); } @@ -1114,7 +1114,7 @@ public void _SVGTransformList_SVGTransformList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGTSpanElement_SVGTSpanElement() throws Exception { test("SVGTSpanElement", "SVGTSpanElement"); } @@ -1123,11 +1123,11 @@ public void _SVGTSpanElement_SVGTSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - @HtmlUnitNYI(FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") + @HtmlUnitNYI(FF = "true/false", + FF_ESR = "true/false") public void _SVGUnitTypes_SVGUnitTypes() throws Exception { test("SVGUnitTypes", "SVGUnitTypes"); } @@ -1136,7 +1136,7 @@ public void _SVGUnitTypes_SVGUnitTypes() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGUseElement_SVGUseElement() throws Exception { test("SVGUseElement", "SVGUseElement"); } @@ -1145,7 +1145,7 @@ public void _SVGUseElement_SVGUseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGViewElement_SVGViewElement() throws Exception { test("SVGViewElement", "SVGViewElement"); } @@ -1154,7 +1154,7 @@ public void _SVGViewElement_SVGViewElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SVGZoomEvent_SVGZoomEvent() throws Exception { test("SVGZoomEvent", "SVGZoomEvent"); } @@ -1163,7 +1163,7 @@ public void _SVGZoomEvent_SVGZoomEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Symbol_Symbol() throws Exception { test("Symbol", "Symbol"); } @@ -1172,9 +1172,9 @@ public void _Symbol_Symbol() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _SyncManager_SyncManager() throws Exception { test("SyncManager", "SyncManager"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfSTest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfSTest.java index 743d951e28b..b4b473aea12 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfSTest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfSTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,8 @@ import org.apache.commons.lang3.StringUtils; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -51,7 +52,7 @@ public static Collection data() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Screen_Screen() throws Exception { test("Screen", "Screen"); } @@ -60,7 +61,7 @@ public void _Screen_Screen() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ScreenOrientation_ScreenOrientation() throws Exception { test("ScreenOrientation", "ScreenOrientation"); } @@ -69,7 +70,7 @@ public void _ScreenOrientation_ScreenOrientation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ScriptProcessorNode_ScriptProcessorNode() throws Exception { test("ScriptProcessorNode", "ScriptProcessorNode"); } @@ -78,7 +79,7 @@ public void _ScriptProcessorNode_ScriptProcessorNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SecurityPolicyViolationEvent_SecurityPolicyViolationEvent() throws Exception { test("SecurityPolicyViolationEvent", "SecurityPolicyViolationEvent"); } @@ -87,7 +88,7 @@ public void _SecurityPolicyViolationEvent_SecurityPolicyViolationEvent() throws * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Selection_Selection() throws Exception { test("Selection", "Selection"); } @@ -96,7 +97,7 @@ public void _Selection_Selection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ServiceWorker_ServiceWorker() throws Exception { test("ServiceWorker", "ServiceWorker"); } @@ -105,7 +106,7 @@ public void _ServiceWorker_ServiceWorker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ServiceWorkerContainer_ServiceWorkerContainer() throws Exception { test("ServiceWorkerContainer", "ServiceWorkerContainer"); } @@ -114,7 +115,7 @@ public void _ServiceWorkerContainer_ServiceWorkerContainer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ServiceWorkerRegistration_ServiceWorkerRegistration() throws Exception { test("ServiceWorkerRegistration", "ServiceWorkerRegistration"); } @@ -123,7 +124,7 @@ public void _ServiceWorkerRegistration_ServiceWorkerRegistration() throws Except * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Set_Set() throws Exception { test("Set", "Set"); } @@ -132,7 +133,7 @@ public void _Set_Set() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _SharedArrayBuffer_SharedArrayBuffer() throws Exception { test("SharedArrayBuffer", "SharedArrayBuffer"); } @@ -141,7 +142,7 @@ public void _SharedArrayBuffer_SharedArrayBuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ShadowRoot_ShadowRoot() throws Exception { test("ShadowRoot", "ShadowRoot"); } @@ -150,7 +151,7 @@ public void _ShadowRoot_ShadowRoot() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SharedWorker_SharedWorker() throws Exception { test("SharedWorker", "SharedWorker"); } @@ -159,7 +160,7 @@ public void _SharedWorker_SharedWorker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SourceBuffer_SourceBuffer() throws Exception { test("SourceBuffer", "SourceBuffer"); } @@ -168,7 +169,7 @@ public void _SourceBuffer_SourceBuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SourceBufferList_SourceBufferList() throws Exception { test("SourceBufferList", "SourceBufferList"); } @@ -177,7 +178,7 @@ public void _SourceBufferList_SourceBufferList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SpeechSynthesis_SpeechSynthesis() throws Exception { test("SpeechSynthesis", "SpeechSynthesis"); } @@ -186,7 +187,7 @@ public void _SpeechSynthesis_SpeechSynthesis() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SpeechSynthesisErrorEvent_SpeechSynthesisErrorEvent() throws Exception { test("SpeechSynthesisErrorEvent", "SpeechSynthesisErrorEvent"); } @@ -195,7 +196,7 @@ public void _SpeechSynthesisErrorEvent_SpeechSynthesisErrorEvent() throws Except * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SpeechSynthesisEvent_SpeechSynthesisErrorEvent() throws Exception { test("SpeechSynthesisEvent", "SpeechSynthesisErrorEvent"); } @@ -204,7 +205,7 @@ public void _SpeechSynthesisEvent_SpeechSynthesisErrorEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SpeechSynthesisEvent_SpeechSynthesisEvent() throws Exception { test("SpeechSynthesisEvent", "SpeechSynthesisEvent"); } @@ -213,7 +214,7 @@ public void _SpeechSynthesisEvent_SpeechSynthesisEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SpeechSynthesisUtterance_SpeechSynthesisUtterance() throws Exception { test("SpeechSynthesisUtterance", "SpeechSynthesisUtterance"); } @@ -222,7 +223,7 @@ public void _SpeechSynthesisUtterance_SpeechSynthesisUtterance() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SpeechSynthesisVoice_SpeechSynthesisVoice() throws Exception { test("SpeechSynthesisVoice", "SpeechSynthesisVoice"); } @@ -231,7 +232,7 @@ public void _SpeechSynthesisVoice_SpeechSynthesisVoice() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _StereoPannerNode_StereoPannerNode() throws Exception { test("StereoPannerNode", "StereoPannerNode"); } @@ -240,7 +241,7 @@ public void _StereoPannerNode_StereoPannerNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Storage_Storage() throws Exception { test("Storage", "Storage"); } @@ -249,7 +250,7 @@ public void _Storage_Storage() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _StorageEvent_StorageEvent() throws Exception { test("StorageEvent", "StorageEvent"); } @@ -258,7 +259,7 @@ public void _StorageEvent_StorageEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _StorageManager_StorageManager() throws Exception { test("StorageManager", "StorageManager"); } @@ -267,7 +268,7 @@ public void _StorageManager_StorageManager() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _StyleMedia_StyleMedia() throws Exception { test("StyleMedia", "StyleMedia"); } @@ -276,7 +277,7 @@ public void _StyleMedia_StyleMedia() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _StyleSheet_CSSStyleSheet() throws Exception { test("StyleSheet", "CSSStyleSheet"); } @@ -285,7 +286,7 @@ public void _StyleSheet_CSSStyleSheet() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _StyleSheet_StyleSheet() throws Exception { test("StyleSheet", "StyleSheet"); } @@ -294,7 +295,7 @@ public void _StyleSheet_StyleSheet() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _StyleSheetList_StyleSheetList() throws Exception { test("StyleSheetList", "StyleSheetList"); } @@ -303,7 +304,7 @@ public void _StyleSheetList_StyleSheetList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SubmitEvent_SubmitEvent() throws Exception { test("SubmitEvent", "SubmitEvent"); } @@ -312,7 +313,7 @@ public void _SubmitEvent_SubmitEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SubtleCrypto_SubtleCrypto() throws Exception { test("SubtleCrypto", "SubtleCrypto"); } @@ -321,7 +322,7 @@ public void _SubtleCrypto_SubtleCrypto() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAElement_SVGAElement() throws Exception { test("SVGAElement", "SVGAElement"); } @@ -330,7 +331,7 @@ public void _SVGAElement_SVGAElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAngle_SVGAngle() throws Exception { test("SVGAngle", "SVGAngle"); } @@ -339,7 +340,7 @@ public void _SVGAngle_SVGAngle() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedAngle_SVGAnimatedAngle() throws Exception { test("SVGAnimatedAngle", "SVGAnimatedAngle"); } @@ -348,7 +349,7 @@ public void _SVGAnimatedAngle_SVGAnimatedAngle() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedBoolean_SVGAnimatedBoolean() throws Exception { test("SVGAnimatedBoolean", "SVGAnimatedBoolean"); } @@ -357,7 +358,7 @@ public void _SVGAnimatedBoolean_SVGAnimatedBoolean() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedEnumeration_SVGAnimatedEnumeration() throws Exception { test("SVGAnimatedEnumeration", "SVGAnimatedEnumeration"); } @@ -366,7 +367,7 @@ public void _SVGAnimatedEnumeration_SVGAnimatedEnumeration() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedInteger_SVGAnimatedInteger() throws Exception { test("SVGAnimatedInteger", "SVGAnimatedInteger"); } @@ -375,7 +376,7 @@ public void _SVGAnimatedInteger_SVGAnimatedInteger() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedLength_SVGAnimatedLength() throws Exception { test("SVGAnimatedLength", "SVGAnimatedLength"); } @@ -384,7 +385,7 @@ public void _SVGAnimatedLength_SVGAnimatedLength() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedLengthList_SVGAnimatedLengthList() throws Exception { test("SVGAnimatedLengthList", "SVGAnimatedLengthList"); } @@ -393,7 +394,7 @@ public void _SVGAnimatedLengthList_SVGAnimatedLengthList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedNumber_SVGAnimatedNumber() throws Exception { test("SVGAnimatedNumber", "SVGAnimatedNumber"); } @@ -402,7 +403,7 @@ public void _SVGAnimatedNumber_SVGAnimatedNumber() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedNumberList_SVGAnimatedNumberList() throws Exception { test("SVGAnimatedNumberList", "SVGAnimatedNumberList"); } @@ -411,7 +412,7 @@ public void _SVGAnimatedNumberList_SVGAnimatedNumberList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedPreserveAspectRatio_SVGAnimatedPreserveAspectRatio() throws Exception { test("SVGAnimatedPreserveAspectRatio", "SVGAnimatedPreserveAspectRatio"); } @@ -420,7 +421,7 @@ public void _SVGAnimatedPreserveAspectRatio_SVGAnimatedPreserveAspectRatio() thr * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedRect_SVGAnimatedRect() throws Exception { test("SVGAnimatedRect", "SVGAnimatedRect"); } @@ -429,7 +430,7 @@ public void _SVGAnimatedRect_SVGAnimatedRect() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedString_SVGAnimatedString() throws Exception { test("SVGAnimatedString", "SVGAnimatedString"); } @@ -438,7 +439,7 @@ public void _SVGAnimatedString_SVGAnimatedString() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimatedTransformList_SVGAnimatedTransformList() throws Exception { test("SVGAnimatedTransformList", "SVGAnimatedTransformList"); } @@ -447,7 +448,7 @@ public void _SVGAnimatedTransformList_SVGAnimatedTransformList() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimateElement_SVGAnimateElement() throws Exception { test("SVGAnimateElement", "SVGAnimateElement"); } @@ -456,7 +457,7 @@ public void _SVGAnimateElement_SVGAnimateElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimateMotionElement_SVGAnimateMotionElement() throws Exception { test("SVGAnimateMotionElement", "SVGAnimateMotionElement"); } @@ -465,7 +466,7 @@ public void _SVGAnimateMotionElement_SVGAnimateMotionElement() throws Exception * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimateTransformElement_SVGAnimateTransformElement() throws Exception { test("SVGAnimateTransformElement", "SVGAnimateTransformElement"); } @@ -474,7 +475,7 @@ public void _SVGAnimateTransformElement_SVGAnimateTransformElement() throws Exce * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGAnimationElement_SVGAnimateElement() throws Exception { test("SVGAnimationElement", "SVGAnimateElement"); } @@ -483,7 +484,7 @@ public void _SVGAnimationElement_SVGAnimateElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGAnimationElement_SVGAnimateMotionElement() throws Exception { test("SVGAnimationElement", "SVGAnimateMotionElement"); } @@ -492,7 +493,7 @@ public void _SVGAnimationElement_SVGAnimateMotionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGAnimationElement_SVGAnimateTransformElement() throws Exception { test("SVGAnimationElement", "SVGAnimateTransformElement"); } @@ -501,7 +502,7 @@ public void _SVGAnimationElement_SVGAnimateTransformElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGAnimationElement_SVGAnimationElement() throws Exception { test("SVGAnimationElement", "SVGAnimationElement"); } @@ -510,7 +511,17 @@ public void _SVGAnimationElement_SVGAnimationElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("false/false") + @HtmlUnitNYI(FF = "true/true") + public void _SVGAnimationElement_SVGDiscardElement() throws Exception { + test("SVGAnimationElement", "SVGDiscardElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true/true") public void _SVGAnimationElement_SVGSetElement() throws Exception { test("SVGAnimationElement", "SVGSetElement"); } @@ -519,7 +530,7 @@ public void _SVGAnimationElement_SVGSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGCircleElement_SVGCircleElement() throws Exception { test("SVGCircleElement", "SVGCircleElement"); } @@ -528,7 +539,7 @@ public void _SVGCircleElement_SVGCircleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGClipPathElement_SVGClipPathElement() throws Exception { test("SVGClipPathElement", "SVGClipPathElement"); } @@ -537,7 +548,7 @@ public void _SVGClipPathElement_SVGClipPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGComponentTransferFunctionElement_SVGComponentTransferFunctionElement() throws Exception { test("SVGComponentTransferFunctionElement", "SVGComponentTransferFunctionElement"); } @@ -546,7 +557,7 @@ public void _SVGComponentTransferFunctionElement_SVGComponentTransferFunctionEle * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGComponentTransferFunctionElement_SVGFEFuncAElement() throws Exception { test("SVGComponentTransferFunctionElement", "SVGFEFuncAElement"); } @@ -555,7 +566,7 @@ public void _SVGComponentTransferFunctionElement_SVGFEFuncAElement() throws Exce * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGComponentTransferFunctionElement_SVGFEFuncBElement() throws Exception { test("SVGComponentTransferFunctionElement", "SVGFEFuncBElement"); } @@ -564,7 +575,7 @@ public void _SVGComponentTransferFunctionElement_SVGFEFuncBElement() throws Exce * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGComponentTransferFunctionElement_SVGFEFuncGElement() throws Exception { test("SVGComponentTransferFunctionElement", "SVGFEFuncGElement"); } @@ -573,7 +584,7 @@ public void _SVGComponentTransferFunctionElement_SVGFEFuncGElement() throws Exce * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGComponentTransferFunctionElement_SVGFEFuncRElement() throws Exception { test("SVGComponentTransferFunctionElement", "SVGFEFuncRElement"); } @@ -582,7 +593,7 @@ public void _SVGComponentTransferFunctionElement_SVGFEFuncRElement() throws Exce * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGDefsElement_SVGDefsElement() throws Exception { test("SVGDefsElement", "SVGDefsElement"); } @@ -591,7 +602,7 @@ public void _SVGDefsElement_SVGDefsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGDescElement_SVGDescElement() throws Exception { test("SVGDescElement", "SVGDescElement"); } @@ -600,7 +611,17 @@ public void _SVGDescElement_SVGDescElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("false/false") + @HtmlUnitNYI(FF = "true/false") + public void _SVGDiscardElement_SVGDiscardElement() throws Exception { + test("SVGDiscardElement", "SVGDiscardElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true/false") public void _SVGElement_SVGAElement() throws Exception { test("SVGElement", "SVGAElement"); } @@ -609,7 +630,7 @@ public void _SVGElement_SVGAElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGAnimateElement() throws Exception { test("SVGElement", "SVGAnimateElement"); } @@ -618,7 +639,7 @@ public void _SVGElement_SVGAnimateElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGAnimateMotionElement() throws Exception { test("SVGElement", "SVGAnimateMotionElement"); } @@ -627,7 +648,7 @@ public void _SVGElement_SVGAnimateMotionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGAnimateTransformElement() throws Exception { test("SVGElement", "SVGAnimateTransformElement"); } @@ -636,7 +657,7 @@ public void _SVGElement_SVGAnimateTransformElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGAnimationElement() throws Exception { test("SVGElement", "SVGAnimationElement"); } @@ -645,7 +666,7 @@ public void _SVGElement_SVGAnimationElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGCircleElement() throws Exception { test("SVGElement", "SVGCircleElement"); } @@ -654,7 +675,7 @@ public void _SVGElement_SVGCircleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGClipPathElement() throws Exception { test("SVGElement", "SVGClipPathElement"); } @@ -663,7 +684,7 @@ public void _SVGElement_SVGClipPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGComponentTransferFunctionElement() throws Exception { test("SVGElement", "SVGComponentTransferFunctionElement"); } @@ -672,7 +693,7 @@ public void _SVGElement_SVGComponentTransferFunctionElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGDefsElement() throws Exception { test("SVGElement", "SVGDefsElement"); } @@ -681,7 +702,7 @@ public void _SVGElement_SVGDefsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGDescElement() throws Exception { test("SVGElement", "SVGDescElement"); } @@ -690,7 +711,17 @@ public void _SVGElement_SVGDescElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("false/false") + @HtmlUnitNYI(FF = "true/false") + public void _SVGElement_SVGDiscardElement() throws Exception { + test("SVGElement", "SVGDiscardElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true/false") public void _SVGElement_SVGElement() throws Exception { test("SVGElement", "SVGElement"); } @@ -699,7 +730,7 @@ public void _SVGElement_SVGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGEllipseElement() throws Exception { test("SVGElement", "SVGEllipseElement"); } @@ -708,7 +739,7 @@ public void _SVGElement_SVGEllipseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEBlendElement() throws Exception { test("SVGElement", "SVGFEBlendElement"); } @@ -717,7 +748,7 @@ public void _SVGElement_SVGFEBlendElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEColorMatrixElement() throws Exception { test("SVGElement", "SVGFEColorMatrixElement"); } @@ -726,7 +757,7 @@ public void _SVGElement_SVGFEColorMatrixElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEComponentTransferElement() throws Exception { test("SVGElement", "SVGFEComponentTransferElement"); } @@ -735,7 +766,7 @@ public void _SVGElement_SVGFEComponentTransferElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFECompositeElement() throws Exception { test("SVGElement", "SVGFECompositeElement"); } @@ -744,7 +775,7 @@ public void _SVGElement_SVGFECompositeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEConvolveMatrixElement() throws Exception { test("SVGElement", "SVGFEConvolveMatrixElement"); } @@ -753,7 +784,7 @@ public void _SVGElement_SVGFEConvolveMatrixElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEDiffuseLightingElement() throws Exception { test("SVGElement", "SVGFEDiffuseLightingElement"); } @@ -762,7 +793,7 @@ public void _SVGElement_SVGFEDiffuseLightingElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEDisplacementMapElement() throws Exception { test("SVGElement", "SVGFEDisplacementMapElement"); } @@ -771,7 +802,7 @@ public void _SVGElement_SVGFEDisplacementMapElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEDistantLightElement() throws Exception { test("SVGElement", "SVGFEDistantLightElement"); } @@ -780,7 +811,7 @@ public void _SVGElement_SVGFEDistantLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEDropShadowElement() throws Exception { test("SVGElement", "SVGFEDropShadowElement"); } @@ -789,7 +820,7 @@ public void _SVGElement_SVGFEDropShadowElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEFloodElement() throws Exception { test("SVGElement", "SVGFEFloodElement"); } @@ -798,7 +829,7 @@ public void _SVGElement_SVGFEFloodElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGFEFuncAElement() throws Exception { test("SVGElement", "SVGFEFuncAElement"); } @@ -807,7 +838,7 @@ public void _SVGElement_SVGFEFuncAElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGFEFuncBElement() throws Exception { test("SVGElement", "SVGFEFuncBElement"); } @@ -816,7 +847,7 @@ public void _SVGElement_SVGFEFuncBElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGFEFuncGElement() throws Exception { test("SVGElement", "SVGFEFuncGElement"); } @@ -825,7 +856,7 @@ public void _SVGElement_SVGFEFuncGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGFEFuncRElement() throws Exception { test("SVGElement", "SVGFEFuncRElement"); } @@ -834,7 +865,7 @@ public void _SVGElement_SVGFEFuncRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEGaussianBlurElement() throws Exception { test("SVGElement", "SVGFEGaussianBlurElement"); } @@ -843,7 +874,7 @@ public void _SVGElement_SVGFEGaussianBlurElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEImageElement() throws Exception { test("SVGElement", "SVGFEImageElement"); } @@ -852,7 +883,7 @@ public void _SVGElement_SVGFEImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEMergeElement() throws Exception { test("SVGElement", "SVGFEMergeElement"); } @@ -861,7 +892,7 @@ public void _SVGElement_SVGFEMergeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEMergeNodeElement() throws Exception { test("SVGElement", "SVGFEMergeNodeElement"); } @@ -870,7 +901,7 @@ public void _SVGElement_SVGFEMergeNodeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEMorphologyElement() throws Exception { test("SVGElement", "SVGFEMorphologyElement"); } @@ -879,7 +910,7 @@ public void _SVGElement_SVGFEMorphologyElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEOffsetElement() throws Exception { test("SVGElement", "SVGFEOffsetElement"); } @@ -888,7 +919,7 @@ public void _SVGElement_SVGFEOffsetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFEPointLightElement() throws Exception { test("SVGElement", "SVGFEPointLightElement"); } @@ -897,7 +928,7 @@ public void _SVGElement_SVGFEPointLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFESpecularLightingElement() throws Exception { test("SVGElement", "SVGFESpecularLightingElement"); } @@ -906,7 +937,7 @@ public void _SVGElement_SVGFESpecularLightingElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFESpotLightElement() throws Exception { test("SVGElement", "SVGFESpotLightElement"); } @@ -915,7 +946,7 @@ public void _SVGElement_SVGFESpotLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFETileElement() throws Exception { test("SVGElement", "SVGFETileElement"); } @@ -924,7 +955,7 @@ public void _SVGElement_SVGFETileElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFETurbulenceElement() throws Exception { test("SVGElement", "SVGFETurbulenceElement"); } @@ -933,7 +964,7 @@ public void _SVGElement_SVGFETurbulenceElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGFilterElement() throws Exception { test("SVGElement", "SVGFilterElement"); } @@ -942,7 +973,7 @@ public void _SVGElement_SVGFilterElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGForeignObjectElement() throws Exception { test("SVGElement", "SVGForeignObjectElement"); } @@ -951,7 +982,7 @@ public void _SVGElement_SVGForeignObjectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGGElement() throws Exception { test("SVGElement", "SVGGElement"); } @@ -960,7 +991,7 @@ public void _SVGElement_SVGGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGGeometryElement() throws Exception { test("SVGElement", "SVGGeometryElement"); } @@ -969,7 +1000,7 @@ public void _SVGElement_SVGGeometryElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGGradientElement() throws Exception { test("SVGElement", "SVGGradientElement"); } @@ -978,7 +1009,7 @@ public void _SVGElement_SVGGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGGraphicsElement() throws Exception { test("SVGElement", "SVGGraphicsElement"); } @@ -987,7 +1018,7 @@ public void _SVGElement_SVGGraphicsElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGImageElement() throws Exception { test("SVGElement", "SVGImageElement"); } @@ -996,7 +1027,7 @@ public void _SVGElement_SVGImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGLinearGradientElement() throws Exception { test("SVGElement", "SVGLinearGradientElement"); } @@ -1005,7 +1036,7 @@ public void _SVGElement_SVGLinearGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGLineElement() throws Exception { test("SVGElement", "SVGLineElement"); } @@ -1014,7 +1045,7 @@ public void _SVGElement_SVGLineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGMarkerElement() throws Exception { test("SVGElement", "SVGMarkerElement"); } @@ -1023,7 +1054,7 @@ public void _SVGElement_SVGMarkerElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGMaskElement() throws Exception { test("SVGElement", "SVGMaskElement"); } @@ -1032,7 +1063,7 @@ public void _SVGElement_SVGMaskElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGMetadataElement() throws Exception { test("SVGElement", "SVGMetadataElement"); } @@ -1041,7 +1072,7 @@ public void _SVGElement_SVGMetadataElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGMPathElement() throws Exception { test("SVGElement", "SVGMPathElement"); } @@ -1050,7 +1081,7 @@ public void _SVGElement_SVGMPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGPathElement() throws Exception { test("SVGElement", "SVGPathElement"); } @@ -1059,7 +1090,7 @@ public void _SVGElement_SVGPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGPatternElement() throws Exception { test("SVGElement", "SVGPatternElement"); } @@ -1068,7 +1099,7 @@ public void _SVGElement_SVGPatternElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGPolygonElement() throws Exception { test("SVGElement", "SVGPolygonElement"); } @@ -1077,7 +1108,7 @@ public void _SVGElement_SVGPolygonElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGPolylineElement() throws Exception { test("SVGElement", "SVGPolylineElement"); } @@ -1086,7 +1117,7 @@ public void _SVGElement_SVGPolylineElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGRadialGradientElement() throws Exception { test("SVGElement", "SVGRadialGradientElement"); } @@ -1095,7 +1126,7 @@ public void _SVGElement_SVGRadialGradientElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGRectElement() throws Exception { test("SVGElement", "SVGRectElement"); } @@ -1104,7 +1135,7 @@ public void _SVGElement_SVGRectElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGScriptElement() throws Exception { test("SVGElement", "SVGScriptElement"); } @@ -1113,7 +1144,7 @@ public void _SVGElement_SVGScriptElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGSetElement() throws Exception { test("SVGElement", "SVGSetElement"); } @@ -1122,7 +1153,7 @@ public void _SVGElement_SVGSetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGStopElement() throws Exception { test("SVGElement", "SVGStopElement"); } @@ -1131,7 +1162,7 @@ public void _SVGElement_SVGStopElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGStyleElement() throws Exception { test("SVGElement", "SVGStyleElement"); } @@ -1140,7 +1171,7 @@ public void _SVGElement_SVGStyleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGSVGElement() throws Exception { test("SVGElement", "SVGSVGElement"); } @@ -1149,7 +1180,7 @@ public void _SVGElement_SVGSVGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGSwitchElement() throws Exception { test("SVGElement", "SVGSwitchElement"); } @@ -1158,7 +1189,7 @@ public void _SVGElement_SVGSwitchElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGSymbolElement() throws Exception { test("SVGElement", "SVGSymbolElement"); } @@ -1167,7 +1198,7 @@ public void _SVGElement_SVGSymbolElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGTextContentElement() throws Exception { test("SVGElement", "SVGTextContentElement"); } @@ -1176,7 +1207,7 @@ public void _SVGElement_SVGTextContentElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGTextElement() throws Exception { test("SVGElement", "SVGTextElement"); } @@ -1185,7 +1216,7 @@ public void _SVGElement_SVGTextElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGTextPathElement() throws Exception { test("SVGElement", "SVGTextPathElement"); } @@ -1194,7 +1225,7 @@ public void _SVGElement_SVGTextPathElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGTextPositioningElement() throws Exception { test("SVGElement", "SVGTextPositioningElement"); } @@ -1203,7 +1234,7 @@ public void _SVGElement_SVGTextPositioningElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGTitleElement() throws Exception { test("SVGElement", "SVGTitleElement"); } @@ -1212,7 +1243,7 @@ public void _SVGElement_SVGTitleElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGTSpanElement() throws Exception { test("SVGElement", "SVGTSpanElement"); } @@ -1221,7 +1252,7 @@ public void _SVGElement_SVGTSpanElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGElement_SVGUseElement() throws Exception { test("SVGElement", "SVGUseElement"); } @@ -1230,7 +1261,7 @@ public void _SVGElement_SVGUseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _SVGElement_SVGViewElement() throws Exception { test("SVGElement", "SVGViewElement"); } @@ -1239,7 +1270,7 @@ public void _SVGElement_SVGViewElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGEllipseElement_SVGEllipseElement() throws Exception { test("SVGEllipseElement", "SVGEllipseElement"); } @@ -1248,7 +1279,7 @@ public void _SVGEllipseElement_SVGEllipseElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEBlendElement_SVGFEBlendElement() throws Exception { test("SVGFEBlendElement", "SVGFEBlendElement"); } @@ -1257,7 +1288,7 @@ public void _SVGFEBlendElement_SVGFEBlendElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEColorMatrixElement_SVGFEColorMatrixElement() throws Exception { test("SVGFEColorMatrixElement", "SVGFEColorMatrixElement"); } @@ -1266,7 +1297,7 @@ public void _SVGFEColorMatrixElement_SVGFEColorMatrixElement() throws Exception * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEComponentTransferElement_SVGFEComponentTransferElement() throws Exception { test("SVGFEComponentTransferElement", "SVGFEComponentTransferElement"); } @@ -1275,7 +1306,7 @@ public void _SVGFEComponentTransferElement_SVGFEComponentTransferElement() throw * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFECompositeElement_SVGFECompositeElement() throws Exception { test("SVGFECompositeElement", "SVGFECompositeElement"); } @@ -1284,7 +1315,7 @@ public void _SVGFECompositeElement_SVGFECompositeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEConvolveMatrixElement_SVGFEConvolveMatrixElement() throws Exception { test("SVGFEConvolveMatrixElement", "SVGFEConvolveMatrixElement"); } @@ -1293,7 +1324,7 @@ public void _SVGFEConvolveMatrixElement_SVGFEConvolveMatrixElement() throws Exce * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEDiffuseLightingElement_SVGFEDiffuseLightingElement() throws Exception { test("SVGFEDiffuseLightingElement", "SVGFEDiffuseLightingElement"); } @@ -1302,7 +1333,7 @@ public void _SVGFEDiffuseLightingElement_SVGFEDiffuseLightingElement() throws Ex * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEDisplacementMapElement_SVGFEDisplacementMapElement() throws Exception { test("SVGFEDisplacementMapElement", "SVGFEDisplacementMapElement"); } @@ -1311,7 +1342,7 @@ public void _SVGFEDisplacementMapElement_SVGFEDisplacementMapElement() throws Ex * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEDistantLightElement_SVGFEDistantLightElement() throws Exception { test("SVGFEDistantLightElement", "SVGFEDistantLightElement"); } @@ -1320,7 +1351,7 @@ public void _SVGFEDistantLightElement_SVGFEDistantLightElement() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEDropShadowElement_SVGFEDropShadowElement() throws Exception { test("SVGFEDropShadowElement", "SVGFEDropShadowElement"); } @@ -1329,7 +1360,7 @@ public void _SVGFEDropShadowElement_SVGFEDropShadowElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEFloodElement_SVGFEFloodElement() throws Exception { test("SVGFEFloodElement", "SVGFEFloodElement"); } @@ -1338,7 +1369,7 @@ public void _SVGFEFloodElement_SVGFEFloodElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEFuncAElement_SVGFEFuncAElement() throws Exception { test("SVGFEFuncAElement", "SVGFEFuncAElement"); } @@ -1347,7 +1378,7 @@ public void _SVGFEFuncAElement_SVGFEFuncAElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEFuncBElement_SVGFEFuncBElement() throws Exception { test("SVGFEFuncBElement", "SVGFEFuncBElement"); } @@ -1356,7 +1387,7 @@ public void _SVGFEFuncBElement_SVGFEFuncBElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEFuncGElement_SVGFEFuncGElement() throws Exception { test("SVGFEFuncGElement", "SVGFEFuncGElement"); } @@ -1365,7 +1396,7 @@ public void _SVGFEFuncGElement_SVGFEFuncGElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEFuncRElement_SVGFEFuncRElement() throws Exception { test("SVGFEFuncRElement", "SVGFEFuncRElement"); } @@ -1374,7 +1405,7 @@ public void _SVGFEFuncRElement_SVGFEFuncRElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEGaussianBlurElement_SVGFEGaussianBlurElement() throws Exception { test("SVGFEGaussianBlurElement", "SVGFEGaussianBlurElement"); } @@ -1383,7 +1414,7 @@ public void _SVGFEGaussianBlurElement_SVGFEGaussianBlurElement() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEImageElement_SVGFEImageElement() throws Exception { test("SVGFEImageElement", "SVGFEImageElement"); } @@ -1392,7 +1423,7 @@ public void _SVGFEImageElement_SVGFEImageElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEMergeElement_SVGFEMergeElement() throws Exception { test("SVGFEMergeElement", "SVGFEMergeElement"); } @@ -1401,7 +1432,7 @@ public void _SVGFEMergeElement_SVGFEMergeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEMergeNodeElement_SVGFEMergeNodeElement() throws Exception { test("SVGFEMergeNodeElement", "SVGFEMergeNodeElement"); } @@ -1410,7 +1441,7 @@ public void _SVGFEMergeNodeElement_SVGFEMergeNodeElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEMorphologyElement_SVGFEMorphologyElement() throws Exception { test("SVGFEMorphologyElement", "SVGFEMorphologyElement"); } @@ -1419,7 +1450,7 @@ public void _SVGFEMorphologyElement_SVGFEMorphologyElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEOffsetElement_SVGFEOffsetElement() throws Exception { test("SVGFEOffsetElement", "SVGFEOffsetElement"); } @@ -1428,7 +1459,7 @@ public void _SVGFEOffsetElement_SVGFEOffsetElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFEPointLightElement_SVGFEPointLightElement() throws Exception { test("SVGFEPointLightElement", "SVGFEPointLightElement"); } @@ -1437,7 +1468,7 @@ public void _SVGFEPointLightElement_SVGFEPointLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFESpecularLightingElement_SVGFESpecularLightingElement() throws Exception { test("SVGFESpecularLightingElement", "SVGFESpecularLightingElement"); } @@ -1446,7 +1477,7 @@ public void _SVGFESpecularLightingElement_SVGFESpecularLightingElement() throws * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFESpotLightElement_SVGFESpotLightElement() throws Exception { test("SVGFESpotLightElement", "SVGFESpotLightElement"); } @@ -1455,7 +1486,7 @@ public void _SVGFESpotLightElement_SVGFESpotLightElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFETileElement_SVGFETileElement() throws Exception { test("SVGFETileElement", "SVGFETileElement"); } @@ -1464,7 +1495,7 @@ public void _SVGFETileElement_SVGFETileElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFETurbulenceElement_SVGFETurbulenceElement() throws Exception { test("SVGFETurbulenceElement", "SVGFETurbulenceElement"); } @@ -1473,7 +1504,7 @@ public void _SVGFETurbulenceElement_SVGFETurbulenceElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGFilterElement_SVGFilterElement() throws Exception { test("SVGFilterElement", "SVGFilterElement"); } @@ -1482,7 +1513,7 @@ public void _SVGFilterElement_SVGFilterElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _SVGForeignObjectElement_SVGForeignObjectElement() throws Exception { test("SVGForeignObjectElement", "SVGForeignObjectElement"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfTTest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfTTest.java index f05ec67af60..e93f4df7df2 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfTTest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfTTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -50,7 +50,7 @@ public static Collection data() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _Text_CDATASection() throws Exception { test("Text", "CDATASection"); } @@ -59,7 +59,7 @@ public void _Text_CDATASection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Text_Text() throws Exception { test("Text", "Text"); } @@ -68,7 +68,7 @@ public void _Text_Text() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _TextDecoder_TextDecoder() throws Exception { test("TextDecoder", "TextDecoder"); } @@ -77,7 +77,7 @@ public void _TextDecoder_TextDecoder() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _TextEncoder_TextEncoder() throws Exception { test("TextEncoder", "TextEncoder"); } @@ -86,8 +86,8 @@ public void _TextEncoder_TextEncoder() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "true", - FF_ESR = "false") + @Alerts(DEFAULT = "true/false", + FF_ESR = "false/false") public void _TextEvent_TextEvent() throws Exception { test("TextEvent", "TextEvent"); } @@ -96,7 +96,7 @@ public void _TextEvent_TextEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _TextMetrics_TextMetrics() throws Exception { test("TextMetrics", "TextMetrics"); } @@ -105,7 +105,7 @@ public void _TextMetrics_TextMetrics() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _TextRange_TextRange() throws Exception { test("TextRange", "TextRange"); } @@ -114,7 +114,7 @@ public void _TextRange_TextRange() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _TextTrack_TextTrack() throws Exception { test("TextTrack", "TextTrack"); } @@ -123,7 +123,7 @@ public void _TextTrack_TextTrack() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _TextTrackCue_TextTrackCue() throws Exception { test("TextTrackCue", "TextTrackCue"); } @@ -132,7 +132,7 @@ public void _TextTrackCue_TextTrackCue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _TextTrackCue_VTTCue() throws Exception { test("TextTrackCue", "VTTCue"); } @@ -141,7 +141,7 @@ public void _TextTrackCue_VTTCue() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _TextTrackCueList_TextTrackCueList() throws Exception { test("TextTrackCueList", "TextTrackCueList"); } @@ -150,7 +150,7 @@ public void _TextTrackCueList_TextTrackCueList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _TextTrackList_TextTrackList() throws Exception { test("TextTrackList", "TextTrackList"); } @@ -159,9 +159,9 @@ public void _TextTrackList_TextTrackList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _TimeEvent_TimeEvent() throws Exception { test("TimeEvent", "TimeEvent"); } @@ -170,7 +170,7 @@ public void _TimeEvent_TimeEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _TimeRanges_TimeRanges() throws Exception { test("TimeRanges", "TimeRanges"); } @@ -179,9 +179,9 @@ public void _TimeRanges_TimeRanges() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _Touch_Touch() throws Exception { test("Touch", "Touch"); } @@ -190,9 +190,9 @@ public void _Touch_Touch() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _TouchEvent_TouchEvent() throws Exception { test("TouchEvent", "TouchEvent"); } @@ -201,9 +201,9 @@ public void _TouchEvent_TouchEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _TouchList_TouchList() throws Exception { test("TouchList", "TouchList"); } @@ -212,7 +212,7 @@ public void _TouchList_TouchList() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _TrackEvent_TrackEvent() throws Exception { test("TrackEvent", "TrackEvent"); } @@ -221,7 +221,7 @@ public void _TrackEvent_TrackEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _TransitionEvent_TransitionEvent() throws Exception { test("TransitionEvent", "TransitionEvent"); } @@ -230,7 +230,7 @@ public void _TransitionEvent_TransitionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _TreeWalker_TreeWalker() throws Exception { test("TreeWalker", "TreeWalker"); } @@ -239,7 +239,7 @@ public void _TreeWalker_TreeWalker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _UIEvent_CompositionEvent() throws Exception { test("UIEvent", "CompositionEvent"); } @@ -248,7 +248,7 @@ public void _UIEvent_CompositionEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _UIEvent_DragEvent() throws Exception { test("UIEvent", "DragEvent"); } @@ -257,7 +257,7 @@ public void _UIEvent_DragEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _UIEvent_FocusEvent() throws Exception { test("UIEvent", "FocusEvent"); } @@ -266,7 +266,7 @@ public void _UIEvent_FocusEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _UIEvent_InputEvent() throws Exception { test("UIEvent", "InputEvent"); } @@ -275,7 +275,7 @@ public void _UIEvent_InputEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _UIEvent_KeyboardEvent() throws Exception { test("UIEvent", "KeyboardEvent"); } @@ -284,7 +284,7 @@ public void _UIEvent_KeyboardEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _UIEvent_MouseEvent() throws Exception { test("UIEvent", "MouseEvent"); } @@ -293,9 +293,9 @@ public void _UIEvent_MouseEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - FF = "true", - FF_ESR = "true") + @Alerts(DEFAULT = "false/false", + FF = "true/false", + FF_ESR = "true/false") public void _UIEvent_MouseScrollEvent() throws Exception { test("UIEvent", "MouseScrollEvent"); } @@ -304,7 +304,7 @@ public void _UIEvent_MouseScrollEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _UIEvent_MouseWheelEvent() throws Exception { test("UIEvent", "MouseWheelEvent"); } @@ -313,7 +313,7 @@ public void _UIEvent_MouseWheelEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _UIEvent_MSGestureEvent() throws Exception { test("UIEvent", "MSGestureEvent"); } @@ -322,7 +322,7 @@ public void _UIEvent_MSGestureEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _UIEvent_PointerEvent() throws Exception { test("UIEvent", "PointerEvent"); } @@ -331,7 +331,7 @@ public void _UIEvent_PointerEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _UIEvent_SVGZoomEvent() throws Exception { test("UIEvent", "SVGZoomEvent"); } @@ -340,8 +340,8 @@ public void _UIEvent_SVGZoomEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "true", - FF_ESR = "false") + @Alerts(DEFAULT = "true/true", + FF_ESR = "false/false") public void _UIEvent_TextEvent() throws Exception { test("UIEvent", "TextEvent"); } @@ -350,9 +350,9 @@ public void _UIEvent_TextEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/true", + EDGE = "true/true") public void _UIEvent_TouchEvent() throws Exception { test("UIEvent", "TouchEvent"); } @@ -361,7 +361,7 @@ public void _UIEvent_TouchEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _UIEvent_UIEvent() throws Exception { test("UIEvent", "UIEvent"); } @@ -370,7 +370,7 @@ public void _UIEvent_UIEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _UIEvent_WheelEvent() throws Exception { test("UIEvent", "WheelEvent"); } @@ -379,7 +379,7 @@ public void _UIEvent_WheelEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Uint16Array_Uint16Array() throws Exception { test("Uint16Array", "Uint16Array"); } @@ -388,7 +388,7 @@ public void _Uint16Array_Uint16Array() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Uint32Array_Uint32Array() throws Exception { test("Uint32Array", "Uint32Array"); } @@ -397,7 +397,7 @@ public void _Uint32Array_Uint32Array() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Uint8Array_Uint8Array() throws Exception { test("Uint8Array", "Uint8Array"); } @@ -406,7 +406,7 @@ public void _Uint8Array_Uint8Array() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Uint8ClampedArray_Uint8ClampedArray() throws Exception { test("Uint8ClampedArray", "Uint8ClampedArray"); } @@ -415,7 +415,7 @@ public void _Uint8ClampedArray_Uint8ClampedArray() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _URIError_URIError() throws Exception { test("URIError", "URIError"); } @@ -424,7 +424,7 @@ public void _URIError_URIError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _URL_URL() throws Exception { test("URL", "URL"); } @@ -433,7 +433,7 @@ public void _URL_URL() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _URL_webkitURL() throws Exception { test("URL", "webkitURL"); } @@ -442,7 +442,7 @@ public void _URL_webkitURL() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _URLSearchParams_URLSearchParams() throws Exception { test("URLSearchParams", "URLSearchParams"); } @@ -451,7 +451,7 @@ public void _URLSearchParams_URLSearchParams() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _UserProximityEvent_UserProximityEvent() throws Exception { test("UserProximityEvent", "UserProximityEvent"); } @@ -460,7 +460,7 @@ public void _UserProximityEvent_UserProximityEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _ValidityState_ValidityState() throws Exception { test("ValidityState", "ValidityState"); } @@ -469,7 +469,7 @@ public void _ValidityState_ValidityState() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _VideoPlaybackQuality_VideoPlaybackQuality() throws Exception { test("VideoPlaybackQuality", "VideoPlaybackQuality"); } @@ -478,7 +478,7 @@ public void _VideoPlaybackQuality_VideoPlaybackQuality() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _VTTCue_VTTCue() throws Exception { test("VTTCue", "VTTCue"); } diff --git a/src/test/java/org/htmlunit/general/huge/HostParentOfWTest.java b/src/test/java/org/htmlunit/general/huge/HostParentOfWTest.java index 9c188ea1df8..cffe0922e7d 100644 --- a/src/test/java/org/htmlunit/general/huge/HostParentOfWTest.java +++ b/src/test/java/org/htmlunit/general/huge/HostParentOfWTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import java.util.Collection; import org.htmlunit.junit.BrowserParameterizedRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; @@ -50,7 +50,7 @@ public static Collection data() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WaveShaperNode_WaveShaperNode() throws Exception { test("WaveShaperNode", "WaveShaperNode"); } @@ -59,7 +59,7 @@ public void _WaveShaperNode_WaveShaperNode() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WeakMap_WeakMap() throws Exception { test("WeakMap", "WeakMap"); } @@ -68,7 +68,7 @@ public void _WeakMap_WeakMap() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WeakSet_WeakSet() throws Exception { test("WeakSet", "WeakSet"); } @@ -77,7 +77,7 @@ public void _WeakSet_WeakSet() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _WEBGL_compressed_texture_s3tc_WEBGL_compressed_texture_s3tc() throws Exception { test("WEBGL_compressed_texture_s3tc", "WEBGL_compressed_texture_s3tc"); } @@ -86,7 +86,7 @@ public void _WEBGL_compressed_texture_s3tc_WEBGL_compressed_texture_s3tc() throw * @throws Exception if the test fails */ @Test - @Alerts("false") + @Alerts("false/false") public void _WEBGL_debug_renderer_info_WEBGL_debug_renderer_info() throws Exception { test("WEBGL_debug_renderer_info", "WEBGL_debug_renderer_info"); } @@ -95,7 +95,7 @@ public void _WEBGL_debug_renderer_info_WEBGL_debug_renderer_info() throws Except * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGL2RenderingContext_WebGL2RenderingContext() throws Exception { test("WebGL2RenderingContext", "WebGL2RenderingContext"); } @@ -104,7 +104,7 @@ public void _WebGL2RenderingContext_WebGL2RenderingContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLActiveInfo_WebGLActiveInfo() throws Exception { test("WebGLActiveInfo", "WebGLActiveInfo"); } @@ -113,7 +113,7 @@ public void _WebGLActiveInfo_WebGLActiveInfo() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLBuffer_WebGLBuffer() throws Exception { test("WebGLBuffer", "WebGLBuffer"); } @@ -122,7 +122,7 @@ public void _WebGLBuffer_WebGLBuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLContextEvent_WebGLContextEvent() throws Exception { test("WebGLContextEvent", "WebGLContextEvent"); } @@ -131,7 +131,7 @@ public void _WebGLContextEvent_WebGLContextEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLFramebuffer_WebGLFramebuffer() throws Exception { test("WebGLFramebuffer", "WebGLFramebuffer"); } @@ -140,7 +140,7 @@ public void _WebGLFramebuffer_WebGLFramebuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLProgram_WebGLProgram() throws Exception { test("WebGLProgram", "WebGLProgram"); } @@ -149,7 +149,7 @@ public void _WebGLProgram_WebGLProgram() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLQuery_WebGLQuery() throws Exception { test("WebGLQuery", "WebGLQuery"); } @@ -158,7 +158,7 @@ public void _WebGLQuery_WebGLQuery() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLRenderbuffer_WebGLRenderbuffer() throws Exception { test("WebGLRenderbuffer", "WebGLRenderbuffer"); } @@ -167,7 +167,7 @@ public void _WebGLRenderbuffer_WebGLRenderbuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLRenderingContext_WebGLRenderingContext() throws Exception { test("WebGLRenderingContext", "WebGLRenderingContext"); } @@ -176,7 +176,7 @@ public void _WebGLRenderingContext_WebGLRenderingContext() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLSampler_WebGLSampler() throws Exception { test("WebGLSampler", "WebGLSampler"); } @@ -185,7 +185,7 @@ public void _WebGLSampler_WebGLSampler() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLShader_WebGLShader() throws Exception { test("WebGLShader", "WebGLShader"); } @@ -194,7 +194,7 @@ public void _WebGLShader_WebGLShader() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLShaderPrecisionFormat_WebGLShaderPrecisionFormat() throws Exception { test("WebGLShaderPrecisionFormat", "WebGLShaderPrecisionFormat"); } @@ -203,7 +203,7 @@ public void _WebGLShaderPrecisionFormat_WebGLShaderPrecisionFormat() throws Exce * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLSync_WebGLSync() throws Exception { test("WebGLSync", "WebGLSync"); } @@ -212,7 +212,7 @@ public void _WebGLSync_WebGLSync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLTexture_WebGLTexture() throws Exception { test("WebGLTexture", "WebGLTexture"); } @@ -221,7 +221,7 @@ public void _WebGLTexture_WebGLTexture() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLTransformFeedback_WebGLTransformFeedback() throws Exception { test("WebGLTransformFeedback", "WebGLTransformFeedback"); } @@ -230,7 +230,7 @@ public void _WebGLTransformFeedback_WebGLTransformFeedback() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLUniformLocation_WebGLUniformLocation() throws Exception { test("WebGLUniformLocation", "WebGLUniformLocation"); } @@ -239,7 +239,7 @@ public void _WebGLUniformLocation_WebGLUniformLocation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebGLVertexArrayObject_WebGLVertexArrayObject() throws Exception { test("WebGLVertexArrayObject", "WebGLVertexArrayObject"); } @@ -248,7 +248,7 @@ public void _WebGLVertexArrayObject_WebGLVertexArrayObject() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebKitCSSMatrix_DOMMatrix() throws Exception { test("WebKitCSSMatrix", "DOMMatrix"); } @@ -257,7 +257,7 @@ public void _WebKitCSSMatrix_DOMMatrix() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebKitCSSMatrix_WebKitCSSMatrix() throws Exception { test("WebKitCSSMatrix", "WebKitCSSMatrix"); } @@ -266,9 +266,9 @@ public void _WebKitCSSMatrix_WebKitCSSMatrix() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _webkitMediaStream_MediaStream() throws Exception { test("webkitMediaStream", "MediaStream"); } @@ -277,9 +277,9 @@ public void _webkitMediaStream_MediaStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _webkitMediaStream_webkitMediaStream() throws Exception { test("webkitMediaStream", "webkitMediaStream"); } @@ -288,9 +288,9 @@ public void _webkitMediaStream_webkitMediaStream() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _WebKitMutationObserver_MutationObserver() throws Exception { test("WebKitMutationObserver", "MutationObserver"); } @@ -299,9 +299,9 @@ public void _WebKitMutationObserver_MutationObserver() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _WebKitMutationObserver_WebKitMutationObserver() throws Exception { test("WebKitMutationObserver", "WebKitMutationObserver"); } @@ -310,9 +310,9 @@ public void _WebKitMutationObserver_WebKitMutationObserver() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _webkitRTCPeerConnection_RTCPeerConnection() throws Exception { test("webkitRTCPeerConnection", "RTCPeerConnection"); } @@ -321,9 +321,9 @@ public void _webkitRTCPeerConnection_RTCPeerConnection() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _webkitRTCPeerConnection_webkitRTCPeerConnection() throws Exception { test("webkitRTCPeerConnection", "webkitRTCPeerConnection"); } @@ -332,9 +332,9 @@ public void _webkitRTCPeerConnection_webkitRTCPeerConnection() throws Exception * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _webkitSpeechGrammar_webkitSpeechGrammar() throws Exception { test("webkitSpeechGrammar", "webkitSpeechGrammar"); } @@ -343,9 +343,9 @@ public void _webkitSpeechGrammar_webkitSpeechGrammar() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _webkitSpeechGrammarList_webkitSpeechGrammarList() throws Exception { test("webkitSpeechGrammarList", "webkitSpeechGrammarList"); } @@ -354,9 +354,9 @@ public void _webkitSpeechGrammarList_webkitSpeechGrammarList() throws Exception * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _webkitSpeechRecognition_webkitSpeechRecognition() throws Exception { test("webkitSpeechRecognition", "webkitSpeechRecognition"); } @@ -365,9 +365,9 @@ public void _webkitSpeechRecognition_webkitSpeechRecognition() throws Exception * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _webkitSpeechRecognitionError_webkitSpeechRecognitionError() throws Exception { test("webkitSpeechRecognitionError", "webkitSpeechRecognitionError"); } @@ -376,9 +376,9 @@ public void _webkitSpeechRecognitionError_webkitSpeechRecognitionError() throws * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts(DEFAULT = "false/false", + CHROME = "true/false", + EDGE = "true/false") public void _webkitSpeechRecognitionEvent_webkitSpeechRecognitionEvent() throws Exception { test("webkitSpeechRecognitionEvent", "webkitSpeechRecognitionEvent"); } @@ -387,7 +387,7 @@ public void _webkitSpeechRecognitionEvent_webkitSpeechRecognitionEvent() throws * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _webkitURL_URL() throws Exception { test("webkitURL", "URL"); } @@ -396,7 +396,7 @@ public void _webkitURL_URL() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _webkitURL_webkitURL() throws Exception { test("webkitURL", "webkitURL"); } @@ -405,7 +405,7 @@ public void _webkitURL_webkitURL() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WebSocket_WebSocket() throws Exception { test("WebSocket", "WebSocket"); } @@ -414,7 +414,7 @@ public void _WebSocket_WebSocket() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _WheelEvent_WheelEvent() throws Exception { test("WheelEvent", "WheelEvent"); } @@ -423,7 +423,7 @@ public void _WheelEvent_WheelEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Window_Window() throws Exception { test("Window", "Window"); } @@ -432,7 +432,7 @@ public void _Window_Window() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _Worker_Worker() throws Exception { test("Worker", "Worker"); } @@ -441,7 +441,7 @@ public void _Worker_Worker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _XMLDocument_XMLDocument() throws Exception { test("XMLDocument", "XMLDocument"); } @@ -450,7 +450,7 @@ public void _XMLDocument_XMLDocument() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _XMLHttpRequest_XMLHttpRequest() throws Exception { test("XMLHttpRequest", "XMLHttpRequest"); } @@ -459,7 +459,7 @@ public void _XMLHttpRequest_XMLHttpRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _XMLHttpRequestEventTarget_XMLHttpRequest() throws Exception { test("XMLHttpRequestEventTarget", "XMLHttpRequest"); } @@ -468,7 +468,7 @@ public void _XMLHttpRequestEventTarget_XMLHttpRequest() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _XMLHttpRequestEventTarget_XMLHttpRequestEventTarget() throws Exception { test("XMLHttpRequestEventTarget", "XMLHttpRequestEventTarget"); } @@ -477,7 +477,7 @@ public void _XMLHttpRequestEventTarget_XMLHttpRequestEventTarget() throws Except * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/true") public void _XMLHttpRequestEventTarget_XMLHttpRequestUpload() throws Exception { test("XMLHttpRequestEventTarget", "XMLHttpRequestUpload"); } @@ -486,7 +486,7 @@ public void _XMLHttpRequestEventTarget_XMLHttpRequestUpload() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _XMLHttpRequestUpload_XMLHttpRequestUpload() throws Exception { test("XMLHttpRequestUpload", "XMLHttpRequestUpload"); } @@ -495,7 +495,7 @@ public void _XMLHttpRequestUpload_XMLHttpRequestUpload() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _XMLSerializer_XMLSerializer() throws Exception { test("XMLSerializer", "XMLSerializer"); } @@ -504,7 +504,7 @@ public void _XMLSerializer_XMLSerializer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _XPathEvaluator_XPathEvaluator() throws Exception { test("XPathEvaluator", "XPathEvaluator"); } @@ -513,7 +513,7 @@ public void _XPathEvaluator_XPathEvaluator() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _XPathExpression_XPathExpression() throws Exception { test("XPathExpression", "XPathExpression"); } @@ -522,7 +522,7 @@ public void _XPathExpression_XPathExpression() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _XPathResult_XPathResult() throws Exception { test("XPathResult", "XPathResult"); } @@ -531,7 +531,7 @@ public void _XPathResult_XPathResult() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("true") + @Alerts("true/false") public void _XSLTProcessor_XSLTProcessor() throws Exception { test("XSLTProcessor", "XSLTProcessor"); } diff --git a/src/test/java/org/htmlunit/html/AttributesTest.java b/src/test/java/org/htmlunit/html/AttributesTest.java index c95dd11ecb5..8f81b6398b3 100644 --- a/src/test/java/org/htmlunit/html/AttributesTest.java +++ b/src/test/java/org/htmlunit/html/AttributesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/html/BaseFrameElement2Test.java b/src/test/java/org/htmlunit/html/BaseFrameElement2Test.java index 5cb9f97088a..e408c086d31 100644 --- a/src/test/java/org/htmlunit/html/BaseFrameElement2Test.java +++ b/src/test/java/org/htmlunit/html/BaseFrameElement2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.WebDriver; @@ -36,8 +36,8 @@ public class BaseFrameElement2Test extends WebDriverTestCase { @Test @Alerts("posted called") public void windowEventListenersContainer() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" @@ -58,21 +58,23 @@ public void clickOnFocus() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("click click dblclick ") + @Alerts({"click", "click", "dblclick"}) public void dblClick() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" + "\n" - + "\n" + + LOG_TEXTAREA + ""; final WebDriver driver = loadPage2(content); @@ -81,6 +83,6 @@ public void dblClick() throws Exception { action.doubleClick(driver.findElement(By.id("myBody"))); action.perform(); - assertEquals(getExpectedAlerts()[0], driver.findElement(By.id("myTextarea")).getAttribute("value")); + verifyTextArea2(driver, getExpectedAlerts()); } } diff --git a/src/test/java/org/htmlunit/html/ClickableElementTest.java b/src/test/java/org/htmlunit/html/ClickableElementTest.java index b88d905e90b..ef681564a4a 100644 --- a/src/test/java/org/htmlunit/html/ClickableElementTest.java +++ b/src/test/java/org/htmlunit/html/ClickableElementTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +22,8 @@ import org.htmlunit.SimpleWebTestCase; import org.htmlunit.WebClient; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.BuggyWebDriver; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.BuggyWebDriver; import org.junit.Test; import org.junit.runner.RunWith; @@ -43,8 +43,8 @@ public class ClickableElementTest extends SimpleWebTestCase { * Full page driver for onClick tests. * * @param htmlContent HTML fragment for body of page with clickable element - * identified by clickId ID attribute. Must have onClick that raises - * an alert of "foo". + * identified by clickId ID attribute. Must have onClick that raises + * an alert of "foo". * @throws Exception if the test fails */ private void onClickPageTest(final String htmlContent) throws Exception { @@ -56,7 +56,7 @@ private void onClickPageTest(final String htmlContent) throws Exception { * Full page driver for onClick tests. * * @param htmlContent HTML fragment for body of page with clickable element - * identified by clickId ID attribute. + * identified by clickId ID attribute. * @param numClicks number of times to click element * @param expectedAlerts array of expected popup values * @throws Exception if the test fails @@ -71,7 +71,7 @@ private void onClickPageTest(final String htmlContent, final int numClicks) thro * @param htmlContent HTML fragment for body of page with clickable element identified by clickId ID attribute * @param numClicks number of times to click element * @param expectedAlerts array of expected popup values - * @param exceptionOnError + * @param exceptionOnError indicate to throw on error * @throws Exception if the test fails */ private void onClickPageTest(final String htmlContent, final int numClicks, @@ -104,7 +104,7 @@ private void onClickPageTest(final String htmlContent, final int numClicks, * @throws Exception if the test fails */ private void onClickBodyTest(final String htmlBody) throws Exception { - onClickPageTest("foo\n" + htmlBody + onClickPageTest(DOCTYPE_HTML + "foo\n" + htmlBody + ""); } @@ -309,7 +309,8 @@ public void definitionDescription_onClick() throws Exception { */ @Test public void javaScriptError_onClick() throws Exception { - onClickPageTest("\n" + onClickPageTest(DOCTYPE_HTML + + "\n" + "
\n" + "", 1, false); @@ -577,7 +578,8 @@ public void object_onClick() throws Exception { @BuggyWebDriver(CHROME = "") // ChromeDriver does not generate a "foo" but it occurs manually public void option_onClick() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "
\n" + ""; @@ -825,7 +827,8 @@ public void tableRow_onClick() throws Exception { */ @Test public void tableRow_onClickSetOnLoad() throws Exception { - onClickPageTest("\n" + onClickPageTest(DOCTYPE_HTML + + "\n" + "\n" @@ -60,9 +62,10 @@ public void appendChild_recursive() throws Exception { * @throws Exception on test failure */ @Test - @Alerts({"true", "exception", "1", "0"}) + @Alerts({"true", "HierarchyRequestError/DOMException", "1", "0"}) public void appendChild_recursive_parent() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -56,7 +55,8 @@ public void nextNode() throws Exception { final HtmlPage page = (HtmlPage) getEnclosedPage(); final NodeIterator iterator = page.createNodeIterator(page.getDocumentElement(), NodeFilter.SHOW_ALL, null, true); - assertThat(iterator.nextNode(), instanceOf(HtmlHtml.class)); + final Node node = iterator.nextNode(); + assertTrue(node.getClass().getName(), node instanceof HtmlHtml); } } } diff --git a/src/test/java/org/htmlunit/html/DomNodeListTest.java b/src/test/java/org/htmlunit/html/DomNodeListTest.java index 0721b58b617..1ee0ca57401 100644 --- a/src/test/java/org/htmlunit/html/DomNodeListTest.java +++ b/src/test/java/org/htmlunit/html/DomNodeListTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,8 +36,8 @@ public class DomNodeListTest extends SimpleWebTestCase { */ @Test public void getElementsByTagName() throws Exception { - final String firstContent - = "First\n" + final String firstContent = DOCTYPE_HTML + + "First\n" + "\n" + "
\n" + "
a
b
c
\n" @@ -61,8 +61,8 @@ public void getElementsByTagName() throws Exception { */ @Test public void getChildNodes() throws Exception { - final String firstContent - = "First\n" + final String firstContent = DOCTYPE_HTML + + "First\n" + "\n" + "
\n" + "
a
b
c
\n" diff --git a/src/test/java/org/htmlunit/html/DomNodeTest.java b/src/test/java/org/htmlunit/html/DomNodeTest.java index b01d3340ad2..94b76231985 100644 --- a/src/test/java/org/htmlunit/html/DomNodeTest.java +++ b/src/test/java/org/htmlunit/html/DomNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import org.htmlunit.WebClient; import org.htmlunit.html.DomNode.DescendantHtmlElementsIterator; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.htmlunit.util.MimeType; import org.htmlunit.xml.XmlPage; import org.junit.Test; @@ -47,7 +47,7 @@ public class DomNodeTest extends SimpleWebTestCase { */ @Test public void elementHasAttributesWith() throws Exception { - final String content = "text"; + final String content = DOCTYPE_HTML + "text"; final HtmlPage page = loadPage(content); final DomNode node = page.getElementById("tag"); @@ -60,7 +60,7 @@ public void elementHasAttributesWith() throws Exception { */ @Test public void elementHasAttributesNone() throws Exception { - final String content = "text"; + final String content = DOCTYPE_HTML + "text"; final HtmlPage page = loadPage(content); final DomNode node = page.getElementById("tag"); @@ -74,7 +74,7 @@ public void elementHasAttributesNone() throws Exception { */ @Test public void nonElementHasAttributes() throws Exception { - final String content = "text"; + final String content = DOCTYPE_HTML + "text"; final HtmlPage page = loadPage(content); final DomNode node = page.getElementById("tag"); @@ -88,7 +88,7 @@ public void nonElementHasAttributes() throws Exception { */ @Test public void nonElementGetPrefix() throws Exception { - final String content = "text"; + final String content = DOCTYPE_HTML + "text"; final HtmlPage page = loadPage(content); final DomNode node = page.getElementById("tag"); @@ -102,7 +102,7 @@ public void nonElementGetPrefix() throws Exception { */ @Test public void nonElementGetNamespaceURI() throws Exception { - final String content = "text"; + final String content = DOCTYPE_HTML + "text"; final HtmlPage page = loadPage(content); final DomNode node = page.getElementById("tag"); @@ -116,7 +116,7 @@ public void nonElementGetNamespaceURI() throws Exception { */ @Test public void nonElementGetLocalName() throws Exception { - final String content = "text"; + final String content = DOCTYPE_HTML + "text"; final HtmlPage page = loadPage(content); final DomNode node = page.getElementById("tag"); @@ -130,7 +130,7 @@ public void nonElementGetLocalName() throws Exception { */ @Test public void nonElementSetPrefix() throws Exception { - final String content = "text"; + final String content = DOCTYPE_HTML + "text"; final HtmlPage page = loadPage(content); final DomNode node = page.getElementById("tag"); @@ -144,8 +144,8 @@ public void nonElementSetPrefix() throws Exception { */ @Test public void removeAllChildren() throws Exception { - final String content - = "\n" + final String content = DOCTYPE_HTML + + "\n" + "

\n" + "\n" + "\n" @@ -162,8 +162,8 @@ public void removeAllChildren() throws Exception { */ @Test public void replace() throws Exception { - final String content - = "\n" + final String content = DOCTYPE_HTML + + "\n" + "

"; final HtmlPage page = loadPage(content); @@ -202,8 +202,8 @@ public void replace() throws Exception { */ @Test public void getNewNodeById() throws Exception { - final String content - = "\n" + final String content = DOCTYPE_HTML + + "\n" + "
"; final HtmlPage page = loadPage(content); @@ -242,8 +242,8 @@ public void getNewNodeById() throws Exception { */ @Test public void appendChild() throws Exception { - final String content - = "\n" + final String content = DOCTYPE_HTML + + "\n" + "

"; final HtmlPage page = loadPage(content); @@ -272,8 +272,8 @@ public void appendChild() throws Exception { */ @Test public void insertBefore() throws Exception { - final String content - = "\n" + final String content = DOCTYPE_HTML + + "\n" + "

"; final HtmlPage page = loadPage(content); @@ -320,8 +320,8 @@ private static int readPositionAmongParentChildren(final DomNode node) { */ @Test public void getByXPath() throws Exception { - final String htmlContent - = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + " \n" + " my title\n" + " " @@ -362,8 +362,8 @@ public void getByXPath() throws Exception { */ @Test public void getByXPathSelectedNode() throws Exception { - final String htmlContent - = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + " \n" + " my title\n" + " " @@ -388,7 +388,8 @@ public void getByXPathSelectedNode() throws Exception { */ @Test public void getByXPath_trim_namespace() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "
bla
\n" + ""; @@ -404,8 +405,8 @@ public void getByXPath_trim_namespace() throws Exception { */ @Test public void getFirstByXPathDisplayNone() throws Exception { - final String htmlContent - = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + " \n" + " my title\n" + " " @@ -429,8 +430,8 @@ public void getFirstByXPathDisplayNone() throws Exception { */ @Test public void getFirstByXPath() throws Exception { - final String htmlContent - = "my title\n" + final String htmlContent = DOCTYPE_HTML + + "my title\n" + "
  • foo 1
  • foo 2
\n" + "
bla
\n" + ""; @@ -459,7 +460,8 @@ public void getFirstByXPath() throws Exception { */ @Test public void getHtmlElementDescendantsOrder() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -489,8 +491,8 @@ public void getHtmlElementDescendantsOrder() throws Exception { */ @Test public void getDescendants_remove() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "
a
b
a
c
a
d
\n" + ""; final HtmlPage page = loadPage(html); @@ -528,8 +530,8 @@ List getCollectedValues() { */ @Test public void domChangeListenerTestImpl_insertBefore() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "a1\n" + "a2\n" + "a3\n" @@ -349,7 +349,8 @@ public void click_javascriptUrl_encoded() throws Exception { */ @Test public void openLinkInNewWindow() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "link to foo1\n" + ""; @@ -378,11 +379,12 @@ public void openLinkInNewWindow() throws Exception { */ @Test public void correctLinkTargetWhenOnclickOpensWindow() throws Exception { - final String firstContent = "First\n" + final String firstContent = DOCTYPE_HTML + + "First\n" + "X\n" + ""; - final String html2 = "Second"; - final String htmlPopup = "Popup"; + final String html2 = DOCTYPE_HTML + "Second"; + final String htmlPopup = DOCTYPE_HTML + "Popup"; final WebClient client = getWebClient(); final List collectedAlerts = new ArrayList<>(); @@ -410,8 +412,8 @@ public void correctLinkTargetWhenOnclickOpensWindow() throws Exception { */ @Test public void preventDefault1() throws Exception { - final String html = - "\n" + "\n" @@ -450,7 +450,8 @@ public void setText() throws Exception { @Test @Alerts("foo") public void innerHtmlHrefQuotedEvenInIE() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -465,16 +466,16 @@ public void innerHtmlHrefQuotedEvenInIE() throws Exception { */ @Test public void click() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "link to foo1\n" + "link to foo2\n" + ""; - final String secondContent - = "Second"; + final String secondContent = DOCTYPE_HTML + + "Second"; final MockWebConnection webConnection = getMockWebConnection(); webConnection.setDefaultResponse(secondContent); @@ -497,8 +498,8 @@ public void click() throws Exception { */ @Test public void clickAnchorName() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + " link to foo1\n" @@ -519,8 +520,8 @@ public void clickAnchorName() throws Exception { @Test @Alerts({"", "#anchor", "#!bang"}) public void dontReloadHashBang() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " link1\n" @@ -560,8 +561,8 @@ public void dontReloadHashBang() throws Exception { @Test @Alerts({"#!board/WebDev", "#!article/WebDev/35", "#!article/WebDev/35"}) public void dontReloadHashBang2() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " link1\n" @@ -599,23 +600,26 @@ public void dontReloadHashBang2() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("click href click doubleClick href ") - @BuggyWebDriver( - FF = "click click doubleClick href href ", - FF_ESR = "click click doubleClick href href ") - @HtmlUnitNYI(CHROME = "click href click href doubleClick ", - EDGE = "click href click href doubleClick ", - FF = "click href click href doubleClick ", - FF_ESR = "click href click href doubleClick ") + @Alerts({"click", "href", "click", "doubleClick", "href"}) + @BuggyWebDriver(FF_ESR = {"click", "click", "doubleClick", "href", "href"}) + @HtmlUnitNYI(CHROME = {"click", "href", "click", "href", "doubleClick"}, + EDGE = {"click", "href", "click", "href", "doubleClick"}, + FF = {"click", "href", "click", "href", "doubleClick"}, + FF_ESR = {"click", "href", "click", "href", "doubleClick"}) public void doubleClick() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + + "\n" + + "\n" + + "\n" + "\n" + " foo\n" - + " \n" + + "href=\"javascript:log('href');void(0);\" " + + "onClick=\"log('click');\" " + + "onDblClick=\"log('doubleClick');\">foo\n" + + LOG_TEXTAREA + ""; final WebDriver driver = loadPage2(html); @@ -624,7 +628,7 @@ public void doubleClick() throws Exception { action.doubleClick(driver.findElement(By.id("myAnchor"))); action.perform(); - assertEquals(getExpectedAlerts()[0], driver.findElement(By.id("myTextarea")).getAttribute("value")); + verifyTextArea2(driver, getExpectedAlerts()); } /** @@ -635,8 +639,8 @@ public void doubleClick() throws Exception { public void encoding() throws Exception { final String href = "bug.html?" + URLEncoder.encode("h\u00F6", "UTF-8") + '=' + URLEncoder.encode("G\u00FCnter", "UTF-8"); - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" @@ -664,8 +668,8 @@ public void encoding() throws Exception { */ @Test public void javascriptWithReturn() throws Exception { - final String html - = "First\n" + final String html = DOCTYPE_HTML + + "First\n" + " hi\n" + ""; final WebDriver webDriver = loadPage2(html); @@ -677,8 +681,8 @@ public void javascriptWithReturn() throws Exception { */ @Test public void javascriptWithReturnWhitespace() throws Exception { - final String html - = "First\n" + final String html = DOCTYPE_HTML + + "First\n" + " hi\n" + ""; final WebDriver webDriver = loadPage2(html); @@ -691,7 +695,8 @@ public void javascriptWithReturnWhitespace() throws Exception { @Test @Alerts({"1", "First"}) public void shiftClick() throws Exception { - final String html = "First\n" + final String html = DOCTYPE_HTML + + "First\n" + "Click Me\n" + ""; @@ -721,7 +726,8 @@ public void shiftClick() throws Exception { @Test @Alerts({"1", "First"}) public void ctrlClick() throws Exception { - final String html = "First\n" + final String html = DOCTYPE_HTML + + "First\n" + "Click Me\n" + ""; @@ -739,7 +745,7 @@ public void ctrlClick() throws Exception { .keyUp(Keys.CONTROL) .perform(); - Thread.sleep(DEFAULT_WAIT_TIME); + Thread.sleep(DEFAULT_WAIT_TIME.toMillis()); assertEquals("Should have opened a new window", windowsSize + Integer.parseInt(getExpectedAlerts()[0]), driver.getWindowHandles().size()); assertEquals("Should not have navigated away", getExpectedAlerts()[1], driver.getTitle()); @@ -752,12 +758,12 @@ public void ctrlClick() throws Exception { @Test @Alerts("§§URL§§index.html?test") public void click_refererHeader() throws Exception { - final String firstContent - = "Page A\n" + final String firstContent = DOCTYPE_HTML + + "Page A\n" + "link\n" + ""; - final String secondContent - = "Page B\n" + final String secondContent = DOCTYPE_HTML + + "Page B\n" + "\n" + ""; @@ -783,12 +789,12 @@ public void click_refererHeader() throws Exception { */ @Test public void click_refererHeaderNoReferrer() throws Exception { - final String firstContent - = "Page A\n" + final String firstContent = DOCTYPE_HTML + + "Page A\n" + "link\n" + ""; - final String secondContent - = "Page B\n" + final String secondContent = DOCTYPE_HTML + + "Page B\n" + "\n" + ""; @@ -812,12 +818,12 @@ public void click_refererHeaderNoReferrer() throws Exception { */ @Test public void click_refererHeaderNoReferrerCaseSensitive() throws Exception { - final String firstContent - = "Page A\n" + final String firstContent = DOCTYPE_HTML + + "Page A\n" + "link\n" + ""; - final String secondContent - = "Page B\n" + final String secondContent = DOCTYPE_HTML + + "Page B\n" + "\n" + ""; @@ -841,14 +847,14 @@ public void click_refererHeaderNoReferrerCaseSensitive() throws Exception { @Test @Alerts("§§URL§§index.html?test") public void controlClick_refererHeader() throws Exception { - final String firstContent - = "Page A\n" + final String firstContent = DOCTYPE_HTML + + "Page A\n" + "\n" + " link\n" + "\n" + ""; - final String secondContent - = "Page B\n" + final String secondContent = DOCTYPE_HTML + + "Page B\n" + "\n" + ""; @@ -866,7 +872,7 @@ public void controlClick_refererHeader() throws Exception { .keyUp(Keys.CONTROL) .build().perform(); - Thread.sleep(DEFAULT_WAIT_TIME / 10); + Thread.sleep(DEFAULT_WAIT_TIME.toMillis() / 10); assertEquals(2, getMockWebConnection().getRequestCount()); diff --git a/src/test/java/org/htmlunit/html/HtmlArea2Test.java b/src/test/java/org/htmlunit/html/HtmlArea2Test.java index ef831423fca..986fa3275f4 100644 --- a/src/test/java/org/htmlunit/html/HtmlArea2Test.java +++ b/src/test/java/org/htmlunit/html/HtmlArea2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,16 +50,16 @@ private WebClient createWebClient(final String onClick) throws IOException { webConnection.setResponse(urlImage, directBytes, 200, "ok", "image/jpg", Collections.emptyList()); } - final String firstContent - = "first\n" + final String firstContent = DOCTYPE_HTML + + "first\n" + "\n" + "\n" + "\n" + "\n" + ""; - final String secondContent = "second"; - final String thirdContent = "third"; + final String secondContent = DOCTYPE_HTML + "second"; + final String thirdContent = DOCTYPE_HTML + "third"; final WebClient client = getWebClient(); @@ -126,8 +126,8 @@ public void click_onclickReturnsTrue() throws Exception { */ @Test public void click_javascriptUrl_javascriptDisabled() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + ""; final WebClient client = getWebClient(); diff --git a/src/test/java/org/htmlunit/html/HtmlAreaTest.java b/src/test/java/org/htmlunit/html/HtmlAreaTest.java index 226c1bd77f3..55e48cc968b 100644 --- a/src/test/java/org/htmlunit/html/HtmlAreaTest.java +++ b/src/test/java/org/htmlunit/html/HtmlAreaTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,8 +24,8 @@ import org.htmlunit.Page; import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.BuggyWebDriver; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.BuggyWebDriver; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.By; @@ -49,8 +49,8 @@ private WebDriver createWebClient(final String onClick) throws Exception { getMockWebConnection().setResponse(urlImage, directBytes, 200, "ok", "image/jpg", Collections.emptyList()); } - final String firstContent - = "first\n" + final String firstContent = DOCTYPE_HTML + + "first\n" + "\n" + " \n" + " \n" @@ -59,8 +59,8 @@ private WebDriver createWebClient(final String onClick) throws Exception { + " \n" + " \n" + ""; - final String secondContent = "second"; - final String thirdContent = "third"; + final String secondContent = DOCTYPE_HTML + "second"; + final String thirdContent = DOCTYPE_HTML + "third"; getMockWebConnection().setResponse(URL_SECOND, secondContent); getMockWebConnection().setResponse(URL_THIRD, thirdContent); @@ -97,7 +97,8 @@ public void referer() throws Exception { */ @Test public void isDisplayedRect() throws Exception { - final String html = "Page A\n" + final String html = DOCTYPE_HTML + + "Page A\n" + "\n" + " \n" + " \n" @@ -375,8 +384,8 @@ public void click_javascriptUrl() throws Exception { getMockWebConnection().setResponse(urlImage, directBytes, 200, "ok", "image/jpg", Collections.emptyList()); } - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " \n" @@ -415,8 +424,8 @@ public void click_javascriptUrlMixedCase() throws Exception { getMockWebConnection().setResponse(urlImage, directBytes, 200, "ok", "image/jpg", Collections.emptyList()); } - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " \n" @@ -456,8 +465,8 @@ public void click_javascriptUrlLeadingWhitespace() throws Exception { getMockWebConnection().setResponse(urlImage, directBytes, 200, "ok", "image/jpg", Collections.emptyList()); } - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " \n" @@ -497,8 +506,8 @@ public void thisInJavascriptHref() throws Exception { getMockWebConnection().setResponse(urlImage, directBytes, 200, "ok", "image/jpg", Collections.emptyList()); } - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " \n" diff --git a/src/test/java/org/htmlunit/html/HtmlAttrTest.java b/src/test/java/org/htmlunit/html/HtmlAttrTest.java index 181433f254f..55020f7c18e 100644 --- a/src/test/java/org/htmlunit/html/HtmlAttrTest.java +++ b/src/test/java/org/htmlunit/html/HtmlAttrTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -128,7 +128,8 @@ public void getParent() { */ @Test public void nodeType() throws Exception { - final String content = "foo\n" + "\n" + "
\n" - + "\n" + + " \n" + "\n" - + "\n" + + LOG_TEXTAREA + ""; final WebDriver driver = loadPage2(html); driver.findElement(By.id("chkbox")).click(); - assertEquals(Arrays.asList(getExpectedAlerts()).toString(), - '[' + driver.findElement(By.id("myTextarea")).getAttribute("value") + ']'); + verifyTextArea2(driver, getExpectedAlerts()); } /** * @throws Exception if the test fails */ @Test - @Alerts("foo,change,boo,blur,") + @Alerts({"onchange change", "onblur blur"}) public void onchangeFires2() throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "foo\n" + "\n" + "\n" + "
\n" + "\n" + "\n" + "\n" - + "\n" + + LOG_TEXTAREA + ""; final WebDriver driver = loadPage2(html); driver.findElement(By.id("chkbox")).click(); driver.findElement(By.id("chkbox2")).click(); - assertEquals(Arrays.asList(getExpectedAlerts()).toString(), - '[' + driver.findElement(By.id("myTextarea")).getAttribute("value") + ']'); + verifyTextArea2(driver, getExpectedAlerts()); } /** @@ -521,15 +509,14 @@ public void onchangeFires2() throws Exception { @Test @Alerts("Second") public void setChecked() throws Exception { - final String firstHtml = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String firstHtml = DOCTYPE_HTML + "First\n" + "
\n" + "\n" + "\n" + ""; - final String secondHtml - = "Second"; + final String secondHtml = DOCTYPE_HTML + + "Second"; getMockWebConnection().setDefaultResponse(secondHtml); final WebDriver driver = loadPage2(firstHtml); @@ -544,16 +531,15 @@ public void setChecked() throws Exception { @Test @Alerts("Second") public void setChecked2() throws Exception { - final String firstHtml = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String firstHtml = DOCTYPE_HTML + "First\n" + "
\n" + "\n" + "\n" + "\n" + ""; - final String secondHtml - = "Second"; + final String secondHtml = DOCTYPE_HTML + + "Second"; getMockWebConnection().setDefaultResponse(secondHtml); final WebDriver driver = loadPage2(firstHtml); @@ -567,8 +553,7 @@ public void setChecked2() throws Exception { */ @Test public void preventDefault() throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" @@ -519,9 +525,9 @@ public void selection() throws Exception { * @throws Exception if test fails */ @Test - @Alerts({"null,null", "exception value", "null,null", - "exception", "null,null", - "exception", "null,null"}) + @Alerts({"null,null", "InvalidStateError/DOMException", "null,null", + "InvalidStateError/DOMException", "null,null", + "InvalidStateError/DOMException", "null,null"}) public void selection2_1() throws Exception { selection2(3, 10); } @@ -530,9 +536,9 @@ public void selection2_1() throws Exception { * @throws Exception if test fails */ @Test - @Alerts({"null,null", "exception value", "null,null", - "exception", "null,null", - "exception", "null,null"}) + @Alerts({"null,null", "InvalidStateError/DOMException", "null,null", + "InvalidStateError/DOMException", "null,null", + "InvalidStateError/DOMException", "null,null"}) public void selection2_2() throws Exception { selection2(-3, 15); } @@ -541,15 +547,16 @@ public void selection2_2() throws Exception { * @throws Exception if test fails */ @Test - @Alerts({"null,null", "exception value", "null,null", - "exception", "null,null", - "exception", "null,null"}) + @Alerts({"null,null", "InvalidStateError/DOMException", "null,null", + "InvalidStateError/DOMException", "null,null", + "InvalidStateError/DOMException", "null,null"}) public void selection2_3() throws Exception { selection2(10, 5); } private void selection2(final int selectionStart, final int selectionEnd) throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" + "\n" + ""; @@ -591,9 +598,10 @@ private void selection2(final int selectionStart, final int selectionEnd) throws * @throws Exception if test fails */ @Test - @Alerts({"null,null", "exception"}) + @Alerts({"null,null", "InvalidStateError/DOMException"}) public void selectionOnUpdate() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" + "\n" + ""; @@ -631,7 +639,8 @@ public void selectionOnUpdate() throws Exception { @Test @Alerts({"changed2", "changed"}) public void firingOnchange() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -657,7 +666,8 @@ public void firingOnchange() throws Exception { @Test @Alerts({"true", "true"}) public void nonZeroWidthHeight() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "

hello world

\n" @@ -152,17 +152,17 @@ public void asFunction() throws Exception { @Test @Alerts("TypeError") public void asFunctionFormsFunction() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "

hello world

\n" @@ -180,19 +180,23 @@ public void asFunctionFormsFunction() throws Exception { */ @Test public void base() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + "\n" + "
\n" + " \n" + ""; - getMockWebConnection().setDefaultResponse("foo"); + getMockWebConnection().setDefaultResponse(DOCTYPE_HTML + "foo"); final WebDriver driver = loadPage2(html); driver.findElement(new ByTagName("input")).click(); + if (useRealBrowser()) { + Thread.sleep(400); + } + assertEquals(2, getMockWebConnection().getRequestCount()); final URL requestedUrl = getMockWebConnection().getLastWebRequest().getUrl(); final URL expectedUrl = new URL(URL_SECOND, "two.html"); assertEquals(expectedUrl, requestedUrl); @@ -203,19 +207,23 @@ public void base() throws Exception { */ @Test public void emptyActionWithBase() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + "\n" + "
\n" + " \n" + ""; - getMockWebConnection().setDefaultResponse("foo"); + getMockWebConnection().setDefaultResponse(DOCTYPE_HTML + "foo"); final WebDriver driver = loadPage2(html); driver.findElement(new ByTagName("input")).click(); + if (useRealBrowser()) { + Thread.sleep(400); + } + assertEquals(2, getMockWebConnection().getRequestCount()); final URL requestedUrl = getMockWebConnection().getLastWebRequest().getUrl(); assertEquals(URL_FIRST.toExternalForm(), requestedUrl); } @@ -225,8 +233,8 @@ public void emptyActionWithBase() throws Exception { */ @Test public void emptyActionWithBase2() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + "\n" + "
\n" @@ -234,27 +242,28 @@ public void emptyActionWithBase2() throws Exception { + " \n" + ""; - getMockWebConnection().setDefaultResponse("foo"); + getMockWebConnection().setDefaultResponse(DOCTYPE_HTML + "foo"); final WebDriver driver = loadPage2(html); driver.findElement(new ByTagName("input")).click(); + assertEquals(1, getMockWebConnection().getRequestCount()); final URL requestedUrl = getMockWebConnection().getLastWebRequest().getUrl(); assertEquals(URL_FIRST.toExternalForm(), requestedUrl); } /** - * Simulates a bug report where using JavaScript to submit a form that contains a - * JavaScript action causes a an "IllegalArgumentException: JavaScript URLs can only - * be used to load content into frames and iframes". - * - * @throws Exception if the test fails - */ + * Simulates a bug report where using JavaScript to submit a form that contains a + * JavaScript action causes a an "IllegalArgumentException: JavaScript URLs can only + * be used to load content into frames and iframes". + * + * @throws Exception if the test fails + */ @Test @Alerts("clicked") public void jSSubmit_JavaScriptAction() throws Exception { - final String html - = "First\n" + final String html = DOCTYPE_HTML + + "First\n" + "\n" + "
\n" @@ -269,8 +278,8 @@ public void jSSubmit_JavaScriptAction() throws Exception { @Test @Alerts({"1", "val2", "3", "3"}) public void malformedHtml_nestedForms() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" + "Click me\n" + ""; - final String secondHtml = "Second"; + final String secondHtml = DOCTYPE_HTML + "Second"; final WebClient client = getWebClientWithMockWebConnection(); final List collectedAlerts = new ArrayList<>(); @@ -542,8 +542,8 @@ public void submit_AnchorCausesSubmit_onSubmitHandler_returnFalse() throws Excep */ @Test public void submit_CheckboxClicked() throws Exception { - final String html - = "foo\n" + final String html = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + ""; - final String secondHtml = "\n" + final String secondHtml = DOCTYPE_HTML + + "\n" + "\n" @@ -73,7 +74,8 @@ public void crossFrameJavascript() throws Exception { @HtmlUnitNYI(CHROME = "1", EDGE = "1") public void iframeOnloadCalledOnlyOnce() throws Exception { - final String firstHtml = "\n" + final String firstHtml = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -90,7 +92,8 @@ public void iframeOnloadCalledOnlyOnce() throws Exception { @Test @Alerts("1") public void iframeOnloadAboutBlank() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -114,12 +117,14 @@ public void postponeLoading() throws Exception { + " \n" + ""; - final String secondHtml = "\n" + final String secondHtml = DOCTYPE_HTML + + "\n" + "\n" + "

second

\n" + ""; - final String thirdHtml = "\n" + final String thirdHtml = DOCTYPE_HTML + + "\n" + "\n" + "
\n" + " \n" @@ -145,12 +150,14 @@ public void frameOnload() throws Exception { + " \n" + ""; - final String secondHtml = "\n" + final String secondHtml = DOCTYPE_HTML + + "\n" + "\n" + "

second

\n" + ""; - final String thirdHtml = "\n" + final String thirdHtml = DOCTYPE_HTML + + "\n" + "\n" + "

third

\n" + ""; @@ -168,14 +175,18 @@ public void frameOnload() throws Exception { */ @Test @Alerts("second fourth third first") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "fourth second third first", + EDGE = "fourth second third first", + FF = "fourth second third first", + FF_ESR = "fourth second third first") public void frameOnloadFrameInFrame() throws Exception { final String html = "\n" + " \n" + " \n" + ""; - final String secondHtml = "\n" + final String secondHtml = DOCTYPE_HTML + + "\n" + "\n" + "

second

\n" + ""; @@ -184,7 +195,8 @@ public void frameOnloadFrameInFrame() throws Exception { + " \n" + ""; - final String fourthHtml = "\n" + final String fourthHtml = DOCTYPE_HTML + + "\n" + "\n" + "

fourth

\n" + ""; @@ -207,7 +219,8 @@ public void frameOnloadFrameInFrame() throws Exception { @Test @Alerts("myInputName") public void iframeContentNotLoaded() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "FooBar\n" + "\n" + "\n" @@ -248,16 +261,18 @@ public void iframeContentNotLoaded() throws Exception { @Test @Alerts("foo") public void onloadInNavigatedFrame() throws Exception { - final String html = "first\n" + final String html = DOCTYPE_HTML + + "first\n" + "\n" + " \n" + ""; - final String firstHtml = "\n" + final String firstHtml = DOCTYPE_HTML + + "\n" + "hello\n" + ""; - final String secondHtml = ""; + final String secondHtml = DOCTYPE_HTML + ""; final MockWebConnection webConnection = getMockWebConnection(); webConnection.setResponse(new URL(URL_FIRST, "frame1.html"), firstHtml); @@ -277,8 +292,8 @@ public void onloadInNavigatedFrame() throws Exception { @Test @Alerts("loaded") public void lineBreaksInUrl() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "Test\n" + ""; @@ -286,8 +301,8 @@ public void lineBreaksInUrl() throws Exception { getMockWebConnection().setResponse(new URL(URL_SECOND, "abcd"), html); expandExpectedAlertsVariables(URL_SECOND); - final String frame - = "\n" + final String frame = DOCTYPE_HTML + + "\n" + " \n" + " \n" + " "; @@ -302,8 +317,8 @@ public void lineBreaksInUrl() throws Exception { @Test @Alerts("loaded") public void lineBreaksInUrlIFrame() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "Test\n" + ""; @@ -311,8 +326,8 @@ public void lineBreaksInUrlIFrame() throws Exception { getMockWebConnection().setResponse(new URL(URL_SECOND, "abcd"), html); expandExpectedAlertsVariables(URL_SECOND); - final String frame - = "\n" + final String frame = DOCTYPE_HTML + + "\n" + " \n" + " \n" + " \n" diff --git a/src/test/java/org/htmlunit/html/HtmlFrameSetTest.java b/src/test/java/org/htmlunit/html/HtmlFrameSetTest.java index 5fa2da8f657..ae290ca99c6 100644 --- a/src/test/java/org/htmlunit/html/HtmlFrameSetTest.java +++ b/src/test/java/org/htmlunit/html/HtmlFrameSetTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,8 @@ import org.htmlunit.WebClient; import org.htmlunit.WebWindow; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.NotYetImplemented; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; @@ -37,6 +38,7 @@ * @author Marc Guillemot * @author Hans Donner * @author Ahmed Ashour + * @author Ronald Brill */ @RunWith(BrowserRunner.class) public class HtmlFrameSetTest extends SimpleWebTestCase { @@ -46,8 +48,8 @@ public class HtmlFrameSetTest extends SimpleWebTestCase { */ @Test public void loadingFrameSet() throws Exception { - final String firstContent - = "First\n" + final String firstContent = DOCTYPE_HTML + + "First\n" + "\n" + " \n" + " \n" @@ -56,8 +58,8 @@ public void loadingFrameSet() throws Exception { + " \n" + "\n" + ""; - final String secondContent = "Second"; - final String thirdContent = "Third"; + final String secondContent = DOCTYPE_HTML + "Second"; + final String thirdContent = DOCTYPE_HTML + "Third"; final WebClient webClient = getWebClientWithMockWebConnection(); @@ -84,13 +86,13 @@ public void loadingFrameSet() throws Exception { */ @Test public void loadingIFrames() throws Exception { - final String firstContent - = "First\n" + final String firstContent = DOCTYPE_HTML + + "First\n" + "\n" + " \n" + " \n" + "\n" + ""; - final String rightFrame = "Right Frame\n" + final String rightFrame = DOCTYPE_HTML + + "Right Frame\n" + "
Body of right frame
\n" + ""; - final String leftFrame = "Left Frame\n" + final String leftFrame = DOCTYPE_HTML + + "Left Frame\n" + "\n" + "
Body of left frame
\n" + " Click link\n" @@ -122,11 +123,13 @@ public void targetResolution() throws Exception { + "\n" + ""; - final String innerFrame = "Inner Frame\n" + final String innerFrame = DOCTYPE_HTML + + "Inner Frame\n" + "
Body of inner frame
\n" + ""; - final String newInnerFrame = "New inner Frame\n" + final String newInnerFrame = DOCTYPE_HTML + + "New inner Frame\n" + "
Body of new inner frame
\n" + ""; @@ -184,15 +187,15 @@ public void targetResolution() throws Exception { @Test @Alerts("2") public void scriptUnderIFrame() throws Exception { - final String firstContent - = "\n" + final String firstContent = DOCTYPE_HTML + + "\n" + "\n" + ""; - final String secondContent - = ""; + final String secondContent = DOCTYPE_HTML + + ""; final String thirdContent = "alert('3');"; getMockWebConnection().setResponse(URL_SECOND, secondContent); @@ -211,17 +214,18 @@ public void scriptUnderIFrame() throws Exception { @Alerts(DEFAULT = "about:blank", CHROME = "about://unsupported", EDGE = "about://unsupported") - @NotYetImplemented({CHROME, EDGE}) + @HtmlUnitNYI(CHROME = "about:blank", + EDGE = "about:blank") public void aboutSrc() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -250,7 +254,8 @@ public void aboutSrc() throws Exception { FF = {"1:false", "2:false", "3:false", "4:false"}, FF_ESR = {"1:false", "2:false", "3:false", "4:false"}) public void createIframeFromStrictFunction() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; - final String secondContent = "Second"; - final String thirdContent = "Third"; + final String secondContent = DOCTYPE_HTML + "Second"; + final String thirdContent = DOCTYPE_HTML + "Third"; final WebClient client = getWebClientWithMockWebConnection(); final MockWebConnection webConnection = getMockWebConnection(); @@ -196,8 +197,8 @@ public void setSrcAttribute_ViaJavaScript() throws Exception { */ @Test public void frameCloneDoesNotReloadFrame() throws Exception { - final String html1 = ""; - final String html2 = "abc"; + final String html1 = DOCTYPE_HTML + ""; + final String html2 = DOCTYPE_HTML + "abc"; final WebClient client = getWebClientWithMockWebConnection(); @@ -218,11 +219,11 @@ public void frameCloneDoesNotReloadFrame() throws Exception { */ @Test public void frameWriteDoesNotReloadFrame() throws Exception { - final String html1 = - "\n" + final String html1 = DOCTYPE_HTML + + "\n" + "\n" + ""; - final String html2 = "iframe content"; + final String html2 = DOCTYPE_HTML + "iframe content"; final WebClient client = getWebClientWithMockWebConnection(); @@ -247,8 +248,8 @@ public void frameWriteDoesNotReloadFrame() throws Exception { */ @Test public void frameSetInnerHtmlDoesLoadFrame() throws Exception { - final String html1 = - "\n" + final String html1 = DOCTYPE_HTML + + "\n" + "';\n" + "\n" + "\n" + ""; - final String html2 = "iframe content"; - final String html3 = "Third content"; + final String html2 = DOCTYPE_HTML + "iframe content"; + final String html3 = DOCTYPE_HTML + "Third content"; final WebClient client = getWebClientWithMockWebConnection(); @@ -289,8 +290,8 @@ public void frameSetInnerHtmlDoesLoadFrame() throws Exception { */ @Test public void frameSetInnerHtmlDoesLoadFrameContentTimeout() throws Exception { - final String html1 = - "\n" + final String html1 = DOCTYPE_HTML + + "\n" + "';\n" + "\n" + "\n" + ""; - final String html2 = "iframe content"; - final String html3 = "Third content"; + final String html2 = DOCTYPE_HTML + "iframe content"; + final String html3 = DOCTYPE_HTML + "Third content"; final WebClient client = getWebClientWithMockWebConnection(); @@ -339,8 +340,8 @@ public void frameSetInnerHtmlDoesLoadFrameContentTimeout() throws Exception { */ @Test public void frameContentCreationViaJavascript() throws Exception { - final String html = - "frames\n" + final String html = DOCTYPE_HTML + + "frames\n" + "\n" + "\n" + "\n" @@ -82,8 +82,8 @@ public void onchangeDirectCall() throws Exception { @Test @Alerts({"function handler() {}", "null"}) public void onchangeNull() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -665,8 +665,8 @@ public void detached_datetime() throws Exception { } private void changeTypeDetached(final String value, final String targetType) throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/html/HtmlInputTest.java b/src/test/java/org/htmlunit/html/HtmlInputTest.java index cb6575e1fae..cc833d608da 100644 --- a/src/test/java/org/htmlunit/html/HtmlInputTest.java +++ b/src/test/java/org/htmlunit/html/HtmlInputTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,8 +48,8 @@ public final class HtmlInputTest extends SimpleWebTestCase { */ @Test public void radioButtonsAreMutuallyExclusive() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + "\n" @@ -81,8 +81,8 @@ public void radioButtonsAreMutuallyExclusive() throws Exception { */ @Test public void setChecked_CheckBox() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + "\n" @@ -105,8 +105,8 @@ public void setChecked_CheckBox() throws Exception { */ @Test public void getChecked_RadioButton() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + "\n" @@ -128,8 +128,8 @@ public void getChecked_RadioButton() throws Exception { */ @Test public void setValueAttribute() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + ""; @@ -150,8 +150,8 @@ public void setValueAttribute() throws Exception { */ @Test public void checkboxDefaultValue() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "
\n" + "\n" + ""; @@ -169,8 +169,8 @@ public void checkboxDefaultValue() throws Exception { */ @Test public void clickRadioButton() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "
\n" + "\n" + "\n" @@ -195,8 +195,8 @@ public void clickRadioButton() throws Exception { */ @Test public void inputNoType() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + ""; @@ -212,8 +212,8 @@ public void inputNoType() throws Exception { */ @Test public void onChangeHandlerNotFiredOnLoad() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "
\n" + "\n" + ""; @@ -228,7 +228,8 @@ public void onChangeHandlerNotFiredOnLoad() throws Exception { */ @Test public void testRequiredValidation() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "
\n" @@ -242,10 +243,13 @@ public void testRequiredValidation() throws Exception { assertFalse(input.isValid()); } + /** + * @throws Exception if an error occurs + */ @Test public void changeType_javascriptEngineDisabled() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + ""; @@ -261,10 +265,13 @@ public void changeType_javascriptEngineDisabled() throws Exception { } } + /** + * @throws Exception if an error occurs + */ @Test public void changeType_javascriptDisabled() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "
\n" + "\n" + ""; diff --git a/src/test/java/org/htmlunit/html/HtmlInsertedTextTest.java b/src/test/java/org/htmlunit/html/HtmlInsertedTextTest.java index cb84bf182a2..e75c9bf86be 100644 --- a/src/test/java/org/htmlunit/html/HtmlInsertedTextTest.java +++ b/src/test/java/org/htmlunit/html/HtmlInsertedTextTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -35,7 +35,8 @@ public class HtmlInsertedTextTest extends WebDriverTestCase { @Test @Alerts({"abcdef", "abcdef"}) public void simple() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " abcdef\n" + " \n" @@ -133,8 +134,8 @@ public void testJavaScript() throws Exception { */ @Test public void formValues() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "
\n" + "
\n" + " \n" - + " \n" + + LOG_TEXTAREA + ""; final WebDriver driver = loadPage2(html); driver.findElement(By.id("opt3")).click(); - assertEquals(Arrays.asList(getExpectedAlerts()).toString(), - '[' + driver.findElement(By.id("myTextarea")).getAttribute("value") + ']'); + verifyTextArea2(driver, getExpectedAlerts()); } /** @@ -167,7 +165,8 @@ public void onMouse() throws Exception { */ @Test public void isSelected() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + + "" + " \n" + ""; @@ -190,7 +189,8 @@ public void isSelected() throws Exception { */ @Test public void isSelectedJavaScript() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; + final String html = DOCTYPE_HTML + ""; final String js = "alert('Hello there')"; @@ -135,7 +137,7 @@ public void save() throws Exception { */ @Test public void save_image() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; final URL url = getClass().getClassLoader().getResource("testfiles/tiny-jpg.img"); final WebClient webClient = getWebClientWithMockWebConnection(); @@ -168,7 +170,7 @@ public void save_image() throws Exception { */ @Test public void save_imageNotImage() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; final MockWebConnection webConnection = getMockWebConnection(); @@ -191,7 +193,7 @@ public void save_imageNotImage() throws Exception { */ @Test public void save_image_without_src() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; final WebClient webClient = getWebClientWithMockWebConnection(); final MockWebConnection webConnection = getMockWebConnection(); @@ -214,7 +216,7 @@ public void save_image_without_src() throws Exception { */ @Test public void save_image_empty_src() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; final WebClient webClient = getWebClientWithMockWebConnection(); final MockWebConnection webConnection = getMockWebConnection(); @@ -237,20 +239,23 @@ public void save_image_empty_src() throws Exception { */ @Test public void save_frames() throws Exception { - final String mainContent - = "First\n" + final String mainContent = DOCTYPE_HTML + + "First\n" + "\n" + " \n" + " \n" + " \n" + "\n" + ""; - final String frameLeftContent = "Second\n" + final String frameLeftContent = DOCTYPE_HTML + + "Second\n" + "\n" + "\n" + ""; - final String frameRightContent = "Thirdframe right"; - final String iframeContent = "Iframeiframe"; + final String frameRightContent = DOCTYPE_HTML + + "Thirdframe right"; + final String iframeContent = DOCTYPE_HTML + + "Iframeiframe"; try (InputStream is = getClass().getClassLoader().getResourceAsStream("testfiles/tiny-jpg.img")) { final byte[] directBytes = IOUtils.toByteArray(is); @@ -297,7 +302,8 @@ public void save_frames() throws Exception { */ @Test public void save_css() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; final String css = "body {color: blue}"; @@ -328,7 +334,8 @@ public void save_css() throws Exception { */ @Test public void save_css_without_href() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; final WebClient webClient = getWebClientWithMockWebConnection(); @@ -352,7 +359,8 @@ public void save_css_without_href() throws Exception { */ @Test public void save_css_empty_href() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; final WebClient webClient = getWebClientWithMockWebConnection(); @@ -380,12 +388,12 @@ public void save_css_empty_href() throws Exception { public void saveShouldStripLongFileNames() throws Exception { final RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange('a', 'z').get(); final String longName = generator.generate(500) + ".html"; - final String html = ""; + final String html = DOCTYPE_HTML + ""; final WebClient webClient = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); - webConnection.setDefaultResponse(""); + webConnection.setDefaultResponse(DOCTYPE_HTML + ""); webConnection.setResponse(URL_FIRST, html); webClient.setWebConnection(webConnection); @@ -403,7 +411,8 @@ public void saveShouldStripLongFileNames() throws Exception { */ @Test public void serialization_attributeListenerLock() throws Exception { - final String html = "\n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/html/HtmlPageTest.java b/src/test/java/org/htmlunit/html/HtmlPageTest.java index 3b595f4be63..f57b099a023 100644 --- a/src/test/java/org/htmlunit/html/HtmlPageTest.java +++ b/src/test/java/org/htmlunit/html/HtmlPageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ import org.htmlunit.WebResponse; import org.htmlunit.html.HtmlElementTest.HtmlAttributeChangeListenerTestImpl; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.htmlunit.util.Cookie; import org.htmlunit.util.MimeType; import org.htmlunit.util.NameValuePair; @@ -84,7 +84,8 @@ public class HtmlPageTest extends SimpleWebTestCase { */ @Test public void formSubmit() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "

hello world

\n" @@ -124,7 +125,8 @@ public void formSubmit() throws Exception { */ @Test public void getElementByIdNull() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "

hello world

\n" @@ -140,7 +142,8 @@ public void getElementByIdNull() throws Exception { */ @Test public void getElementsByIdNull() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "

hello world

\n" @@ -158,7 +161,8 @@ public void getElementsByIdNull() throws Exception { */ @Test public void getElementsByIdOrNameNull() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "

hello world

\n" @@ -176,7 +180,8 @@ public void getElementsByIdOrNameNull() throws Exception { */ @Test(expected = ElementNotFoundException.class) public void getElementByNameNull() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "

hello world

\n" @@ -192,7 +197,8 @@ public void getElementByNameNull() throws Exception { */ @Test public void getElementsByNameNull() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "

hello world

\n" @@ -211,7 +217,8 @@ public void getElementsByNameNull() throws Exception { */ @Test public void getHtmlElement() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "

hello world

\n" @@ -277,7 +284,8 @@ public void getHtmlElement() throws Exception { */ @Test public void getAnchorByText() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " anchor text\n" @@ -299,7 +307,8 @@ public void getAnchorByText() throws Exception { */ @Test public void getTabbableElements_None() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "

hello world

\n" @@ -316,7 +325,8 @@ public void getTabbableElements_None() throws Exception { */ @Test public void getTabbableElements_OneEnabled_OneDisabled() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "

hello world

\n" @@ -336,7 +346,8 @@ public void getTabbableElements_OneEnabled_OneDisabled() throws Exception { */ @Test public void getTabbableElements() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "foo\n" @@ -372,7 +383,8 @@ public void getTabbableElements() throws Exception { */ @Test public void getHtmlElementByAccessKey() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "foo\n" @@ -396,7 +408,8 @@ public void getHtmlElementByAccessKey() throws Exception { */ @Test public void getHtmlElementsByAccessKey() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "foo\n" + "foo\n" @@ -416,7 +429,8 @@ public void getHtmlElementsByAccessKey() throws Exception { */ @Test public void getFullQualifiedUrl_NoBaseSpecified() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "
row 1
row 2
\n" + ""; @@ -467,7 +481,8 @@ private void testGetFullQualifiedUrl_WithBase(final String baseProtocol, final S throws Exception { final String baseUrl = baseProtocol + "://second" + basePortPart; - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + "

\n" @@ -490,7 +505,7 @@ private void testGetFullQualifiedUrl_WithBase(final String baseProtocol, final S */ @Test(expected = MalformedURLException.class) public void getFullQualifiedUrl_invalid() throws Exception { - final String htmlContent = ""; + final String htmlContent = DOCTYPE_HTML + ""; final HtmlPage page = loadPage(htmlContent); page.getFullyQualifiedUrl("http://"); @@ -501,7 +516,8 @@ public void getFullQualifiedUrl_invalid() throws Exception { */ @Test public void testBase_Multiple() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -536,7 +552,8 @@ public void notify(final String message, final Object origin) { */ @Test public void testBase_InsideBody() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " link\n" + ""; @@ -558,7 +575,8 @@ public void testBase_InsideBody() throws Exception { */ @Test public void onLoadHandler_BodyStatement() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + ""; final List collectedAlerts = new ArrayList<>(); @@ -575,7 +593,8 @@ public void onLoadHandler_BodyStatement() throws Exception { */ @Test public void onLoadHandler_TwoBodyStatements() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + ""; final List collectedAlerts = new ArrayList<>(); @@ -592,7 +611,8 @@ public void onLoadHandler_TwoBodyStatements() throws Exception { */ @Test public void onLoadHandler_BodyName() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + ""; @@ -610,7 +630,8 @@ public void onLoadHandler_BodyName() throws Exception { */ @Test public void onLoadHandler_BodyName_NotAFunction() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + ""; @@ -630,7 +651,8 @@ public void onLoadHandler_BodyName_NotAFunction() throws Exception { */ @Test public void onLoadHandler_ScriptName() throws Exception { - final String htmlContent = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + "

helloworld &amp; helloall

\n" @@ -1092,7 +1132,8 @@ public void asXml2() throws Exception { @Test public void asXml_unicode() throws Exception { final String unicodeString = "\u064A\u0627 \u0644\u064A\u064A\u0644"; - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "" + unicodeString + ""; @@ -1113,7 +1154,8 @@ public void asXml_unicode() throws Exception { */ @Test public void asXml_noscript() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + + "" + "" + "" + ""; @@ -1137,7 +1179,8 @@ public void asXml_noscript() throws Exception { */ @Test public void getElementsById() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + + "" + "
foo
" + "
" + "
" @@ -1163,7 +1206,8 @@ public void getElementsById() throws Exception { */ @Test public void getElementsByName() throws Exception { - final String html = "
foo
"; + final String html = DOCTYPE_HTML + + "
foo
"; final HtmlPage page = loadPage(html); assertEquals(1, page.getElementsByName("a").size()); assertEquals(2, page.getElementsByName("b").size()); @@ -1183,7 +1227,8 @@ public void getElementsByName() throws Exception { */ @Test public void getElementByName() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "
foo
\n" + "
bar
\n" + "
baz
"; @@ -1200,7 +1245,8 @@ public void getElementByName() throws Exception { */ @Test(expected = ElementNotFoundException.class) public void getElementByNameNotfound() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "
foo
\n" + "
bar
\n" + "
baz
"; @@ -1213,8 +1259,9 @@ public void getElementByNameNotfound() throws Exception { */ @Test public void getHtmlElementsByIdAndOrName() throws Exception { - final String html = "
foo
bar
" - + "
bar
"; + final String html = DOCTYPE_HTML + + "
foo
bar
" + + "
bar
"; final HtmlPage page = loadPage(html); assertEquals(1, page.getElementsByIdAndOrName("a").size()); assertEquals(2, page.getElementsByIdAndOrName("b").size()); @@ -1236,8 +1283,8 @@ public void getHtmlElementsByIdAndOrName() throws Exception { */ @Test public void getHtmlElementByIdAfterRemove() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "
\n" + "
\n" @@ -1274,8 +1321,8 @@ public void getHtmlElementByIdAfterRemove() throws Exception { */ @Test public void getHtmlElementById_idTwice() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "
foo
\n" + "bla\n" @@ -1296,7 +1343,8 @@ public void getHtmlElementById_idTwice() throws Exception { @Test @Alerts("webm=none") public void setCookieMetaTag() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -1325,12 +1373,12 @@ public void noSlashURL() throws Exception { } private void testNoSlashURL(final String url) throws Exception { - final String firstContent - = "\n" + final String firstContent = DOCTYPE_HTML + + "\n" + "\n" + ""; - final String secondContent = ""; + final String secondContent = DOCTYPE_HTML + ""; final WebClient client = getWebClient(); final URL secondURL = new URL("http://second/"); @@ -1360,7 +1408,7 @@ public void metaTagWithEmptyURL() throws Exception { private int nbCalls_ = 0; @Override public WebResponse getResponse(final WebRequest request) throws IOException { - String content = "\n"; + String content = DOCTYPE_HTML + "\n"; if (nbCalls_ == 0) { content += "\n"; } @@ -1387,8 +1435,8 @@ public void serialization() throws Exception { // The document.all and form.elements calls are important because they trigger the creation // of HTMLCollections, which have caused serialization problems in the past (see bug #606). - final String content = - "\n" + final String content = DOCTYPE_HTML + + "\n" + "
Hello there!
\n" + "\n" @@ -1465,8 +1513,8 @@ public void serializationLambda() throws Exception { */ @Test public void serializationStaticDomNodeList() throws Exception { - final String content = - "\n" + final String content = DOCTYPE_HTML + + "\n" + "
Hello there!
\n" + "\n" + "\n" @@ -1495,7 +1543,8 @@ public void serializationStaticDomNodeList() throws Exception { */ @Test public void clonedPageHasOwnIdMap() throws Exception { - final String content = "foo" + final String content = DOCTYPE_HTML + + "foo" + "" + "
" + ""; @@ -1529,7 +1578,8 @@ public void clonedPageHasOwnIdMap() throws Exception { */ @Test public void clonedPageHasOwnDocumentElement() throws Exception { - final String content = "foo\n" + final String content = DOCTYPE_HTML + + "foo\n" + "\n" + "
\n" + ""; @@ -1547,8 +1597,8 @@ public void clonedPageHasOwnDocumentElement() throws Exception { */ @Test public void htmlAttributeChangeListener_AddAttribute() throws Exception { - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + ""; @@ -1852,8 +1908,8 @@ public void srcJavaScript() throws Exception { */ @Test public void asNormalizedText() throws Exception { - final String htmlContent - = "test\n" + final String htmlContent = DOCTYPE_HTML + + "test\n" + "\n" + "\n" + "
a
"; @@ -1867,8 +1923,8 @@ public void asNormalizedText() throws Exception { */ @Test public void getElementsByTagName() throws Exception { - final String firstContent - = "First\n" + final String firstContent = DOCTYPE_HTML + + "First\n" + "\n" + "
\n" + "
a
b
c
\n" @@ -1907,8 +1963,8 @@ public void getElementsByTagName() throws Exception { */ @Test public void readyState() throws Exception { - final String htmlContent - = "test\n" + final String htmlContent = DOCTYPE_HTML + + "test\n" + "\n" + "\n" + "
a
"; @@ -1922,7 +1978,8 @@ public void readyState() throws Exception { */ @Test public void cloneNode() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "

hello world

\n" @@ -1938,16 +1995,16 @@ public void cloneNode() throws Exception { */ @Test public void cloneHtmlPageWithFrame() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "
" + " " + "
" + ""; - final String frameContent = - "\n" + final String frameContent = DOCTYPE_HTML + + "\n" + "\n" + "" + "

frame1

" @@ -2024,8 +2081,8 @@ public void addAutoCloseableNull() throws Exception { */ @Test public void getBaseUrl() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "body\n" + ""; diff --git a/src/test/java/org/htmlunit/html/HtmlPageTest5.java b/src/test/java/org/htmlunit/html/HtmlPageTest5.java index 6e8ef8b7dd4..fbd5182d306 100644 --- a/src/test/java/org/htmlunit/html/HtmlPageTest5.java +++ b/src/test/java/org/htmlunit/html/HtmlPageTest5.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import org.htmlunit.SimpleWebTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -37,7 +37,8 @@ public class HtmlPageTest5 extends SimpleWebTestCase { @Test @Alerts({"focus-0", "blur-0", "focus-1", "blur-1", "focus-2"}) public void tabNext() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "First\n" + "\n" + "\n" @@ -69,7 +70,8 @@ public void tabNext() throws Exception { @Test @Alerts({"focus-2", "blur-2", "focus-1", "blur-1", "focus-0"}) public void tabPrevious() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "First\n" + "\n" + "\n" @@ -100,7 +102,8 @@ public void tabPrevious() throws Exception { */ @Test public void keyboard_NoTabbableElements() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "First\n" + "\n" + "\n" @@ -138,7 +141,8 @@ public void keyboard_NoTabbableElements() throws Exception { @Test @Alerts({"focus-0", "blur-0", "focus-0"}) public void keyboard_OneTabbableElement() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "First\n" + "\n" + "\n" @@ -184,7 +188,8 @@ public void keyboard_OneTabbableElement() throws Exception { @Test @Alerts({"focus-0", "blur-0", "focus-2", "blur-2", "focus-1"}) public void accessKeys() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "First\n" + "\n" + "\n" @@ -216,7 +221,8 @@ public void accessKeys() throws Exception { @Test @Alerts("buttonPushed") public void pressAccessKey_Button() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "First\n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/html/HtmlParagraphTest.java b/src/test/java/org/htmlunit/html/HtmlParagraphTest.java index 9a453a88ab2..c0ac0b3ff0c 100644 --- a/src/test/java/org/htmlunit/html/HtmlParagraphTest.java +++ b/src/test/java/org/htmlunit/html/HtmlParagraphTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,8 @@ public class HtmlParagraphTest extends SimpleWebTestCase { */ @Test public void asXml_emptyTag() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "

\n" + ""; @@ -46,7 +47,8 @@ public void asXml_emptyTag() throws Exception { */ @Test public void asNormalizedText_getTextContent() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "

\n" + "

abc

\n" + "

$24.43

\n" diff --git a/src/test/java/org/htmlunit/html/HtmlParameterTest.java b/src/test/java/org/htmlunit/html/HtmlParameterTest.java index 86f393ac434..20b18bed1eb 100644 --- a/src/test/java/org/htmlunit/html/HtmlParameterTest.java +++ b/src/test/java/org/htmlunit/html/HtmlParameterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.WebDriver; @@ -37,7 +37,8 @@ public class HtmlParameterTest extends WebDriverTestCase { @Test @Alerts("[object HTMLParamElement]") public void simpleScriptable() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -138,7 +152,8 @@ public void typeDoesNotChangeValueAttribute() throws Exception { @Test @Alerts({"HtmlUnit", "HtmlUnit"}) public void typeDoesNotChangeValueAttributeWithInitialValue() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -165,8 +180,8 @@ public void typeDoesNotChangeValueAttributeWithInitialValue() throws Exception { */ @Test public void preventDefault_OnKeyDown() throws Exception { - final String html = - "\n" + "\n" + "\n" @@ -256,8 +275,8 @@ public void typeOnChange() throws Exception { */ @Test public void setValueOnChange() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -283,8 +302,8 @@ public void setValueOnChange() throws Exception { */ @Test public void setDefaultValueOnChange() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " \n" + "\n" + "\n" + "
\n" + "Check me\n" + + " onchange='log(\"foo\");log(event.type);'>Check me\n" + "
\n" - + "\n" + + LOG_TEXTAREA + ""; final WebDriver driver = loadPage2(html); driver.findElement(By.id("radio")).click(); - assertEquals(Arrays.asList(getExpectedAlerts()).toString(), - '[' + driver.findElement(By.id("myTextarea")).getAttribute("value") + ']'); + verifyTextArea2(driver, getExpectedAlerts()); } /** * @throws Exception if the test fails */ @Test - @Alerts("foo,change,boo,blur,") + @Alerts({"foo", "change", "boo", "blur"}) public void onchangeFires2() throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "foo\n" + "\n" + "\n" + "
\n" + "Check Me\n" + "Or Check Me\n" + "
\n" - + "\n" + + LOG_TEXTAREA + ""; final WebDriver driver = loadPage2(html); driver.findElement(By.id("radio1")).click(); driver.findElement(By.id("radio2")).click(); - assertEquals(Arrays.asList(getExpectedAlerts()).toString(), - '[' + driver.findElement(By.id("myTextarea")).getAttribute("value") + ']'); + verifyTextArea2(driver, getExpectedAlerts()); } /** @@ -606,16 +592,15 @@ public void onchangeFires2() throws Exception { @Test @Alerts("Second") public void setChecked() throws Exception { - final String firstHtml = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String firstHtml = DOCTYPE_HTML + "First\n" + "
\n" + "\n" + "
\n" + ""; - final String secondHtml - = "Second"; + final String secondHtml = DOCTYPE_HTML + + "Second"; getMockWebConnection().setDefaultResponse(secondHtml); final WebDriver driver = loadPage2(firstHtml); @@ -630,8 +615,7 @@ public void setChecked() throws Exception { @Test @Alerts("Second") public void setChecked2() throws Exception { - final String firstHtml = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String firstHtml = DOCTYPE_HTML + "First\n" + "
\n" + "\n" + "
\n" + ""; - final String secondHtml - = "Second"; + final String secondHtml = DOCTYPE_HTML + + "Second"; getMockWebConnection().setDefaultResponse(secondHtml); final WebDriver driver = loadPage2(firstHtml); @@ -654,8 +638,7 @@ public void setChecked2() throws Exception { */ @Test public void preventDefault() throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + ""; loadPageVerifyTitle2(html); @@ -103,7 +104,8 @@ public void addedFromDocumentFragment() throws Exception { @Test @Alerts("[object HTMLScriptElement]") public void simpleScriptable() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -476,8 +486,8 @@ public void setTextMultipleTextNodes() throws Exception { @Test @Alerts({"1", "2", "3"}) public void settingSrcAttribute() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" @@ -570,7 +917,7 @@ public void addEventListener_NoContent() throws Exception { + ""; getMockWebConnection().setResponse(scriptUrl, (String) null, - HttpStatus.NO_CONTENT_204, HttpStatus.NO_CONTENT_204_MSG, MimeType.TEXT_JAVASCRIPT, null); + statusCode, "test", MimeType.TEXT_JAVASCRIPT, null); loadPageVerifyTitle2(html); } @@ -580,7 +927,8 @@ public void addEventListener_NoContent() throws Exception { */ @Test public void badSrcUrl() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -594,7 +942,7 @@ public void badSrcUrl() throws Exception { */ @Test public void invalidJQuerySrcAttribute() throws Exception { - loadPage2(""); + loadPage2(DOCTYPE_HTML + ""); } /** @@ -603,8 +951,8 @@ public void invalidJQuerySrcAttribute() throws Exception { @Test @Alerts({"loaded", "§§URL§§abcd"}) public void lineBreaksInUrl() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" @@ -626,8 +974,8 @@ public void lineBreaksInUrl() throws Exception { @Alerts({"\u0623\u0647\u0644\u0627\u064b\u0623\u0647\u0644\u0627" + "\u064b\u0623\u0647\u0644\u0627\u064b\u0623\u0647\u0644\u0627\u064b", "§§URL§§"}) public void incorrectCharset() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" @@ -684,8 +1032,8 @@ public void onLoadOnErrorWithoutType() throws Exception { } private void onLoadOnError(final String attribs) throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " " + "" + "abc"; @@ -878,7 +1227,8 @@ public void whitespaceInSrc() throws Exception { @Test @Alerts({"loaded", "§§URL§§"}) public void controlCharsInSrc() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + + "" + " " + "" + "abc"; @@ -900,7 +1250,8 @@ public void tabCharInSrc() throws Exception { String url = URL_SECOND.toExternalForm(); url = url.replace("http", "http\t"); - final String html = "" + final String html = DOCTYPE_HTML + + "" + " " + "" + "abc"; @@ -918,8 +1269,8 @@ public void tabCharInSrc() throws Exception { */ @Test public void emptySrc() throws Exception { - final String html1 = "abc"; - final String html2 = "abc"; + final String html1 = DOCTYPE_HTML + "abc"; + final String html2 = DOCTYPE_HTML + "abc"; loadPageWithAlerts2(html1); loadPageWithAlerts2(html2); @@ -932,7 +1283,7 @@ public void emptySrc() throws Exception { */ @Test public void noContent() throws Exception { - final String html = "\n"; @@ -965,7 +1317,8 @@ public void srcAndContent() throws Exception { */ @Test public void emptySrcAndContent() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n"; @@ -981,7 +1334,8 @@ public void emptySrcAndContent() throws Exception { */ @Test public void blankSrcAndContent() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n"; @@ -997,7 +1351,8 @@ public void blankSrcAndContent() throws Exception { */ @Test public void attribSrcAndContent() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n"; @@ -1015,7 +1370,8 @@ public void attribSrcAndContent() throws Exception { @Test @Alerts({"first script", "second script"}) public void content() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" + " \n"; diff --git a/src/test/java/org/htmlunit/html/HtmlScriptTest.java b/src/test/java/org/htmlunit/html/HtmlScriptTest.java index 0af1a8d983a..5e5f3fa758e 100644 --- a/src/test/java/org/htmlunit/html/HtmlScriptTest.java +++ b/src/test/java/org/htmlunit/html/HtmlScriptTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import org.htmlunit.SimpleWebTestCase; import org.htmlunit.WebClient; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.htmlunit.util.MimeType; import org.junit.Test; import org.junit.runner.RunWith; @@ -52,7 +52,8 @@ public class HtmlScriptTest extends SimpleWebTestCase { */ @Test public void badExternalScriptReference() throws Exception { - final String html = "foo\n" + final String html = DOCTYPE_HTML + + "foo\n" + "\n" + ""; @@ -89,7 +90,7 @@ public void badExternalScriptReference() throws Exception { */ @Test public void asNormalizedText() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; final HtmlPage page = loadPage(html); final HtmlScript script = page.getHtmlElementById("s"); assertEquals("", script.asNormalizedText()); @@ -101,8 +102,8 @@ public void asNormalizedText() throws Exception { @Test @Alerts("hello") public void asXml() throws Exception { - final String html - = "foo\n" + final String html = DOCTYPE_HTML + + "foo\n" + ""; @@ -122,7 +123,7 @@ public void asXml_scriptNestedInCData() throws Exception { final String script = "//"; - final String html = ""; + final String html = DOCTYPE_HTML + ""; final HtmlPage page = loadPage(html); final HtmlScript scriptElement = page.getHtmlElementById("s"); assertEquals("\r\n", @@ -136,7 +137,7 @@ public void asXml_scriptNestedInCData() throws Exception { @Test @Alerts("loaded") public void scriptCloneDoesNotReloadScript() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; final String js = "alert('loaded')"; final WebClient client = getWebClient(); @@ -178,8 +179,8 @@ public void addEventListener_error_clientDoesNotThrow() throws Exception { private void addEventListener_error(final boolean throwOnFailingStatusCode) throws Exception { final URL fourOhFour = new URL(URL_FIRST, "/404"); - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; + final String html = DOCTYPE_HTML + + "Page A"; final HtmlPage page = loadPageWithAlerts(html); final HtmlScript script = page.getFirstByXPath("//script"); assertFalse(script.isDisplayed()); @@ -250,16 +253,16 @@ public void isDisplayed() throws Exception { @Test @Alerts({"First script executes", "Second page loading"}) public void changingLocationSkipsFurtherScriptsOnPage() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" + "\n" + ""; - final String secondPage - = "\n" + final String secondPage = DOCTYPE_HTML + + "\n" + "\n" + ""; diff --git a/src/test/java/org/htmlunit/html/HtmlSearchInput2Test.java b/src/test/java/org/htmlunit/html/HtmlSearchInput2Test.java index f7345fd6280..3f8575f7175 100644 --- a/src/test/java/org/htmlunit/html/HtmlSearchInput2Test.java +++ b/src/test/java/org/htmlunit/html/HtmlSearchInput2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.SimpleWebTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -34,8 +34,8 @@ public class HtmlSearchInput2Test extends SimpleWebTestCase { */ @Test public void patternValidation() throws Exception { - final String htmlContent - = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "
\n" @@ -64,7 +64,8 @@ public void patternValidation() throws Exception { @Test @Alerts({"true", "true", "true", "", "foo"}) public void maxLengthValidation() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -91,7 +92,8 @@ public void maxLengthValidation() throws Exception { @Test @Alerts({"true", "false", "true", "", "foobar"}) public void minLengthValidation() throws Exception { - final String htmlContent = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/html/HtmlSearchInputTest.java b/src/test/java/org/htmlunit/html/HtmlSearchInputTest.java index cb42e122ae2..57eac9e9a1c 100644 --- a/src/test/java/org/htmlunit/html/HtmlSearchInputTest.java +++ b/src/test/java/org/htmlunit/html/HtmlSearchInputTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.By; @@ -31,7 +31,7 @@ * @author Marc Guillemot * @author Anton Demydenko * @author Ronald Brill -*/ + */ @RunWith(BrowserRunner.class) public class HtmlSearchInputTest extends WebDriverTestCase { @@ -40,26 +40,40 @@ public class HtmlSearchInputTest extends WebDriverTestCase { */ @Test public void type() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; final WebDriver webDriver = loadPage2(html); final WebElement input = webDriver.findElement(By.id("t")); + input.sendKeys("abc"); - assertEquals("abc", input.getAttribute("value")); + assertNull(input.getDomAttribute("value")); + assertEquals("abc", input.getDomProperty("value")); + input.sendKeys(Keys.BACK_SPACE); - assertEquals("ab", input.getAttribute("value")); + assertNull(input.getDomAttribute("value")); + assertEquals("ab", input.getDomProperty("value")); + input.sendKeys(Keys.BACK_SPACE); - assertEquals("a", input.getAttribute("value")); + assertNull(input.getDomAttribute("value")); + assertEquals("a", input.getDomProperty("value")); + input.sendKeys(Keys.BACK_SPACE); - assertEquals("", input.getAttribute("value")); + assertNull(input.getDomAttribute("value")); + assertEquals("", input.getDomProperty("value")); + input.sendKeys(Keys.BACK_SPACE); - assertEquals("", input.getAttribute("value")); + assertNull(input.getDomAttribute("value")); + assertEquals("", input.getDomProperty("value")); } + /** + * @throws Exception if an error occurs + */ @Test @Alerts({"--null", "--null", "--null"}) public void defaultValuesAfterClone() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "" @@ -276,8 +296,8 @@ public void typeOnChange() throws Exception { */ @Test public void setValueOnChange() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " \n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " \n" + "\n" + "\n" @@ -680,7 +704,7 @@ public void objectInsideLabel() throws Exception { + " log(tmp.tagName);\n" + " tmp = tmp.firstChild.tagName;\n" + " log(tmp);\n" - + "} catch(e) { log('exception'); }\n" + + "} catch(e) { logEx(e); }\n" + "}\n" + "\n" + "\n" @@ -843,7 +867,7 @@ public void ieConditionalCommentsNotInDom() throws Exception { + " log(tmp.innerHTML);\n" + " tmp = document.getElementById('my2');\n" + " log(tmp.innerHTML);\n" - + "} catch(e) { log('exception'); }\n" + + "} catch(e) { logEx(e); }\n" + "}\n" + "\n" + "\n" @@ -977,7 +1001,7 @@ public void selfClosingIframe() throws Exception { + " log(child2.nodeName);\n" + " log(child2.nodeValue);\n" - + "} catch(e) { log('exception'); }\n" + + "} catch(e) { logEx(e); }\n" + "}\n" + "\n" + "\n" @@ -1015,7 +1039,7 @@ public void dlShouldCloseDt() throws Exception { + " var child2 = child.childNodes[0];\n" + " log(child2.childNodes.length + '-' + child2.nodeType + '#' +child2.nodeName);\n" - + "} catch(e) { log('exception'); }\n" + + "} catch(e) { logEx(e); }\n" + "}\n" + "\n" + "\n" @@ -1047,7 +1071,7 @@ public void innerHtmlParagraph() throws Exception { + " var child = tmp.childNodes[0];\n" + " log(child.childNodes.length + '-' + child.nodeType + '#' + child.nodeName);\n" - + "} catch(e) { log('exception'); }\n" + + "} catch(e) { logEx(e); }\n" + "}\n" + "\n" + "\n" @@ -1080,7 +1104,7 @@ public void styleInsideP() throws Exception { + " tmp = tmp.nextSibling;\n" + " log(tmp.textContent);\n" - + "} catch(e) { log('exception'); }\n" + + "} catch(e) { logEx(e); }\n" + "}\n" + "\n" + "\n" @@ -1107,7 +1131,7 @@ public void styleInsideTable() throws Exception { + " tmp = tmp.firstChild;\n" + " log(tmp.tagName);\n" - + "} catch(e) { log('exception'); }\n" + + "} catch(e) { logEx(e); }\n" + "}\n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/html/parser/HTMLParser3Test.java b/src/test/java/org/htmlunit/html/parser/HTMLParser3Test.java index 15461a76ce6..24d4d140051 100644 --- a/src/test/java/org/htmlunit/html/parser/HTMLParser3Test.java +++ b/src/test/java/org/htmlunit/html/parser/HTMLParser3Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/html/parser/HTMLParser4Test.java b/src/test/java/org/htmlunit/html/parser/HTMLParser4Test.java index 83e73e4de48..7edac45d24c 100644 --- a/src/test/java/org/htmlunit/html/parser/HTMLParser4Test.java +++ b/src/test/java/org/htmlunit/html/parser/HTMLParser4Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,8 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.html.HtmlPageTest; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; -import org.htmlunit.junit.BrowserRunner.NotYetImplemented; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.WebDriver; @@ -169,7 +168,14 @@ public void badlyFormedHTML_scriptBeforeDoctype() throws Exception { @Test @Alerts({"4", "[object HTMLParagraphElement]", "[object Text]", "[object HTMLScriptElement]", "[object Text]"}) - @NotYetImplemented + @HtmlUnitNYI(CHROME = {"3", "[object HTMLParagraphElement]", "[object HTMLScriptElement]", + "[object Text]", "undefined"}, + EDGE = {"3", "[object HTMLParagraphElement]", "[object HTMLScriptElement]", + "[object Text]", "undefined"}, + FF = {"3", "[object HTMLParagraphElement]", "[object HTMLScriptElement]", + "[object Text]", "undefined"}, + FF_ESR = {"3", "[object HTMLParagraphElement]", "[object HTMLScriptElement]", + "[object Text]", "undefined"}) public void badlyFormedHTML_scriptAfterHtml() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" @@ -367,7 +373,7 @@ public void namespace2() throws Exception { + " try {\n" + " div = document.createElementNS('http://www.appcelerator.org', 'app:script');\n" + " debug(div);\n" - + " } catch (e) {log('createElementNS() is not defined')}\n" + + " } catch(e) {log('createElementNS() is not defined')}\n" + " debug(document.getElementById('script1'));\n" + " debug(document.getElementById('script2'));\n" + " }\n" @@ -710,7 +716,10 @@ public void setCompleteHtmlToDIV2_innerHTML() throws Exception { */ @Test @Alerts({"titles", "HEAD", "Inner Html", "misc", "true", "BODY"}) - @NotYetImplemented + @HtmlUnitNYI(CHROME = {"titles", "HTML", "Inner Html", "misc", "false", "HTML"}, + EDGE = {"titles", "HTML", "Inner Html", "misc", "false", "HTML"}, + FF = {"titles", "HTML", "Inner Html", "misc", "false", "HTML"}, + FF_ESR = {"titles", "HTML", "Inner Html", "misc", "false", "HTML"}) // currently the content of HEAD and BODY are added directly to HTML public void setCompleteHtmlToHTML_innerHTML() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -743,7 +752,7 @@ public void setCompleteHtmlToHTML_innerHTML() throws Exception { + " document.getElementsByTagName('html')[0].innerHTML =" + " 'Inner Html" + "
Inner DIV
';\n" - + " } catch(e) { log('exception') }\n" + + " } catch(e) { logEx(e) }\n" + " \n" + "\n" + "\n"; diff --git a/src/test/java/org/htmlunit/html/parser/HTMLParser5Test.java b/src/test/java/org/htmlunit/html/parser/HTMLParser5Test.java index 5bb2cfdc7f7..1395fbd4a29 100644 --- a/src/test/java/org/htmlunit/html/parser/HTMLParser5Test.java +++ b/src/test/java/org/htmlunit/html/parser/HTMLParser5Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.JavascriptExecutor; @@ -38,6 +38,9 @@ public class HTMLParser5Test extends WebDriverTestCase { + " log(inp.id + '-' + (f?f.name:null))" + "}"; + /** + * @throws Exception if the test fails + */ @Test @Alerts({"i1-f1", "i2-f2"}) public void formEnclosure_table() throws Exception { @@ -62,6 +65,9 @@ public void formEnclosure_table() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts({"i1-f1", "i2-f2"}) public void formEnclosure_div() throws Exception { @@ -86,6 +92,9 @@ public void formEnclosure_div() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts({"i1-f1", "i2-f1"}) public void formEnclosure_table_nestedForms() throws Exception { @@ -110,6 +119,9 @@ public void formEnclosure_table_nestedForms() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts({"i1-f1", "i2-f1"}) public void formEnclosure_div_nestedForms() throws Exception { @@ -134,6 +146,9 @@ public void formEnclosure_div_nestedForms() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts({"i1-f1", "i2-f1", "i3-null", "i4-null"}) public void formEnclosure_nestedForms() throws Exception { @@ -156,6 +171,9 @@ public void formEnclosure_nestedForms() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts({"i1-f1", "i2-f1", "i3-f1", "i4-f1", "i5-f1", "i6-f1", "i7-null"}) public void formEnclosure_tree1() throws Exception { @@ -189,6 +207,9 @@ public void formEnclosure_tree1() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts({"i1-f1", "i2-f1", "i3-f1", "i4-f2", "i5-f2", "i6-f2", "i7-f1", "i8-null"}) public void formEnclosure_tree2() throws Exception { @@ -223,6 +244,9 @@ public void formEnclosure_tree2() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts({"i1-f1", "i2-null"}) public void formEnclosure_tree3() throws Exception { @@ -243,6 +267,9 @@ public void formEnclosure_tree3() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("xy
") public void unclosedForm() throws Exception { diff --git a/src/test/java/org/htmlunit/html/parser/HTMLParser6Test.java b/src/test/java/org/htmlunit/html/parser/HTMLParser6Test.java index 6b5e04f3e6c..6282c45a381 100644 --- a/src/test/java/org/htmlunit/html/parser/HTMLParser6Test.java +++ b/src/test/java/org/htmlunit/html/parser/HTMLParser6Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -108,11 +107,7 @@ public void fragmentParserHtmlInsideSelect() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "", - FF = "", - FF_ESR = "") - @HtmlUnitNYI(CHROME = "", - EDGE = "") + @Alerts("") public void fragmentParserHtmlInsideOption() throws Exception { final String fragment = ""; final String html = "\n" @@ -132,4 +127,79 @@ public void fragmentParserHtmlInsideOption() throws Exception { loadPageVerifyTitle2(html); } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("
xy
") + public void fragmentParserLtInAttributeName() throws Exception { + final String fragment = "
xy
"; + final String html = "\n" + + "\n" + + "
\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("
xy
") + public void fragmentParserLtFirstInAttributeName() throws Exception { + final String fragment = "
xy
"; + final String html = "\n" + + "\n" + + "
\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("
xy
") + public void fragmentParserNumericAttributeName() throws Exception { + final String fragment = "
xy
"; + final String html = "\n" + + "\n" + + "
\n" + + ""; + + loadPageVerifyTitle2(html); + } } diff --git a/src/test/java/org/htmlunit/html/parser/HTMLParserListenerTest.java b/src/test/java/org/htmlunit/html/parser/HTMLParserListenerTest.java index 016c4e42fd2..0c1f6a93e67 100644 --- a/src/test/java/org/htmlunit/html/parser/HTMLParserListenerTest.java +++ b/src/test/java/org/htmlunit/html/parser/HTMLParserListenerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,7 +67,9 @@ static class MessageInfo { // ignore key } - /** @see Object#toString() */ + /** + * @see Object#toString() + */ @Override public String toString() { return message_ + " (" + url_ + " " + line_ + ":" + column_ + ")"; diff --git a/src/test/java/org/htmlunit/html/parser/HTMLParserTest.java b/src/test/java/org/htmlunit/html/parser/HTMLParserTest.java index 57dcd694f22..975e3dc9695 100644 --- a/src/test/java/org/htmlunit/html/parser/HTMLParserTest.java +++ b/src/test/java/org/htmlunit/html/parser/HTMLParserTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/html/parser/MalformedHtml2Test.java b/src/test/java/org/htmlunit/html/parser/MalformedHtml2Test.java index 7f487dc2433..f201c55abe4 100644 --- a/src/test/java/org/htmlunit/html/parser/MalformedHtml2Test.java +++ b/src/test/java/org/htmlunit/html/parser/MalformedHtml2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/htmlunit/html/parser/MalformedHtmlTest.java b/src/test/java/org/htmlunit/html/parser/MalformedHtmlTest.java index 1066b9e3748..f0cf695b880 100644 --- a/src/test/java/org/htmlunit/html/parser/MalformedHtmlTest.java +++ b/src/test/java/org/htmlunit/html/parser/MalformedHtmlTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.html.HtmlPageTest; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.By; @@ -184,9 +184,9 @@ public void wrongHtml_TagBeforeHtml() throws Exception { } /** - * Regression test for bug #889. - * @throws Exception if an error occurs - */ + * Regression test for bug #889. + * @throws Exception if an error occurs + */ @Test @Alerts("0") public void missingSingleQuote() throws Exception { @@ -207,9 +207,9 @@ public void missingSingleQuote() throws Exception { } /** - * Regression test for bug #889. - * @throws Exception if an error occurs - */ + * Regression test for bug #889. + * @throws Exception if an error occurs + */ @Test @Alerts("0") public void missingDoubleQuote() throws Exception { @@ -230,9 +230,9 @@ public void missingDoubleQuote() throws Exception { } /** - * Regression test for bug #1192. - * @throws Exception if an error occurs - */ + * Regression test for bug #1192. + * @throws Exception if an error occurs + */ @Test @Alerts({"submit", "button"}) public void brokenInputSingleQuote() throws Exception { @@ -253,9 +253,9 @@ public void brokenInputSingleQuote() throws Exception { } /** - * Regression test for bug #1192. - * @throws Exception if an error occurs - */ + * Regression test for bug #1192. + * @throws Exception if an error occurs + */ @Test @Alerts({"submit", "button"}) public void brokenInputDoubleQuote() throws Exception { @@ -300,6 +300,9 @@ public void nestedForms() throws Exception { assertTitle(driver, getExpectedAlerts()[0]); driver.findElement(By.id("button")).click(); + if (useRealBrowser()) { + Thread.sleep(400); + } assertEquals(URL_FIRST + "?FromDate=inFirst", driver.getCurrentUrl()); } @@ -320,7 +323,7 @@ public void li_div_li() throws Exception { } /** - * Regression test for bug 1564. + * Regression test for bug 1564. * @throws Exception if an error occurs */ @Test @@ -339,7 +342,7 @@ public void entityWithInvalidUTF16Code() throws Exception { } /** - * Regression test for bug 1562. + * Regression test for bug 1562. * @throws Exception if an error occurs */ @Test @@ -368,21 +371,21 @@ public void sectionWithUnknownClosingTag() throws Exception { "innerA", "DIV:null", "1", "#text:X", "false", "true"}) @HtmlUnitNYI( CHROME = {"4", "#text:\\n\\s\\s", "A:null", "A:null", "#text:YZ\\n\\n", - "2", "innerDiv", "A:null", "1", "#text:W", "exception", + "2", "innerDiv", "A:null", "1", "#text:W", "TypeError", "outerA", "BODY:null", "2", "#text:V", "true", "false", - "innerA", "BODY:null", "1", "#text:X", "false", "true", "exception"}, + "innerA", "BODY:null", "1", "#text:X", "false", "true", "TypeError"}, EDGE = {"4", "#text:\\n\\s\\s", "A:null", "A:null", "#text:YZ\\n\\n", - "2", "innerDiv", "A:null", "1", "#text:W", "exception", + "2", "innerDiv", "A:null", "1", "#text:W", "TypeError", "outerA", "BODY:null", "2", "#text:V", "true", "false", - "innerA", "BODY:null", "1", "#text:X", "false", "true", "exception"}, + "innerA", "BODY:null", "1", "#text:X", "false", "true", "TypeError"}, FF = {"4", "#text:\\n\\s\\s", "A:null", "A:null", "#text:YZ\\n\\n", - "2", "innerDiv", "A:null", "1", "#text:W", "exception", + "2", "innerDiv", "A:null", "1", "#text:W", "TypeError", "outerA", "BODY:null", "2", "#text:V", "true", "false", - "innerA", "BODY:null", "1", "#text:X", "false", "true", "exception"}, + "innerA", "BODY:null", "1", "#text:X", "false", "true", "TypeError"}, FF_ESR = {"4", "#text:\\n\\s\\s", "A:null", "A:null", "#text:YZ\\n\\n", - "2", "innerDiv", "A:null", "1", "#text:W", "exception", + "2", "innerDiv", "A:null", "1", "#text:W", "TypeError", "outerA", "BODY:null", "2", "#text:V", "true", "false", - "innerA", "BODY:null", "1", "#text:X", "false", "true", "exception"}) + "innerA", "BODY:null", "1", "#text:X", "false", "true", "TypeError"}) // Input: // VZ
// CHROME and IE generate: @@ -406,7 +409,7 @@ public void nestedAnchorInDivision() throws Exception { + " dump(document.body.childNodes[2]);\n" + " dump(document.body.childNodes[3]);\n" + " log(document.getElementsByTagName('a').length);\n" - + " } catch (e) { log('exception') }\n" + + " } catch(e) { logEx(e) }\n" + " try {\n" + " log(innerDiv.id);\n" @@ -415,7 +418,7 @@ public void nestedAnchorInDivision() throws Exception { + " dump(innerDiv.childNodes[0]);\n" + " dump(innerDiv.childNodes[1]);\n" + " dump(innerDiv.childNodes[2]);\n" - + " } catch (e) { log('exception') }\n" + + " } catch(e) { logEx(e) }\n" + " try {\n" + " log(anchors[0].id);\n" @@ -424,7 +427,7 @@ public void nestedAnchorInDivision() throws Exception { + " dump(anchors[0].childNodes[0]);\n" + " log(anchors[0] == outerA);\n" + " log(anchors[0] == innerA);\n" - + " } catch (e) { log('exception') }\n" + + " } catch(e) { logEx(e) }\n" + " try {\n" + " log(anchors[1].id);\n" @@ -433,7 +436,7 @@ public void nestedAnchorInDivision() throws Exception { + " dump(anchors[1].childNodes[0]);\n" + " log(anchors[1] == outerA);\n" + " log(anchors[1] == innerA);\n" - + " } catch (e) { log('exception') }\n" + + " } catch(e) { logEx(e) }\n" + " try {\n" + " log(anchors[2].id);\n" @@ -442,7 +445,7 @@ public void nestedAnchorInDivision() throws Exception { + " dump(anchors[2].childNodes[0]);\n" + " log(anchors[2] == outerA);\n" + " log(anchors[2] == innerA);\n" - + " } catch (e) { log('exception') }\n" + + " } catch(e) { logEx(e) }\n" + " }\n" + " function dump(e) {\n" + " log(e.nodeName + ':' + e.nodeValue);\n" @@ -456,7 +459,7 @@ public void nestedAnchorInDivision() throws Exception { } /** - * Regression test for bug 1598. + * Regression test for bug 1598. * @throws Exception if an error occurs */ @Test @@ -506,6 +509,20 @@ public void unknownTagInTbody() throws Exception { + "" + "" + "") public void formInTableData() throws Exception { final String html = "\n" @@ -544,6 +561,20 @@ public void formInTableData() throws Exception { + "" + "" + "") public void formInTableRow() throws Exception { final String html = "\n" @@ -591,8 +622,21 @@ public void formInTableRow() throws Exception { + "" + "" + "") - public void formInTable() throws Exception { final String html = "\n" + "\n" diff --git a/src/test/java/org/htmlunit/html/performance/HugePagePerformanceTest.java b/src/test/java/org/htmlunit/html/performance/HugePagePerformanceTest.java index af3c45146fb..253912fcb7b 100644 --- a/src/test/java/org/htmlunit/html/performance/HugePagePerformanceTest.java +++ b/src/test/java/org/htmlunit/html/performance/HugePagePerformanceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,11 @@ public final class HugePagePerformanceTest { private HugePagePerformanceTest() { } + /** + * Simple main for the moment. + * @param args ignored + * @throws IOException in case of error + */ public static void main(final String[] args) throws IOException { // final URL fileURL = WebClient.class.getClassLoader() // .getResource("testfiles/huge-pages/html-standard-2024-10-17.html"); diff --git a/src/test/java/org/htmlunit/html/serializer/HtmlSerializerInnerOuterText2Test.java b/src/test/java/org/htmlunit/html/serializer/HtmlSerializerInnerOuterText2Test.java index 5b5e50bf432..73be1a06f1d 100644 --- a/src/test/java/org/htmlunit/html/serializer/HtmlSerializerInnerOuterText2Test.java +++ b/src/test/java/org/htmlunit/html/serializer/HtmlSerializerInnerOuterText2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.By; @@ -95,8 +95,8 @@ public void getInnerTextWhiteSpaceBreakPreLine() throws Exception { } private void getInnerTextWhiteSpaceBreak(final String whiteSpace) throws Exception { - final String htmlContent - = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "
\n" @@ -169,8 +169,8 @@ public void getInnerTextWhiteSpaceInputHiddenPreLine() throws Exception { } private void getInnerTextWhiteSpaceInputHidden(final String whiteSpace) throws Exception { - final String htmlContent - = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "
\n" @@ -247,8 +247,8 @@ public void getInnerTextWhiteSpaceScriptPreLine() throws Exception { } private void getInnerTextWhiteSpaceScript(final String whiteSpace) throws Exception { - final String htmlContent - = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + " \n" + + "\n" + + " \n" + + ""; + + loadPageVerifyTitle2(content); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"4", "null"}) + public void xPathUndefined() throws Exception { + final String content = DOCTYPE_HTML + + "\n" + + "\n" + + "\n" + + " \n" + + ""; + + loadPageVerifyTitle2(content); + } + /** * @throws Exception if the test fails */ @Test @Alerts({"102", "111", "111", "160", "97", "110", "100", "160", "102", "111", "111"}) public void optionText() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -63,7 +128,8 @@ public void optionText() throws Exception { @Test @Alerts("[object HTMLParagraphElement][object HTMLDivElement]") public void pipe() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -93,7 +159,8 @@ public void pipe() throws Exception { @Test @Alerts("a") public void math() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -254,6 +321,51 @@ public void number() throws Exception { compare("//p[@y=number(\" 13\t \")]"); } + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("false") + public void startsWith() throws Exception { + compareBooleanValue("starts-with(\"haystack\", \"needle\")"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void startsWithFound() throws Exception { + compareBooleanValue("starts-with(\"haystack\", \"hay\")"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void startsWithWhole() throws Exception { + compareBooleanValue("starts-with(\"haystack\", \"haystack\")"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void startsWithEmpty() throws Exception { + compareBooleanValue("starts-with(\"haystack\", \"\")"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void startsWithEmptyEmpty() throws Exception { + compareBooleanValue("starts-with(\"\", \"\")"); + } + /** * @throws Exception if the test fails */ @@ -272,7 +384,9 @@ public void substringWithNegativeLength() throws Exception { compareStringValue("substring(\"HtmlUnit\", 2, -1)"); } - /** @throws Exception in case of problems */ + /** + * @throws Exception in case of problems + */ @Test @Alerts("''") public void substringNegativeStartWithLength() throws Exception { @@ -319,13 +433,32 @@ public void attrib() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("error") + @Alerts("SyntaxError/DOMException") public void lowerCaseNotSupported() throws Exception { - compare("//*[lower-case(@id) = \"a\"]"); + compareError("//*[lower-case(@id) = \"a\"]"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("SyntaxError/DOMException") + public void upperCaseNotSupported() throws Exception { + compareError("//*[upper-case(@id) = \"A\"]"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("SyntaxError/DOMException") + public void endsWithNotSupported() throws Exception { + compareError("ends-with(\"haystack\", \"haystack\")"); } private void compare(final String xpath) throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -352,7 +485,8 @@ private void compare(final String xpath) throws Exception { } private void compareStringValue(final String xpath) throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -376,7 +510,8 @@ private void compareStringValue(final String xpath) throws Exception { } private void compareBooleanValue(final String xpath) throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -399,13 +534,34 @@ private void compareBooleanValue(final String xpath) throws Exception { loadPageVerifyTitle2(content); } + private void compareError(final String xpath) throws Exception { + final String content = DOCTYPE_HTML + + "\n" + + "\n" + + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(content); + } + /** * @throws Exception if the test fails */ @Test @Alerts("mySpan") public void minimalParameters() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -434,7 +590,8 @@ public void minimalParameters() throws Exception { @Test @Alerts("mySpan") public void undefinedResult() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -462,9 +619,10 @@ public void undefinedResult() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("error") + @Alerts("TypeError") public void stringResult() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -494,7 +652,8 @@ public void stringResult() throws Exception { @Test @Alerts("mySpan") public void objectResult() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -526,7 +685,8 @@ public void objectResult() throws Exception { FF = "mySpan - myDiv - ", FF_ESR = "mySpan - myDiv - ") public void reuseResult() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -569,7 +729,8 @@ public void reuseResult() throws Exception { @Test @Alerts("myDiv1") public void documentEvaluateFirst() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/html/xpath/HtmlUnitXPathTest.java b/src/test/java/org/htmlunit/html/xpath/HtmlUnitXPathTest.java index 8179be8405c..a0e1cdb81ec 100644 --- a/src/test/java/org/htmlunit/html/xpath/HtmlUnitXPathTest.java +++ b/src/test/java/org/htmlunit/html/xpath/HtmlUnitXPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,7 +49,8 @@ public class HtmlUnitXPathTest extends SimpleWebTestCase { */ @Test public void simplePath() throws Exception { - final String content = "Test page\n" + final String content = DOCTYPE_HTML + + "Test page\n" + "foo\n" + ""; @@ -66,7 +67,8 @@ public void simplePath() throws Exception { */ @Test public void xpathFromElement() throws Exception { - final String content = "Test page\n" + final String content = DOCTYPE_HTML + + "Test page\n" + "foo\n" + ""; @@ -83,8 +85,8 @@ public void xpathFromElement() throws Exception { @Test @SuppressWarnings("unchecked") public void elementOrder() throws Exception { - final String content - = "First\n" + ""; @@ -105,8 +107,8 @@ public void elementOrder() throws Exception { */ @Test public void whenJSChangesPage() throws Exception { - final String content - = "foo"; + + loadPageVerifyTitle2(html); + } + + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("callee,length") + public void argumentsPropertyNamesStrict() throws Exception { + final String html = DOCTYPE_HTML + + "" + + ""; + + loadPageVerifyTitle2(html); + } + /** * @throws Exception if the test fails */ @Test @Alerts("2") public void passedCountDifferentFromDeclared() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"true", "true"}) + public void argumentsCalleeDifferentFunctions() throws Exception { + final String html = DOCTYPE_HTML + + "" + + ""; + + loadPageVerifyTitle2(html); + } } diff --git a/src/test/java/org/htmlunit/javascript/AttributeCaseTest.java b/src/test/java/org/htmlunit/javascript/AttributeCaseTest.java index 4df8a3a2dc6..215d0e14b9f 100644 --- a/src/test/java/org/htmlunit/javascript/AttributeCaseTest.java +++ b/src/test/java/org/htmlunit/javascript/AttributeCaseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -174,7 +174,8 @@ private void setupAttributeTest(final String content, final String elementId) th private void setupGetAttributeTest(final String attributeName, final String attributeValue) throws Exception { final String elementId = "p-id"; - final String content = "AttributeCaseTest\n" + final String content = DOCTYPE_HTML + + "AttributeCaseTest\n" + "

\n" + ""; @@ -187,8 +188,8 @@ private void setupSetAttributeTest( throws Exception { final String elementId = "p-id"; - final String content - = "AttributeCaseTest\n" + final String content = DOCTYPE_HTML + + "AttributeCaseTest\n" + "

\n" + "\n" + ""; @@ -59,8 +59,8 @@ public void oneRestArg() throws Exception { @Test @Alerts("true-0") public void oneRestArgNothingProvided() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -72,7 +72,7 @@ public void oneRestArgNothingProvided() throws Exception { + "try {\n" + " var r = rest();\n" + " log('' + Array.isArray(r) + '-' + r.length);\n" - + "} catch (e) { log(e.message) }" + + "} catch(e) { log(e.message) }" + "\n" + ""; @@ -85,8 +85,8 @@ public void oneRestArgNothingProvided() throws Exception { @Test @Alerts("true-1") public void oneRestArgOneProvided() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -98,7 +98,7 @@ public void oneRestArgOneProvided() throws Exception { + "try {\n" + " var r = rest('xy');\n" + " log('' + Array.isArray(r) + '-' + r.length);\n" - + "} catch (e) { log(e.message) }" + + "} catch(e) { log(e.message) }" + "\n" + ""; @@ -111,8 +111,8 @@ public void oneRestArgOneProvided() throws Exception { @Test @Alerts("abc,2,##") public void twoRestArg() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -123,7 +123,7 @@ public void twoRestArg() throws Exception { + "}\n" + "try {\n" + " log(rest(1, 'abc', 2, '##').toString());\n" - + "} catch (e) { log(e.message) }" + + "} catch(e) { log(e.message) }" + "\n" + ""; @@ -136,8 +136,8 @@ public void twoRestArg() throws Exception { @Test @Alerts("undefined - true-0") public void twoRestArgNothingProvided() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -148,7 +148,7 @@ public void twoRestArgNothingProvided() throws Exception { + "}\n" + "try {\n" + " log(rest());\n" - + "} catch (e) { log(e.message) }" + + "} catch(e) { log(e.message) }" + "\n" + ""; @@ -161,8 +161,8 @@ public void twoRestArgNothingProvided() throws Exception { @Test @Alerts("77 - true-0") public void twoRestArgOneProvided() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -173,7 +173,7 @@ public void twoRestArgOneProvided() throws Exception { + "}\n" + "try {\n" + " log(rest('77'));\n" - + "} catch (e) { log(e.message) }" + + "} catch(e) { log(e.message) }" + "\n" + ""; @@ -186,8 +186,8 @@ public void twoRestArgOneProvided() throws Exception { @Test @Alerts("1-4") public void arguments() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -198,7 +198,7 @@ public void arguments() throws Exception { + "}\n" + "try {\n" + " log('' + rest('77') + '-' + rest(1, 2, 3, 4));\n" - + "} catch (e) { log(e.message) }" + + "} catch(e) { log(e.message) }" + "\n" + ""; @@ -211,8 +211,8 @@ public void arguments() throws Exception { @Test @Alerts("0-1") public void length() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -222,7 +222,7 @@ public void length() throws Exception { + "function foo2(arg, ...theArgs) {}\n" + "try {\n" + " log(foo1.length + '-' + foo2.length);\n" - + "} catch (e) { log(e.message) }" + + "} catch(e) { log(e.message) }" + "\n" + ""; @@ -235,8 +235,8 @@ public void length() throws Exception { @Test @Alerts("2-1-0") public void argLength() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -247,7 +247,7 @@ public void argLength() throws Exception { + "}\n" + "try {\n" + " log(rest(1,2) + '-' + rest(1) + '-' + rest());\n" - + "} catch (e) { log(e.message) }" + + "} catch(e) { log(e.message) }" + "\n" + ""; @@ -260,8 +260,8 @@ public void argLength() throws Exception { @Test @Alerts("function rest(...restArgs) { return restArgs.length; }") public void string() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -272,7 +272,7 @@ public void string() throws Exception { + "}\n" + "try {\n" + " log(rest.toString());\n" - + "} catch (e) { log(e.message) }" + + "} catch(e) { log(e.message) }" + "\n" + ""; diff --git a/src/test/java/org/htmlunit/javascript/FunctionsTest.java b/src/test/java/org/htmlunit/javascript/FunctionsTest.java index 113c89c762b..7521f10f96c 100644 --- a/src/test/java/org/htmlunit/javascript/FunctionsTest.java +++ b/src/test/java/org/htmlunit/javascript/FunctionsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,10 +16,11 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.NotYetImplemented; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; +import org.openqa.selenium.WebDriverException; /** * Tests for Functions. @@ -35,8 +36,8 @@ public class FunctionsTest extends WebDriverTestCase { @Test @Alerts("function\\sfoo()\\s{\\s\\s\\s\\sreturn\\s\\t'a'\\s+\\s'b'\\s}") public void function_toString() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; - loadPageVerifyTitle2(html); + try { + loadPageVerifyTitle2(html); + } + catch (final WebDriverException e) { + assertTrue(e.getMessage(), e.getMessage().startsWith(getExpectedAlerts()[0])); + } } /** * @throws Exception if the test fails */ @Test - @Alerts({"error", "1"}) + @Alerts({"ReferenceError", "1"}) public void conditionallyCreatedFunctionStrict() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test/java/org/htmlunit/javascript/HtmlUnitContextFactoryTest.java b/src/test/java/org/htmlunit/javascript/HtmlUnitContextFactoryTest.java index 6a41f84af1c..9cf81bfd2e5 100644 --- a/src/test/java/org/htmlunit/javascript/HtmlUnitContextFactoryTest.java +++ b/src/test/java/org/htmlunit/javascript/HtmlUnitContextFactoryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ public class HtmlUnitContextFactoryTest extends SimpleWebTestCase { */ @Test public void customBrowserVersion() throws Exception { - final String html = ""; + final String html = DOCTYPE_HTML + ""; final BrowserVersion browserVersion = new BrowserVersion.BrowserVersionBuilder(BrowserVersion.FIREFOX_ESR) diff --git a/src/test/java/org/htmlunit/javascript/HtmlUnitScriptable2Test.java b/src/test/java/org/htmlunit/javascript/HtmlUnitScriptable2Test.java index 7a12dba6129..1708ac8b6c6 100644 --- a/src/test/java/org/htmlunit/javascript/HtmlUnitScriptable2Test.java +++ b/src/test/java/org/htmlunit/javascript/HtmlUnitScriptable2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,9 @@ package org.htmlunit.javascript; import org.htmlunit.WebDriverTestCase; -import org.htmlunit.html.HtmlPageTest; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; @@ -46,7 +45,7 @@ public class HtmlUnitScriptable2Test extends WebDriverTestCase { @Test @Alerts({"text/html", "text/html"}) public void setNonWritablePropertyContentType() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -70,7 +69,7 @@ public void setNonWritablePropertyContentType() throws Exception { @Test @Alerts({"CSS1Compat", "CSS1Compat"}) public void setNonWritablePropertyCompatMode() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -94,7 +93,7 @@ public void setNonWritablePropertyCompatMode() throws Exception { @Test @Alerts("[object Arguments]") public void arguments_toString() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -338,7 +337,7 @@ private void set_ReadOnly(final String expression) throws Exception { @HtmlUnitNYI(CHROME = {"function", "true", "function length() { [native code] }", "0", "0"}, EDGE = {"function", "true", "function length() { [native code] }", "0", "0"}) public void lookupGetter() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/javascript/HtmlUnitScriptableTest.java b/src/test/java/org/htmlunit/javascript/HtmlUnitScriptableTest.java index c35f9ac14f6..2260013ea30 100644 --- a/src/test/java/org/htmlunit/javascript/HtmlUnitScriptableTest.java +++ b/src/test/java/org/htmlunit/javascript/HtmlUnitScriptableTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import org.htmlunit.SimpleWebTestCase; import org.htmlunit.html.HtmlPage; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -44,8 +44,8 @@ public class HtmlUnitScriptableTest extends SimpleWebTestCase { @Test @Alerts("past focus") public void callInheritedFunction() throws Exception { - final String html - = "foo\n" + ""; @@ -289,7 +296,8 @@ private void object(final String object) throws Exception { @Test @Alerts({"function", "function"}) public void inline() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -448,7 +464,8 @@ public void recursion() throws Exception { @Test @Alerts({"0", "false", "0"}) public void nativeFunction_toStringValue() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -492,8 +509,8 @@ public void onloadJavascriptFunction() throws Exception { @Test @Alerts("foo") public void alert() throws Exception { - final String html - = "foo\n" + "

hello world

\n" @@ -513,8 +530,8 @@ public void alert() throws Exception { @Test @Alerts("foo") public void scopeOfNewFunction() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + + " \n" + + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -704,7 +725,8 @@ public void comment() throws Exception { "rstlna-rstlne-rstlne", "rstlne-rstlne-rstlne", "rstlni-rstlni-rstlni", "rstlna-rstlna-rstlna"}) public void regExpSupport() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" + "\n" @@ -972,7 +1001,8 @@ public void functioNamesExceptionsStrict() throws Exception { @Test @Alerts("false") public void ctorBooleanDocumentAll() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -1052,7 +1085,8 @@ public void javaNotAccessable() throws Exception { @Test @Alerts("Received: from worker - exception") public void javaNotAccessableFromWorker() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n"; final String workerJs = "var pi = 'from worker';\n" + "try {\n" + " pi = pi + ' - ' + java.lang.Math.PI\n" - + "} catch (e) { pi = pi + ' - ' + 'exception'; }\n" + + "} catch(e) { pi = pi + ' - ' + 'exception'; }\n" + "postMessage(pi);\n"; getMockWebConnection().setResponse(new URL(URL_FIRST, "worker.js"), workerJs, MimeType.TEXT_JAVASCRIPT); @@ -1081,7 +1115,8 @@ public void javaNotAccessableFromWorker() throws Exception { @Test @Alerts({"#0", "#1", "2"}) public void constInLoop() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; final WebDriver driver = loadPage2(html); - Thread.sleep(DEFAULT_WAIT_TIME); + Thread.sleep(DEFAULT_WAIT_TIME.toMillis()); verifyTitle2(driver, getExpectedAlerts()); } @@ -1182,7 +1220,8 @@ public void ensureOrder() throws Exception { @Test @Alerts({"false", "aa", "0", "aabbc", "false", "bb", "2", "aabbc", "true", "undefined"}) public void matchAll() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + + "" + ""; + + try { + loadPageVerifyTitle2(html); + } + catch (final WebDriverException e) { + assertTrue(e.getMessage(), e.getMessage().startsWith(getExpectedAlerts()[0])); + } + } + } diff --git a/src/test/java/org/htmlunit/javascript/JavaScriptEngineTest.java b/src/test/java/org/htmlunit/javascript/JavaScriptEngineTest.java index 5ea46cfc807..1345365963e 100644 --- a/src/test/java/org/htmlunit/javascript/JavaScriptEngineTest.java +++ b/src/test/java/org/htmlunit/javascript/JavaScriptEngineTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,8 +50,8 @@ import org.htmlunit.html.HtmlScript; import org.htmlunit.html.HtmlTextInput; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.Retry; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.Retry; import org.htmlunit.util.NameValuePair; import org.htmlunit.util.UrlUtils; import org.junit.Test; @@ -79,8 +79,8 @@ public class JavaScriptEngineTest extends SimpleWebTestCase { */ @Test public void setJavascriptEnabled_false() throws Exception { - final String html - = "foo\n" + "

hello world

\n" @@ -105,8 +105,8 @@ public void setJavascriptEnabled_false() throws Exception { */ @Test public void setInputValue() throws Exception { - final String content - = "foo\n" @@ -214,8 +215,8 @@ public void scopeInInactivePage() throws Exception { @Test @Alerts("got here") public void externalScript() throws Exception { - final String html - = "foo\n" + "\n" + "\n" @@ -276,8 +277,8 @@ public void externalScriptWithApostrophesInComment() throws Exception { @Test public void scriptErrorContainsPageUrl() throws Exception { // embedded script - final String content1 - = "\n" + final String content1 = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -292,8 +293,8 @@ public void scriptErrorContainsPageUrl() throws Exception { final WebClient client = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); - final String content2 - = "foo\n" + "\n" @@ -360,8 +361,8 @@ public void externalScriptEmptyGZipEncoded() throws Exception { bytes.toByteArray(), 200, "OK", "text/javascript", headers); } - final String htmlContent - = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "\n" @@ -388,8 +389,8 @@ public void externalScriptBrokenGZipEncoded() throws Exception { bytes.toByteArray(), 200, "OK", "text/javascript", headers); } - final String htmlContent - = "\n" + final String htmlContent = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" + "\n" @@ -412,8 +413,8 @@ public void referencingVariablesFromOneScriptToAnother_Regression() throws Excep final WebClient client = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + "\n" @@ -439,8 +440,8 @@ public void referencingVariablesFromOneScriptToAnother_Regression() throws Excep */ @Test public void javaScriptUrl() throws Exception { - final String htmlContent - = "\n" @@ -468,8 +469,8 @@ public void javaScriptUrl() throws Exception { */ @Test public void thisDotInOnClick() throws Exception { - final String htmlContent - = "First\n" + final String htmlContent = DOCTYPE_HTML + + "First\n" + "
\n" + ""; @@ -491,8 +492,8 @@ public void functionDefinedInExternalFile_CalledFromInlineScript() throws Except final WebClient client = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + " \n" + ""; @@ -529,8 +530,8 @@ public void externalScriptWithNewLineBeforeClosingScriptTag() throws Exception { final WebClient client = getWebClient(); final MockWebConnection webConnection = new MockWebConnection(); - final String htmlContent - = "foo\n" + final String htmlContent = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" // \n between opening and closing tag is important + ""; @@ -558,8 +559,8 @@ public void externalScriptWithNewLineBeforeClosingScriptTag() throws Exception { */ @Test public void functionDefinedInSameFile() throws Exception { - final String htmlContent - = "First\n" + "

hello world

\n" @@ -700,8 +702,8 @@ private static String getJavaScriptContent(final String javascript) { */ @Test public void scriptErrorIsolated() throws Exception { - final String content - = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -756,15 +758,15 @@ public void prototypeScope() throws Exception { } private void prototypeScope(final String name, final String value) throws Exception { - final String content1 - = "\n" + final String content1 = DOCTYPE_HTML + + "\n" + "\n" + ""; - final String content2 - = "\n" + final String content2 = DOCTYPE_HTML + + "\n" + ""; + final String content = DOCTYPE_HTML + ""; final MockWebConnection webConnection = new MockWebConnection(); webConnection.setDefaultResponse(content); client.setWebConnection(webConnection); @@ -883,22 +885,30 @@ public Object callFunction( return super.callFunction(page, javaScriptFunction, thisObject, args, htmlElementScope); } - /** @return the number of times that this engine has called functions */ + /** + * @return the number of times that this engine has called functions + */ public int getCallCount() { return scriptCallCount_; } - /** @return the number of times that this engine has executed code */ + /** + * @return the number of times that this engine has executed code + */ public int getExecutionCount() { return scriptExecutionCount_; } - /** @return the number of times that this engine has compiled code */ + /** + * @return the number of times that this engine has compiled code + */ public int getCompileCount() { return scriptCompileCount_; } - /** @return the number of times that this engine has executed a compiled script */ + /** + * @return the number of times that this engine has executed a compiled script + */ public int getExecuteScriptCount() { return scriptExecuteScriptCount_; } @@ -910,8 +920,8 @@ public int getExecuteScriptCount() { @Test @Alerts({"", "ex thrown"}) public void commentNoDoubleSlash() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -927,7 +937,7 @@ public void commentNoDoubleSlash() throws Exception { } catch (final ScriptException e) { exceptionThrown = "ex thrown"; - assertEquals(4, e.getFailingLineNumber()); + assertEquals(5, e.getFailingLineNumber()); } assertEquals(expectedExThrown, exceptionThrown); @@ -939,14 +949,14 @@ public void commentNoDoubleSlash() throws Exception { */ @Test public void compiledScriptCached() throws Exception { - final String content1 - = "foo\n" + final String content1 = DOCTYPE_HTML + + "foo\n" + "\n" + "\n" + "to page 2\n" + ""; - final String content2 - = "page 2\n" + final String content2 = DOCTYPE_HTML + + "page 2\n" + "\n" + "\n" + ""; @@ -988,8 +998,8 @@ public void compiledScriptCached() throws Exception { */ @Test public void scriptTags_AllLocalContent() throws Exception { - final String content - = "\n" + final String content = DOCTYPE_HTML + + "\n" + "foo\n" + "\n" // no language specified - assume JavaScript + "\n" @@ -1076,7 +1086,8 @@ protected void handleJavaScriptException(final ScriptException scriptException, }; webClient.setJavaScriptEngine(myEngine); - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "Test page<\n" + "\n" @@ -1169,7 +1181,51 @@ private static ThreadLocal> getPostponedActions(final Abst @Retry @Alerts("starting") public void shutdownShouldKill() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + + "Test page\n" + + "\n" + + "\n" + + "\n" + + ""; + + try (WebClient webClient = getWebClient()) { + // there is no way to kill a thread in later JDK's + // to make the test running we need a final timeout for js stuff + webClient.setJavaScriptTimeout(DEFAULT_WAIT_TIME.toMillis() * 10); + + final List collectedAlerts = new ArrayList<>(); + webClient.setAlertHandler(new CollectingAlertHandler(collectedAlerts)); + + loadPage(html); + Thread.sleep(100); + assertEquals(getExpectedAlerts(), collectedAlerts); + + } + Thread.sleep(400); + try { + assertTrue(getJavaScriptThreads().isEmpty()); + } + catch (final AssertionError e) { + Thread.sleep(DEFAULT_WAIT_TIME.toMillis() * 10); + assertTrue(getJavaScriptThreads().isEmpty()); + } + } + + /** + * @throws Exception if the test fails + */ + @Test + @Retry + @Alerts("starting") + public void shutdownShouldKillJavaScriptTimeout() throws Exception { + final String html = DOCTYPE_HTML + + "\n" + "Test page\n" + ""; + final String html = DOCTYPE_HTML + ""; getMockWebConnection().setDefaultResponse(html); webClient.getPage(URL_FIRST); assertEquals("org.htmlunit.corejs.javascript.EvaluatorException: " - + "Unexpected end of file (script in " + URL_FIRST + " from (1, 21) to (1, 37)#1)\n", + + "Unexpected end of file (script in " + URL_FIRST + " from (2, 21) to (2, 37)#2)\n", scriptExceptions.toString()); } } diff --git a/src/test/java/org/htmlunit/javascript/JavascriptErrorListenerTest.java b/src/test/java/org/htmlunit/javascript/JavascriptErrorListenerTest.java index 418621d0c04..ed7d5438300 100644 --- a/src/test/java/org/htmlunit/javascript/JavascriptErrorListenerTest.java +++ b/src/test/java/org/htmlunit/javascript/JavascriptErrorListenerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,11 +52,12 @@ public void nullJavaScriptErrorListener() throws Exception { webClient.getOptions().setThrowExceptionOnScriptError(false); webClient.setJavaScriptErrorListener(null); final MockWebConnection webConnection = new MockWebConnection(); - final String errorContent = "ERROR 500"; + final String errorContent = DOCTYPE_HTML + "ERROR 500"; webConnection.setResponse(URL_SECOND, errorContent, 500, "BOOM", MimeType.TEXT_HTML, Collections.emptyList()); // test script exception - String content = "Throw JavaScript Error\n" + String content = DOCTYPE_HTML + + "Throw JavaScript Error\n" + "\n" + ""; webConnection.setResponse(URL_FIRST, content); @@ -64,7 +65,8 @@ public void nullJavaScriptErrorListener() throws Exception { webClient.getPage(URL_FIRST); // test load script error - content = "Throw JavaScript Error\n" + content = DOCTYPE_HTML + + "Throw JavaScript Error\n" + "\n" + ""; webConnection.setResponse(URL_FIRST, content); @@ -77,7 +79,8 @@ public void nullJavaScriptErrorListener() throws Exception { } // test malformed script url error - content = "Throw JavaScript Error\n" + content = DOCTYPE_HTML + + "Throw JavaScript Error\n" + "\n" + ""; webConnection.setResponse(URL_FIRST, content); @@ -86,7 +89,8 @@ public void nullJavaScriptErrorListener() throws Exception { // test timeout error webClient.setJavaScriptTimeout(100); - content = "Throw JavaScript Timeout Error\n" + content = DOCTYPE_HTML + + "Throw JavaScript Timeout Error\n" + "\n" + ""; webConnection.setResponse(URL_FIRST, content); @@ -105,7 +109,8 @@ public void listenForScriptException() throws Exception { webClient.setJavaScriptErrorListener(javaScriptErrorListener); // test script exception - final String html = "Throw JavaScript Error" + final String html = DOCTYPE_HTML + + "Throw JavaScript Error" + "" + ""; loadPage(html); @@ -113,7 +118,7 @@ public void listenForScriptException() throws Exception { assertEquals("", javaScriptErrorListener.getWarnings()); assertEquals("org.htmlunit.ScriptException: " + "ReferenceError: \"unknown\" is not defined. " - + "(script in http://localhost:" + PORT + "/ from (1, 58) to (1, 81)#1)", + + "(script in http://localhost:" + PORT + "/ from (2, 58) to (2, 81)#2)", javaScriptErrorListener.getScriptExceptions()); assertEquals("", javaScriptErrorListener.getLoadScriptErrors()); assertEquals("", javaScriptErrorListener.getMalformedScriptURLErrors()); @@ -133,7 +138,8 @@ public void listenForLoadScriptError() throws Exception { getMockWebConnection().setDefaultResponse("", 500, "Server Error", MimeType.TEXT_HTML); - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -165,7 +171,8 @@ public void listenForMalformedScriptUrl() throws Exception { final CollectingJavaScriptErrorListener javaScriptErrorListener = new CollectingJavaScriptErrorListener(); webClient.setJavaScriptErrorListener(javaScriptErrorListener); - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "Throw JavaScript Error\n" + "\n" + "\n" @@ -195,7 +202,8 @@ public void listenForTimeoutError() throws Exception { webClient.setJavaScriptErrorListener(javaScriptErrorListener); webClient.setJavaScriptTimeout(100); - final String html = "Throw JavaScript Timeout Error\n" + final String html = DOCTYPE_HTML + + "Throw JavaScript Timeout Error\n" + "\n" + ""; diff --git a/src/test/java/org/htmlunit/javascript/NativeArrayTest.java b/src/test/java/org/htmlunit/javascript/NativeArrayTest.java index c0cb8879e67..192220112e0 100644 --- a/src/test/java/org/htmlunit/javascript/NativeArrayTest.java +++ b/src/test/java/org/htmlunit/javascript/NativeArrayTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; @@ -44,8 +44,8 @@ public class NativeArrayTest extends WebDriverTestCase { @HtmlUnitNYI(FF = {"5<>1", "2<>5", "2<>5", "2<>1", "1<>2", "1<>1", "9<>2", "9<>5"}, FF_ESR = {"5<>1", "2<>5", "2<>5", "2<>1", "1<>2", "1<>1", "9<>2", "9<>5"}) public void sortSteps() throws Exception { - final String html - = "\n" @@ -273,8 +274,8 @@ public void constructorToString() throws Exception { @Test @Alerts({"mandarin", "", "mandarin"}) public void shiftOneElement() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + + ""; + + loadPageVerifyTitle2(html); + } +} diff --git a/src/test/java/org/htmlunit/javascript/NativeDate2Test.java b/src/test/java/org/htmlunit/javascript/NativeDate2Test.java index fd0290b24db..ee50d3dc60a 100644 --- a/src/test/java/org/htmlunit/javascript/NativeDate2Test.java +++ b/src/test/java/org/htmlunit/javascript/NativeDate2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,9 +19,9 @@ import org.htmlunit.BrowserVersion; import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.BuggyWebDriver; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.BuggyWebDriver; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; @@ -33,108 +33,162 @@ @RunWith(BrowserRunner.class) public class NativeDate2Test extends WebDriverTestCase { + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T22:23:00.000Z") public void ctorDateTimeStringGMT() throws Exception { ctorDateTimeString("new Date('2021-12-18T22:23:00.000+00:00').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T22:23:00.000Z") public void ctorDateTimeStringGMT2() throws Exception { ctorDateTimeString("new Date('Sat, 18 Dec 2021 22:23:00 GMT').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T22:23:00.000Z") public void ctorDateTimeStringUTC() throws Exception { ctorDateTimeString("new Date('2021-12-18T22:23:00.000+00:00').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T22:23:00.000Z") public void ctorDateTimeStringUTC2() throws Exception { ctorDateTimeString("new Date('Sat, 18 Dec 2021 22:23:00 UTC').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T22:23:00.000Z") public void ctorDateTimeStringUT() throws Exception { ctorDateTimeString("new Date('Sat, 18 Dec 2021 22:23:00 UT').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T12:23:00.000Z") public void ctorDateTimeStringEST() throws Exception { ctorDateTimeString("new Date('2021-12-18T17:23:00.000+05:00').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T03:23:00.000Z") public void ctorDateTimeStringEST2() throws Exception { ctorDateTimeString("new Date('Sat, 18 Dec 2021 22:23:00 EST').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T02:23:00.000Z") public void ctorDateTimeStringEDT() throws Exception { ctorDateTimeString("new Date('Sat, 18 Dec 2021 22:23:00 EDT').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T04:23:00.000Z") public void ctorDateTimeStringCST() throws Exception { ctorDateTimeString("new Date('Sat, 18 Dec 2021 22:23:00 CST').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T03:23:00.000Z") public void ctorDateTimeStringCDT() throws Exception { ctorDateTimeString("new Date('Sat, 18 Dec 2021 22:23:00 CDT').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T05:23:00.000Z") public void ctorDateTimeStringMST() throws Exception { ctorDateTimeString("new Date('Sat, 18 Dec 2021 22:23:00 MST').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T04:23:00.000Z") public void ctorDateTimeStringMDT() throws Exception { ctorDateTimeString("new Date('Sat, 18 Dec 2021 22:23:00 MDT').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T06:23:00.000Z") public void ctorDateTimeStringPST() throws Exception { ctorDateTimeString("new Date('Sat, 18 Dec 2021 22:23:00 PST').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T05:23:00.000Z") public void ctorDateTimeStringPDT() throws Exception { ctorDateTimeString("new Date('Sat, 18 Dec 2021 22:23:00 PDT').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T18:23:00.000Z") public void ctorDateTimeStringBerlin() throws Exception { ctorDateTimeString("new Date('2021-12-18T17:23:00.000-01:00').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T02:23:00.000Z") public void ctorDateTimeStringTokyo() throws Exception { ctorDateTimeString("new Date('2021-12-18T17:23:00.000-09:00').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T02:23:00.000Z") public void ctorDateTimeStringJST() throws Exception { ctorDateTimeString("new Date('2021-12-18T17:23:00.000-09:00').toISOString()"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T12:23:00.000Z") public void ctorDateTimeStringNewYork() throws Exception { @@ -142,8 +196,8 @@ public void ctorDateTimeStringNewYork() throws Exception { } private void ctorDateTimeString(final String js) throws Exception { - final String html - = "\n" @@ -152,6 +206,9 @@ private void ctorDateTimeString(final String js) throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T22:23:00.000Z") @BuggyWebDriver(FF = "2021-12-18T21:23:00.000Z", @@ -160,6 +217,9 @@ public void ctorDateTimeGMT() throws Exception { ctorDateTime("GMT"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T22:23:00.000Z") @BuggyWebDriver(FF = "2021-12-18T21:23:00.000Z", @@ -168,6 +228,9 @@ public void ctorDateTimeUTC() throws Exception { ctorDateTime("UTC"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T03:23:00.000Z") @BuggyWebDriver(FF = "2021-12-18T21:23:00.000Z", @@ -176,12 +239,18 @@ public void ctorDateTimeEST() throws Exception { ctorDateTime("EST"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T21:23:00.000Z") public void ctorDateTimeBerlin() throws Exception { ctorDateTime("Europe/Berlin"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T13:23:00.000Z") @BuggyWebDriver(FF = "2021-12-18T21:23:00.000Z", @@ -190,6 +259,9 @@ public void ctorDateTimeTokyo() throws Exception { ctorDateTime("Asia/Tokyo"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T13:23:00.000Z") @BuggyWebDriver(FF = "2021-12-18T21:23:00.000Z", @@ -198,6 +270,9 @@ public void ctorDateTimeJST() throws Exception { ctorDateTime("JST"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-19T03:23:00.000Z") @BuggyWebDriver(FF = "2021-12-18T21:23:00.000Z", @@ -207,8 +282,8 @@ public void ctorDateTimeNewYork() throws Exception { } private void ctorDateTime(final String tz) throws Exception { - final String html - = "\n" @@ -228,42 +303,63 @@ private void ctorDateTime(final String tz) throws Exception { } } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T00:00:00.000Z") public void ctorDateGMT() throws Exception { ctorDate("GMT"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T00:00:00.000Z") public void ctorDateUTC() throws Exception { ctorDate("UTC"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T00:00:00.000Z") public void ctorDateEST() throws Exception { ctorDate("EST"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T00:00:00.000Z") public void ctorDateBerlin() throws Exception { ctorDate("Europe/Berlin"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T00:00:00.000Z") public void ctorDateNewYork() throws Exception { ctorDate("America/New_York"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T00:00:00.000Z") public void ctorDateTokyo() throws Exception { ctorDate("Asia/Tokyo"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021-12-18T00:00:00.000Z") public void ctorDateJST() throws Exception { @@ -271,8 +367,8 @@ public void ctorDateJST() throws Exception { } private void ctorDate(final String tz) throws Exception { - final String html - = "\n" @@ -292,11 +388,14 @@ private void ctorDate(final String tz) throws Exception { } } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2000-02-28T23:59:59.000Z") public void ctorInt() throws Exception { - final String html - = "\n" @@ -305,11 +404,14 @@ public void ctorInt() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2035-11-30T01:46:40.000Z") public void ctorDouble() throws Exception { - final String html - = "\n" @@ -318,6 +420,9 @@ public void ctorDouble() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("12/18/2021, 10:23:00 PM") @HtmlUnitNYI(CHROME = "12/18/21, 10:23 PM", @@ -328,6 +433,9 @@ public void toLocaleEnUs() throws Exception { toLocale("new Date('2021-12-18T22:23').toLocaleString('en-US')"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("12/18/2021") @HtmlUnitNYI(CHROME = "12/18/21", @@ -338,6 +446,9 @@ public void toLocaleEnUsDate() throws Exception { toLocale("new Date('2021-12-18T22:23').toLocaleDateString('en-US')"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("10:23:00 PM") @HtmlUnitNYI(CHROME = "10:23 PM", @@ -348,6 +459,9 @@ public void toLocaleEnUsTime() throws Exception { toLocale("new Date('2021-12-18T22:23').toLocaleTimeString('en-US')"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("18.12.2021, 22:23:00") @HtmlUnitNYI(CHROME = "18.12.21, 22:23", @@ -358,6 +472,9 @@ public void toLocaleDeDe() throws Exception { toLocale("new Date('2021-12-18T22:23').toLocaleString('de-DE')"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("18.12.2021") @HtmlUnitNYI(CHROME = "18.12.21", @@ -368,6 +485,9 @@ public void toLocaleDeDeDate() throws Exception { toLocale("new Date('2021-12-18T22:23').toLocaleDateString('de-DE')"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("22:23:00") @HtmlUnitNYI(CHROME = "22:23", @@ -378,6 +498,9 @@ public void toLocaleDeDeTime() throws Exception { toLocale("new Date('2021-12-18T22:23').toLocaleTimeString('de-DE')"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021/12/18 22:23:00") @HtmlUnitNYI(CHROME = "2021/12/18 22:23", @@ -388,12 +511,18 @@ public void toLocaleJaJp() throws Exception { toLocale("new Date('2021-12-18T22:23').toLocaleString('ja-JP')"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021/12/18") public void toLocaleJaJpDate() throws Exception { toLocale("new Date('2021-12-18T22:23').toLocaleDateString('ja-JP')"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("22:23:00") @HtmlUnitNYI(CHROME = "22:23", @@ -404,6 +533,9 @@ public void toLocaleJaJpTime() throws Exception { toLocale("new Date('2021-12-18T22:23').toLocaleTimeString('ja-JP')"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021/12/18 22:23:00") @HtmlUnitNYI(CHROME = "2021/12/18 22:23", @@ -414,12 +546,18 @@ public void toLocaleArray() throws Exception { toLocale("new Date('2021-12-18T22:23').toLocaleString(['foo', 'ja-JP', 'en-US'])"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("2021/12/18") public void toLocaleArrayDate() throws Exception { toLocale("new Date('2021-12-18T22:23').toLocaleDateString(['foo', 'ja-JP', 'en-US'])"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("22:23:00") @HtmlUnitNYI(CHROME = "22:23", @@ -431,8 +569,8 @@ public void toLocaleArrayTime() throws Exception { } private void toLocale(final String js) throws Exception { - final String html - = "\n" @@ -452,36 +590,54 @@ private void toLocale(final String js) throws Exception { } } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat Dec 18 2021") public void toDateStringGMT() throws Exception { toDateString("GMT"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat Dec 18 2021") public void toDateStringUTC() throws Exception { toDateString("UTC"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat Dec 18 2021") public void toDateStringEST() throws Exception { toDateString("EST"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat Dec 18 2021") public void toDateStringBerlin() throws Exception { toDateString("Europe/Berlin"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat Dec 18 2021") public void toDateStringNewYork() throws Exception { toDateString("America/New_York"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sun Dec 19 2021") @BuggyWebDriver(FF = "Sat Dec 18 2021", @@ -490,6 +646,9 @@ public void toDateStringTokyo() throws Exception { toDateString("Asia/Tokyo"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sun Dec 19 2021") @BuggyWebDriver(FF = "Sat Dec 18 2021", @@ -499,8 +658,8 @@ public void toDateStringJST() throws Exception { } private void toDateString(final String tz) throws Exception { - final String html - = "\n" @@ -520,6 +679,9 @@ private void toDateString(final String tz) throws Exception { } } + /** + * @throws Exception if the test fails + */ @Test @Alerts("22:23:00 GMT+0000 (Greenwich Mean Time)") @BuggyWebDriver(FF = "23:23:00 GMT+0100 (Central European Standard Time)", @@ -532,6 +694,9 @@ public void toTimeStringGMT() throws Exception { toTimeString("GMT"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("22:23:00 GMT+0000 (Coordinated Universal Time)") @BuggyWebDriver(FF = "23:23:00 GMT+0100 (Central European Standard Time)", @@ -544,8 +709,11 @@ public void toTimeStringUTC() throws Exception { toTimeString("UTC"); } + /** + * @throws Exception if the test fails + */ @Test - @Alerts("17:23:00 GMT-0500 (GMT-05:00)") + @Alerts("17:23:00 GMT-0500 (Eastern Standard Time)") @BuggyWebDriver(FF = "23:23:00 GMT+0100 (Central European Standard Time)", FF_ESR = "23:23:00 GMT+0100 (Central European Standard Time)") @HtmlUnitNYI(CHROME = "17:23:00 GMT-0500 (-05:00)", @@ -556,6 +724,9 @@ public void toTimeStringEST() throws Exception { toTimeString("EST"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("23:23:00 GMT+0100 (Central European Standard Time)") @HtmlUnitNYI(CHROME = "23:23:00 GMT+0100 (CET)", @@ -566,6 +737,9 @@ public void toTimeStringBerlin() throws Exception { toTimeString("Europe/Berlin"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("17:23:00 GMT-0500 (Eastern Standard Time)") @BuggyWebDriver(FF = "23:23:00 GMT+0100 (Central European Standard Time)", @@ -578,6 +752,9 @@ public void toTimeStringNewYork() throws Exception { toTimeString("America/New_York"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("07:23:00 GMT+0900 (Japan Standard Time)") @BuggyWebDriver(FF = "23:23:00 GMT+0100 (Central European Standard Time)", @@ -590,6 +767,9 @@ public void toTimeStringTokyo() throws Exception { toTimeString("Asia/Tokyo"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("07:23:00 GMT+0900 (Japan Standard Time)") @BuggyWebDriver(FF = "23:23:00 GMT+0100 (Central European Standard Time)", @@ -603,8 +783,8 @@ public void toTimeStringJST() throws Exception { } private void toTimeString(final String tz) throws Exception { - final String html - = "\n" @@ -624,42 +804,63 @@ private void toTimeString(final String tz) throws Exception { } } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat, 18 Dec 2021 22:23:00 GMT") public void toUTCStringGMT() throws Exception { toUTCString("GMT"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat, 18 Dec 2021 22:23:00 GMT") public void toUTCStringUTC() throws Exception { toUTCString("UTC"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat, 18 Dec 2021 22:23:00 GMT") public void toUTCStringEST() throws Exception { toUTCString("EST"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat, 18 Dec 2021 22:23:00 GMT") public void toUTCStringBerlin() throws Exception { toUTCString("Europe/Berlin"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat, 18 Dec 2021 22:23:00 GMT") public void toUTCStringNewYork() throws Exception { toUTCString("America/New_York"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat, 18 Dec 2021 22:23:00 GMT") public void toUTCStringTokyo() throws Exception { toUTCString("Asia/Tokyo"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("Sat, 18 Dec 2021 22:23:00 GMT") public void toUTCStringJST() throws Exception { @@ -667,8 +868,8 @@ public void toUTCStringJST() throws Exception { } private void toUTCString(final String tz) throws Exception { - final String html - = "\n" @@ -688,6 +889,9 @@ private void toUTCString(final String tz) throws Exception { } } + /** + * @throws Exception if the test fails + */ @Test @Alerts("0") @BuggyWebDriver(FF = "-60", @@ -696,6 +900,9 @@ public void timezoneOffsetGMT() throws Exception { timezoneOffset("GMT"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("0") @BuggyWebDriver(FF = "-60", @@ -704,6 +911,9 @@ public void timezoneOffsetUTC() throws Exception { timezoneOffset("UTC"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("300") @BuggyWebDriver(FF = "-60", @@ -712,12 +922,18 @@ public void timezoneOffsetEST() throws Exception { timezoneOffset("EST"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("-60") public void timezoneOffsetBerlin() throws Exception { timezoneOffset("Europe/Berlin"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("300") @BuggyWebDriver(FF = "-60", @@ -726,6 +942,9 @@ public void timezoneOffsetNewYork() throws Exception { timezoneOffset("America/New_York"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("-540") @BuggyWebDriver(FF = "-60", @@ -734,6 +953,9 @@ public void timezoneOffsetTokyo() throws Exception { timezoneOffset("Asia/Tokyo"); } + /** + * @throws Exception if the test fails + */ @Test @Alerts("-540") @BuggyWebDriver(FF = "-60", @@ -743,8 +965,8 @@ public void timezoneOffsetJST() throws Exception { } private void timezoneOffset(final String tz) throws Exception { - final String html - = "\n" diff --git a/src/test/java/org/htmlunit/javascript/NativeDateTest.java b/src/test/java/org/htmlunit/javascript/NativeDateTest.java index cab218760c9..375ac3c171b 100644 --- a/src/test/java/org/htmlunit/javascript/NativeDateTest.java +++ b/src/test/java/org/htmlunit/javascript/NativeDateTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -40,8 +40,8 @@ public class NativeDateTest extends WebDriverTestCase { @Test @Alerts({"-13", "84", "109"}) public void getYear() throws Exception { - final String html - = "\n" + ""; @@ -420,7 +429,8 @@ public void commaOperatorFunctionTry() throws Exception { @Test @Alerts("my y var") public void commaOperatorFunctionCall() throws Exception { - final String html = "\n" + "\n" @@ -500,7 +512,8 @@ public void callWithNullContext() throws Exception { @Test @Alerts("a=[object Window]") public void callWithUndefinedContext() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -526,7 +539,8 @@ public void callWithUndefinedContext() throws Exception { @Test @Alerts({"configurable: true", "enumerable: false", "writable: false"}) public void functionLength() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/javascript/NativeMapTest.java b/src/test/java/org/htmlunit/javascript/NativeMapTest.java index 8685d2e8455..50fbe6e9392 100644 --- a/src/test/java/org/htmlunit/javascript/NativeMapTest.java +++ b/src/test/java/org/htmlunit/javascript/NativeMapTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -35,8 +35,8 @@ public class NativeMapTest extends WebDriverTestCase { @Test @Alerts({"key type string", "value type object"}) public void entries() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" @@ -262,7 +263,8 @@ public void toStringRhinoBug538172() throws Exception { @Test @Alerts("12,345") public void toLocaleString() throws Exception { - final String html = "\n" @@ -276,7 +278,8 @@ public void toLocaleString() throws Exception { @Test @Alerts("12.345") public void toLocaleStringDe() throws Exception { - final String html = "\n" @@ -290,7 +293,8 @@ public void toLocaleStringDe() throws Exception { @Test @Alerts("12,345") public void toLocaleStringEnUS() throws Exception { - final String html = "\n" @@ -304,7 +308,8 @@ public void toLocaleStringEnUS() throws Exception { @Test @Alerts("12,345") public void toLocaleStringNoParam() throws Exception { - final String html = "\n" + ""; loadPageVerifyTitle2(html); diff --git a/src/test/java/org/htmlunit/javascript/NativeObjectTest.java b/src/test/java/org/htmlunit/javascript/NativeObjectTest.java index 412865af91d..281d9b5d5cb 100644 --- a/src/test/java/org/htmlunit/javascript/NativeObjectTest.java +++ b/src/test/java/org/htmlunit/javascript/NativeObjectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; @@ -75,8 +75,8 @@ public void others() throws Exception { @Test @Alerts("1") public void assign() throws Exception { - final String html - = "\n" + "\n" @@ -254,14 +254,14 @@ public void getPrototypeOfString() throws Exception { @Test @Alerts("true") public void getPrototypeOfNumber() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -277,14 +277,14 @@ public void getPrototypeOfNumber() throws Exception { @Test @Alerts("true") public void getPrototypeOfBoolean() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -300,14 +300,14 @@ public void getPrototypeOfBoolean() throws Exception { @Test @Alerts("object") public void getTypeOfPrototypeOfNumber() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -323,7 +323,7 @@ public void getTypeOfPrototypeOfNumber() throws Exception { @Test @Alerts({"2", "true", "true"}) public void getOwnPropertySymbols() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -354,9 +354,9 @@ public void getOwnPropertySymbols() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("TypeError") public void getOwnPropertySymbolsEmpty() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -383,7 +383,7 @@ public void getOwnPropertySymbolsEmpty() throws Exception { FF = {"[object HTMLInputElement]", "[object HTMLInputElement]", "[object Object]", "function"}, FF_ESR = {"[object HTMLInputElement]", "[object HTMLInputElement]", "[object Object]", "function"}) public void getOwnPropertyDescriptor() throws Exception { - final String html = "" + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -428,7 +428,8 @@ public void getOwnPropertyDescriptor() throws Exception { "x.get = function value() { [native code] }", "x.get.call = function call() { [native code] }"}) public void getOwnPropertyDescriptorGetCall() throws Exception { - final String html = "\n" + "\n" @@ -200,7 +213,8 @@ public void ctorChangeableHasNoEffectForTypeOf() throws Exception { @Test @Alerts({"true", "false", "true", "ctor", "true"}) public void ctorChangeableHasNoEffectForTypeOfStrict() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -231,7 +245,8 @@ public void ctorChangeableHasNoEffectForTypeOfStrict() throws Exception { @Test @Alerts("true") public void ctorChangeableHasNoEffectForSealed() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/javascript/ThreadTest.java b/src/test/java/org/htmlunit/javascript/ThreadTest.java index 4a9404ea558..b8356417462 100644 --- a/src/test/java/org/htmlunit/javascript/ThreadTest.java +++ b/src/test/java/org/htmlunit/javascript/ThreadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -95,7 +95,9 @@ private static class TestThread extends Thread { super(name); } - /** @see Thread#run() */ + /** + * @see Thread#run() + */ @Override public void run() { try { @@ -109,7 +111,9 @@ public void run() { } } - /** @return true if the test was successful */ + /** + * @return true if the test was successful + */ public boolean isSuccessful() { return successful_; } @@ -119,8 +123,8 @@ public boolean isSuccessful() { * @throws Exception if the test failed */ public void testCallInheritedFunction() throws Exception { - final String html - = "foo\n" + ""; - final String thirdContent = "Third"; + final String thirdContent = DOCTYPE_HTML + + "Third"; final MockWebConnection webConnection = getMockWebConnection(); webConnection.setResponse(URL_SECOND, secondContent); @@ -179,7 +184,8 @@ public void navigationStopThreadsInChildWindows() throws Exception { */ @Test public void interruptAllWithRecursiveSetTimeout() throws Exception { - final String content = "\n" + final String content = DOCTYPE_HTML + + "\n" + "\n" + " test\n" + " "); + conn.setResponse(URL_FIRST, + DOCTYPE_HTML + ""); client.setWebConnection(conn); client.getPage(URL_FIRST); diff --git a/src/test/java/org/htmlunit/javascript/configuration/ClassConfigurationTest.java b/src/test/java/org/htmlunit/javascript/configuration/ClassConfigurationTest.java index 89db9de2330..84bf164bc4c 100644 --- a/src/test/java/org/htmlunit/javascript/configuration/ClassConfigurationTest.java +++ b/src/test/java/org/htmlunit/javascript/configuration/ClassConfigurationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,9 @@ */ package org.htmlunit.javascript.configuration; -import org.htmlunit.SimpleWebTestCase; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + import org.htmlunit.javascript.HtmlUnitScriptable; import org.junit.Test; @@ -23,8 +25,9 @@ * * @author Chris Erskine * @author Ahmed Ashour + * @author Ronald Brill */ -public class ClassConfigurationTest extends SimpleWebTestCase { +public class ClassConfigurationTest { /** * @throws Exception on error diff --git a/src/test/java/org/htmlunit/javascript/configuration/JavaScriptConfigurationTest.java b/src/test/java/org/htmlunit/javascript/configuration/JavaScriptConfigurationTest.java index 2fb1fd227ec..b850319d92b 100644 --- a/src/test/java/org/htmlunit/javascript/configuration/JavaScriptConfigurationTest.java +++ b/src/test/java/org/htmlunit/javascript/configuration/JavaScriptConfigurationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ package org.htmlunit.javascript.configuration; import static org.htmlunit.BrowserVersion.FIREFOX; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.File; @@ -24,7 +26,9 @@ import java.net.URL; import java.text.MessageFormat; import java.util.ArrayList; +import java.util.Collections; import java.util.Enumeration; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -36,10 +40,11 @@ import org.apache.commons.text.RandomStringGenerator; import org.htmlunit.BrowserVersion; import org.htmlunit.MockWebConnection; -import org.htmlunit.SimpleWebTestCase; import org.htmlunit.WebClient; +import org.htmlunit.WebTestCase; import org.htmlunit.javascript.HtmlUnitScriptable; import org.htmlunit.javascript.JavaScriptEngine; +import org.junit.Assert; import org.junit.Test; /** @@ -51,7 +56,7 @@ * @author Frank Danek * @author Joerg Werner */ -public class JavaScriptConfigurationTest extends SimpleWebTestCase { +public class JavaScriptConfigurationTest { private static final Log LOG = LogFactory.getLog(JavaScriptConfigurationTest.class); @@ -260,19 +265,58 @@ public void obsoleteJsxClasses() { } /** - * Test of alphabetical order. + * Test of order. */ @Test - public void lexicographicOrder() { - String lastClassName = null; + public void treeOrder() { + final List defined = new ArrayList<>(JavaScriptConfiguration.CLASSES_.length); + + final HashMap> levels = new HashMap<>(); for (final Class c : JavaScriptConfiguration.CLASSES_) { - final String name = c.getSimpleName(); - if (lastClassName != null && name.compareToIgnoreCase(lastClassName) < 0) { - fail("JavaScriptConfiguration.CLASSES_: '" - + name + "' should be before '" + lastClassName + "'"); + defined.add(c.getSimpleName()); + + int level = 1; + Class parent = c.getSuperclass(); + while (parent != HtmlUnitScriptable.class) { + level++; + parent = parent.getSuperclass(); + } + + List clsAtLevel = levels.get(level); + if (clsAtLevel == null) { + clsAtLevel = new ArrayList<>(); + levels.put(level, clsAtLevel); + } + clsAtLevel.add(c.getSimpleName()); + } + + final List all = new ArrayList<>(JavaScriptConfiguration.CLASSES_.length); + for (int level = 1; level <= levels.size(); level++) { + final List clsAtLevel = levels.get(level); + Collections.sort(clsAtLevel); + all.addAll(clsAtLevel); + + // dump + /* + final String indent = " "; + System.out.println(indent + " // level " + level); + + System.out.print(indent); + int chars = indent.length(); + for (final String cls : clsAtLevel) { + final String toPrint = " " + cls + ".class,"; + chars += toPrint.length(); + if (chars > 120) { + System.out.println(); + System.out.print(indent); + chars = indent.length() + toPrint.length(); + } + System.out.print(toPrint); } - lastClassName = name; + System.out.println(); + */ } + Assert.assertEquals(all, defined); } /** @@ -317,7 +361,8 @@ public void clonedAndModified() throws Exception { private static void test(final BrowserVersion browserVersion) throws IOException { try (WebClient webClient = new WebClient(browserVersion)) { final MockWebConnection conn = new MockWebConnection(); - conn.setDefaultResponse(""); + conn.setDefaultResponse(WebTestCase.DOCTYPE_HTML + + ""); webClient.setWebConnection(conn); webClient.getPage("http://localhost/"); diff --git a/src/test/java/org/htmlunit/javascript/configuration/WorkerJavaScriptConfigurationTest.java b/src/test/java/org/htmlunit/javascript/configuration/WorkerJavaScriptConfigurationTest.java new file mode 100644 index 00000000000..72c35f0a5e9 --- /dev/null +++ b/src/test/java/org/htmlunit/javascript/configuration/WorkerJavaScriptConfigurationTest.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2002-2025 Gargoyle Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.htmlunit.javascript.configuration; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; + +import org.htmlunit.javascript.HtmlUnitScriptable; +import org.junit.Assert; +import org.junit.Test; + +/** + * Tests for {@link WorkerJavaScriptConfiguration}. + * + * @author Ronald Brill + */ +public class WorkerJavaScriptConfigurationTest { + + + /** + * Test of order. + */ + @Test + public void treeOrder() { + final List defined = new ArrayList<>(WorkerJavaScriptConfiguration.CLASSES_.length); + + final HashMap> levels = new HashMap<>(); + for (final Class c : WorkerJavaScriptConfiguration.CLASSES_) { + defined.add(c.getSimpleName()); + + int level = 1; + Class parent = c.getSuperclass(); + while (parent != HtmlUnitScriptable.class) { + level++; + parent = parent.getSuperclass(); + } + + List clsAtLevel = levels.get(level); + if (clsAtLevel == null) { + clsAtLevel = new ArrayList<>(); + levels.put(level, clsAtLevel); + } + clsAtLevel.add(c.getSimpleName()); + } + + final List all = new ArrayList<>(WorkerJavaScriptConfiguration.CLASSES_.length); + for (int level = 1; level <= levels.size(); level++) { + final List clsAtLevel = levels.get(level); + Collections.sort(clsAtLevel); + all.addAll(clsAtLevel); + + // dump + /* + final String indent = " "; + System.out.println(indent + " // level " + level); + + System.out.print(indent); + int chars = indent.length(); + for (final String cls : clsAtLevel) { + final String toPrint = " " + cls + ".class,"; + chars += toPrint.length(); + if (chars > 120) { + System.out.println(); + System.out.print(indent); + chars = indent.length() + toPrint.length(); + } + System.out.print(toPrint); + } + System.out.println(); + */ + } + Assert.assertEquals(all, defined); + } +} diff --git a/src/test/java/org/htmlunit/javascript/host/ActiveXObject2Test.java b/src/test/java/org/htmlunit/javascript/host/ActiveXObject2Test.java index b27f64e4824..dd0a5f600a1 100644 --- a/src/test/java/org/htmlunit/javascript/host/ActiveXObject2Test.java +++ b/src/test/java/org/htmlunit/javascript/host/ActiveXObject2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -37,7 +37,8 @@ public class ActiveXObject2Test extends WebDriverTestCase { @Test @Alerts({"undefined", "undefined", "NaN", "false", "No", "No", "No", "No"}) public void browserDetection() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -87,7 +89,8 @@ public void xmlDocument() throws Exception { @Test @Alerts("ActiveXObject undefined") public void activex() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + ""; diff --git a/src/test/java/org/htmlunit/javascript/host/ApplicationCacheTest.java b/src/test/java/org/htmlunit/javascript/host/ApplicationCacheTest.java index d0cc99d39d2..9023c1f9992 100644 --- a/src/test/java/org/htmlunit/javascript/host/ApplicationCacheTest.java +++ b/src/test/java/org/htmlunit/javascript/host/ApplicationCacheTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,8 @@ package org.htmlunit.javascript.host; import org.htmlunit.WebDriverTestCase; -import org.htmlunit.html.HtmlPageTest; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -37,7 +36,7 @@ public class ApplicationCacheTest extends WebDriverTestCase { @Test @Alerts("undefined") public void scriptableToString() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + " \n" @@ -69,10 +69,10 @@ public void elementAttributes() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("TypeError") public void positionAndSizeAttributes() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" + "
daniel
\n" @@ -85,7 +85,7 @@ public void positionAndSizeAttributes() throws Exception { + " log(box.x + '-' + box.y);\n" + " log(box.screenX + '-' + box.screenY);\n" + " log(box.width + '-' + box.height);\n" - + " } catch (e) {log('exception')}\n" + + " } catch(e) { logEx(e) }\n" + " }\n" + " \n" + " \n" diff --git a/src/test/java/org/htmlunit/javascript/host/Console2Test.java b/src/test/java/org/htmlunit/javascript/host/Console2Test.java index d47e9e36eb3..236f9ee0cd7 100644 --- a/src/test/java/org/htmlunit/javascript/host/Console2Test.java +++ b/src/test/java/org/htmlunit/javascript/host/Console2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import org.htmlunit.WebConsole; import org.htmlunit.WebConsole.Logger; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.htmlunit.util.MimeType; import org.junit.Test; import org.junit.runner.RunWith; @@ -95,7 +95,7 @@ public boolean isErrorEnabled() { * @throws Exception if the test fails */ @Test - @Alerts("info: [\"one\",\"two\",\"three\",\"[object HTMLCollection]\"]") + @Alerts("info: [\"one\",\"two\",\"three\",{}]") public void log() throws Exception { log("['one', 'two', 'three', document.body.children]"); } @@ -179,8 +179,8 @@ private void log(final String logInput) throws Exception { final List messages = new ArrayList<>(); console.setLogger(new LoggerMock(messages)); - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n"; loadPage(html); diff --git a/src/test/java/org/htmlunit/javascript/host/ConsoleTest.java b/src/test/java/org/htmlunit/javascript/host/ConsoleTest.java index d6d1bfd19f1..d28885360bf 100644 --- a/src/test/java/org/htmlunit/javascript/host/ConsoleTest.java +++ b/src/test/java/org/htmlunit/javascript/host/ConsoleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.BuggyWebDriver; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.BuggyWebDriver; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.WebDriver; @@ -44,8 +44,8 @@ public class ConsoleTest extends WebDriverTestCase { @Test @Alerts({"false", "object", "true"}) public void prototype() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + ""; @@ -66,8 +66,8 @@ public void prototype() throws Exception { @Test @Alerts({"true", "undefined", "false"}) public void prototypeUppercase() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + ""; @@ -88,8 +88,8 @@ public void prototypeUppercase() throws Exception { @Test @Alerts({}) public void timeStamp() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + ""; @@ -153,8 +153,8 @@ public void windowProperty() throws Exception { @Test @Alerts("success") public void fromWindow() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + ""; @@ -175,8 +175,8 @@ public void fromWindow() throws Exception { @Test @BuggyWebDriver public void simpleString() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -91,8 +91,8 @@ public void itemOutside() throws Exception { @Test @Alerts({"[object DOMRectList]", "1", "undefined", "undefined"}) public void indexOutside() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -123,8 +123,8 @@ public void indexOutside() throws Exception { @Test @Alerts({"[object DOMRectList]", "0", "undefined", "undefined"}) public void empty() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/javascript/host/ClientRectTest.java b/src/test/java/org/htmlunit/javascript/host/DOMRectTest.java similarity index 88% rename from src/test/java/org/htmlunit/javascript/host/ClientRectTest.java rename to src/test/java/org/htmlunit/javascript/host/DOMRectTest.java index 1f5ae385754..ce1486e6a01 100644 --- a/src/test/java/org/htmlunit/javascript/host/ClientRectTest.java +++ b/src/test/java/org/htmlunit/javascript/host/DOMRectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,17 +16,17 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; /** - * Tests for {@link ClientRect}. + * Tests for {@link DOMRect}. * * @author Ahmed Ashour */ @RunWith(BrowserRunner.class) -public class ClientRectTest extends WebDriverTestCase { +public class DOMRectTest extends WebDriverTestCase { /** * @throws Exception if the test fails @@ -34,7 +34,8 @@ public class ClientRectTest extends WebDriverTestCase { @Test @Alerts({"100", "400", "100", "450", "50", "0"}) public void properties() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "
\n" @@ -62,7 +63,8 @@ public void properties() throws Exception { @Test @Alerts({"true", "true"}) public void getBoundingClientRect_WidthPercent() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" @@ -115,7 +116,8 @@ public void selectNodes() throws Exception { @Test @Alerts({"2", "1"}) public void removeChild() throws Exception { - final String html = "\n" @@ -217,7 +221,8 @@ public void selectNode_root() throws Exception { @Test @Alerts({"1", "1"}) public void getElementsByTagNameNS() throws Exception { - final String html = "\n" @@ -248,7 +253,8 @@ public void getElementsByTagNameNS() throws Exception { @Test @Alerts({"1", "2", "3"}) public void getElementsByTagNameNSAsterisk() throws Exception { - final String html = "\n" @@ -280,7 +286,8 @@ public void getElementsByTagNameNSAsterisk() throws Exception { @Test @Alerts({"2", "Three", "Four", "1", "Two", "0", "0"}) public void getElementsByTagNameXml() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + ""; loadPageVerifyTitle2(html); @@ -325,7 +332,8 @@ public void getElementsByTagNameXml() throws Exception { @Test @Alerts("false") public void hasAttribute() throws Exception { - final String html = "\n" + "\n" @@ -755,7 +764,8 @@ public void enumeratedProperties() throws Exception { @Test @Alerts("finished") public void removeAttribute() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " "; loadPageVerifyTitle2(html); } @@ -805,7 +816,8 @@ public void getBoundingClientRect() throws Exception { @Test @Alerts("0") public void commentIsElement() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "
\n" + "\n" @@ -983,7 +998,8 @@ public void children() throws Exception { @Test @Alerts({"", "a b c"}) public void classList() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" @@ -1200,7 +1221,7 @@ public void prototypConstructor() throws Exception { @Alerts({"function Element() { [native code] }", "[object Element]", "function Element() { [native code] }"}) public void prototypConstructorStandards() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" @@ -1386,7 +1407,7 @@ public void matchesInvalidSelector() throws Exception { @Test @Alerts({"TypeError", "done"}) public void matchesWindow() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" @@ -1419,7 +1440,7 @@ public void matchesWindow() throws Exception { @Test @Alerts({"div-02", "div-03", "div-01", "article-01", "null"}) public void closest() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" @@ -375,7 +381,8 @@ public void pushStateLocationHref() throws Exception { "[object PopStateEvent]", "{\"hi2\":\"there2\"}", "[object PopStateEvent]", "{\"hi2\":\"there2\"}"}) public void replaceState() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -196,7 +197,8 @@ public void about_blank_query_attributes() throws Exception { @Test @Alerts({"", "about:blank?", "blank", "", "about:", ""}) public void about_blank_emptyquery_attributes() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" @@ -228,7 +230,8 @@ public void about_blank_emptyquery_attributes() throws Exception { @Test @Alerts({"#hash", "about:blank#hash", "blank", "", "about:", ""}) public void about_blank_hash_attributes() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" @@ -261,7 +264,8 @@ public void about_blank_hash_attributes() throws Exception { @Test @Alerts({"#hash", "about:blank?#hash", "blank", "", "about:", ""}) public void about_blank_emptyquery_hash_attributes() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" @@ -295,7 +299,8 @@ public void about_blank_emptyquery_hash_attributes() throws Exception { FF = {"#hash", "about:blank?query#hash", "blank", "", "about:", ""}, FF_ESR = {"#hash", "about:blank?query#hash", "blank", "", "about:", ""}) public void about_blank_query_hash_attributes() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" @@ -327,7 +332,8 @@ public void about_blank_query_hash_attributes() throws Exception { @Test @Alerts({"", "about:blank", "#foo", "about:blank#foo"}) public void about_blank_set_hash() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" @@ -381,7 +387,8 @@ public void noSearch() throws Exception { } private void checkSearch(final String url) throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; + final String html = DOCTYPE_HTML + + ""; loadPage2(html); } @@ -554,15 +569,16 @@ public void setHrefWithOnlyHash2() throws Exception { */ @Test public void replace() throws Exception { - final String html - = "First\n" + ""; - final String secondContent = "Second"; + final String secondContent = DOCTYPE_HTML + + "Second"; getMockWebConnection().setResponse(URL_SECOND, secondContent); final WebDriver driver = loadPage2(html); @@ -576,17 +592,19 @@ public void replace() throws Exception { */ @Test public void replaceLastInHistory() throws Exception { - final String startContent = "First Page"; + final String startContent = DOCTYPE_HTML + + "First Page"; - final String secondContent - = "Second Page\n" + ""; - final String thirdContent = "Third Page§"; + final String thirdContent = DOCTYPE_HTML + + "Third Page§"; getMockWebConnection().setResponse(URL_SECOND, secondContent); getMockWebConnection().setResponse(URL_THIRD, thirdContent); @@ -608,8 +626,8 @@ public void replaceLastInHistory() throws Exception { @Test @Alerts("on-load") public void replaceOnload() throws Exception { - final String html - = "First\n" + final String html = DOCTYPE_HTML + + "First\n" + "\n" + ""; - final String secondContent = "Second Page"; + final String secondContent = DOCTYPE_HTML + + "Second Page"; getMockWebConnection().setResponse(URL_SECOND, secondContent); @@ -658,15 +678,16 @@ public void replaceFirstInHistory() throws Exception { */ @Test public void assign() throws Exception { - final String firstContent - = "First\n" + ""; - final String secondContent = "Second"; + final String secondContent = DOCTYPE_HTML + + "Second"; getMockWebConnection().setResponse(URL_SECOND, secondContent); @@ -680,8 +701,8 @@ public void assign() throws Exception { @Test @Alerts("on-load") public void assignOnload() throws Exception { - final String firstContent - = "First\n" + ""; - final String secondContent = "Second"; + final String secondContent = DOCTYPE_HTML + + "Second"; getMockWebConnection().setResponse(URL_SECOND, secondContent); @@ -729,8 +752,8 @@ public void assingByEquals() throws Exception { @Test @Alerts("on-load") public void assingByEqualsOnload() throws Exception { - final String firstContent - = "First\n" @@ -775,8 +799,8 @@ public void changeLocationToNonHtml() throws Exception { @Test @Alerts("foo") public void jsLocation() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " "; + final String secondHtml = DOCTYPE_HTML + + ""; getMockWebConnection().setResponse(URL_SECOND, secondHtml); @@ -839,8 +865,8 @@ public void href_postponed() throws Exception { @Test @Alerts({"", "foo3.html", "foo2.html"}) public void onlick_set_location_WithHref() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " click me\n" + ""; @@ -861,8 +887,8 @@ public void onlick_set_location_WithHref() throws Exception { @Test @Alerts({"", "foo3.html"}) public void onlick_set_location_WithoutHref() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " click me\n" + ""; @@ -881,8 +907,8 @@ public void onlick_set_location_WithoutHref() throws Exception { @Test @Alerts({"supported", "onhashchange §§URL§§#1 §§URL§§"}) public void onHashChange() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -987,18 +1015,19 @@ public void locationAfterOpenClosePopup() throws Exception { + " \n" + "\n" + ""; - final String popup = - "\n" + final String popup = DOCTYPE_HTML + + "\n" + "\n" + " popup with script\n" + " \n" + "\n" + "Popup\n" + ""; - final String target = - "\n" + final String target = DOCTYPE_HTML + + "\n" + "\n" + " target\n" + "\n" @@ -1011,13 +1040,9 @@ public void locationAfterOpenClosePopup() throws Exception { expandExpectedAlertsVariables(URL_FIRST); final WebDriver driver = loadPage2(html); driver.findElement(By.id("click")).click(); - try { - assertEquals(getExpectedAlerts()[0], driver.getCurrentUrl()); - } - finally { - releaseResources(); - shutDownAll(); - } + + verifySessionStorage2(driver, getExpectedAlerts()[0], getExpectedAlerts()[1], getExpectedAlerts()[2]); + assertEquals(getExpectedAlerts()[3], driver.getCurrentUrl()); } /** @@ -1026,13 +1051,15 @@ public void locationAfterOpenClosePopup() throws Exception { @Test @Alerts("§§URL§§") public void refererHeaderWhenSettingLocation() throws Exception { - final String html = "Base\n" + final String html = DOCTYPE_HTML + + "Base\n" + "\n" + " Link\n" + " jsLink\n" + ""; - final String content = "Content

content

"; + final String content = DOCTYPE_HTML + + "Content

content

"; final MockWebConnection conn = getMockWebConnection(); conn.setResponse(new URL(URL_FIRST, "content.html"), content); @@ -1045,7 +1072,7 @@ public void refererHeaderWhenSettingLocation() throws Exception { // click an anchor with href and target driver.findElement(By.id("link")).click(); // because real browsers are doing the open async, we have to be a bit patient - Thread.sleep(DEFAULT_WAIT_TIME); + Thread.sleep(DEFAULT_WAIT_TIME.toMillis()); assertEquals(2, conn.getRequestCount()); Map lastAdditionalHeaders = conn.getLastAdditionalHeaders(); @@ -1066,21 +1093,25 @@ public void refererHeaderWhenSettingLocation() throws Exception { @Test @Alerts("§§URL§§menu.html") public void refererHeaderWhenSettingFrameLocation() throws Exception { - final String html = "Frameset\n" + final String html = DOCTYPE_HTML + + "Frameset\n" + "\n" + " \n" + " \n" + ""; - final String menu = "Menu\n" + final String menu = DOCTYPE_HTML + + "Menu\n" + "\n" + " Link\n" + " jsLink\n" + ""; - final String content = "Content

content

"; - final String newContent = "New Content

new content

"; + final String content = DOCTYPE_HTML + + "Content

content

"; + final String newContent = DOCTYPE_HTML + + "New Content

new content

"; final MockWebConnection conn = getMockWebConnection(); conn.setResponse(new URL(URL_FIRST, "menu.html"), menu); @@ -1095,13 +1126,18 @@ public void refererHeaderWhenSettingFrameLocation() throws Exception { // click an anchor with href and target driver.switchTo().frame(0); driver.findElement(By.id("link")).click(); + if (useRealBrowser()) { + Thread.sleep(400); + } assertEquals(4, conn.getRequestCount()); Map lastAdditionalHeaders = conn.getLastAdditionalHeaders(); assertEquals(getExpectedAlerts()[0], lastAdditionalHeaders.get(HttpHeader.REFERER)); // click an anchor with onclick which sets frame.location driver.findElement(By.id("jsLink")).click(); - Thread.sleep(100); + if (useRealBrowser()) { + Thread.sleep(400); + } assertEquals(5, conn.getRequestCount()); lastAdditionalHeaders = conn.getLastAdditionalHeaders(); assertEquals(getExpectedAlerts()[0], lastAdditionalHeaders.get(HttpHeader.REFERER)); @@ -1113,8 +1149,8 @@ public void refererHeaderWhenSettingFrameLocation() throws Exception { @Test @Alerts("§§URL§§") public void origin() throws Exception { - final String html = - ""; @@ -1132,8 +1168,8 @@ public void origin() throws Exception { @Test @Alerts("§§URL§§") public void documentOrigin() throws Exception { - final String html = - ""; @@ -1153,8 +1189,8 @@ public void documentOrigin() throws Exception { CHROME = "§§URL§§a.html?p1=sieben&p2", EDGE = "§§URL§§a.html?p1=sieben&p2") public void reloadGet() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" + " reload\n" @@ -1193,8 +1229,8 @@ public void reloadGet() throws Exception { FF = "null", FF_ESR = "null") public void reloadGetNoHash() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" + " \n" @@ -1231,8 +1267,8 @@ public void reloadGetNoHash() throws Exception { FF = "null", FF_ESR = "null") public void reloadGetHashDetails() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" @@ -249,10 +245,10 @@ public void constructorInt32Array() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("TypeError") public void constructorStringParam() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -273,10 +269,10 @@ public void constructorStringParam() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("TypeError") public void constructorSetParam() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -299,8 +295,8 @@ public void constructorSetParam() throws Exception { @Test @Alerts("2") public void constructorMapParam() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -365,8 +361,8 @@ public void constructorIteratorParam() throws Exception { "null", "key3", "[object Map]", "[object Window]", "undefined", "key4", "[object Map]", "[object Window]"}) public void forEach() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; - final String html2 = "\n" + final String html2 = DOCTYPE_HTML + + "\n" + "

iFrame body

\n" + "\n" + "\n" @@ -140,7 +139,8 @@ public void getNamedItem_HTML() throws Exception { @Test @Alerts({"myattr", "myattr2", "myattr", "myattr2", "myattr2"}) public void getNamedItem_HTML_Case() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -298,7 +301,8 @@ public void taintEnabled() throws Exception { * @throws Exception on test failure */ void attribute(final String name, final String value, final String... ignore) throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" @@ -341,8 +345,8 @@ public void language() throws Exception { @Test @Alerts("en-US,en") public void languages() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" @@ -359,8 +363,8 @@ public void languages() throws Exception { @Test @Alerts({"number", "number"}) public void mozilla() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; loadPageVerifyTitle2(html); @@ -58,13 +59,14 @@ public void netscape() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "TypeError", FF = {"true", "false", "true"}, FF_ESR = {"true", "false", "true"}) @HtmlUnitNYI(FF = {"undefined", "true", "true"}, FF_ESR = {"undefined", "true", "true"}) public void netscapeDescriptor() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; loadPageVerifyTitle2(html); diff --git a/src/test/java/org/htmlunit/javascript/host/NotificationTest.java b/src/test/java/org/htmlunit/javascript/host/NotificationTest.java index 8e25544606c..dec0cba6a44 100644 --- a/src/test/java/org/htmlunit/javascript/host/NotificationTest.java +++ b/src/test/java/org/htmlunit/javascript/host/NotificationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -36,12 +36,13 @@ public class NotificationTest extends WebDriverTestCase { @Test @Alerts({"function", "true"}) public void prototype() throws Exception { - final String html = ""; loadPageVerifyTitle2(html); @@ -53,11 +54,12 @@ public void prototype() throws Exception { @Test @Alerts("default") public void permission() throws Exception { - final String html = ""; loadPageVerifyTitle2(html); @@ -69,11 +71,12 @@ public void permission() throws Exception { @Test @Alerts({}) public void minimalUsage() throws Exception { - final String html = ""; loadPageVerifyTitle2(html); @@ -85,11 +88,12 @@ public void minimalUsage() throws Exception { @Test @Alerts("function") public void requestPermission() throws Exception { - final String html = ""; loadPageVerifyTitle2(html); diff --git a/src/test/java/org/htmlunit/javascript/host/PluginTest.java b/src/test/java/org/htmlunit/javascript/host/PluginTest.java index 4e6d8e95ab9..4fcecb798d9 100644 --- a/src/test/java/org/htmlunit/javascript/host/PluginTest.java +++ b/src/test/java/org/htmlunit/javascript/host/PluginTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -28,6 +28,9 @@ @RunWith(BrowserRunner.class) public class PluginTest extends WebDriverTestCase { + /** + * @throws Exception if an error occurs + */ @Test @Alerts({"5", "PDF Viewer", "Portable Document Format", "internal-pdf-viewer", "undefined", @@ -36,7 +39,8 @@ public class PluginTest extends WebDriverTestCase { "Microsoft Edge PDF Viewer", "Portable Document Format", "internal-pdf-viewer", "undefined", "WebKit built-in PDF", "Portable Document Format", "internal-pdf-viewer", "undefined"}) public void plugins() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + ""; @@ -60,9 +61,10 @@ public void popup() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("TypeError") public void popupBodyStyle() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; diff --git a/src/test/java/org/htmlunit/javascript/host/PopupTest.java b/src/test/java/org/htmlunit/javascript/host/PopupTest.java index e529e0a1d0d..3fa15e1aa59 100644 --- a/src/test/java/org/htmlunit/javascript/host/PopupTest.java +++ b/src/test/java/org/htmlunit/javascript/host/PopupTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ import org.htmlunit.html.HtmlElement; import org.htmlunit.html.HtmlPage; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -42,7 +42,8 @@ public class PopupTest extends SimpleWebTestCase { @Test @Alerts("Pop-up window is Open") public void popupWindowBecomesCurrent() throws Exception { - final String content = "First\n" + final String content = DOCTYPE_HTML + + "First\n" + "Push me\n" + "\n" + "\n" @@ -284,14 +287,15 @@ public void orientation() throws Exception { FF = "landscape-primary", FF_ESR = "landscape-primary") public void mozOrientation() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + "\n" @@ -309,13 +313,14 @@ public void mozOrientation() throws Exception { FF = "undefined", FF_ESR = "undefined") public void isExtended() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + "\n" diff --git a/src/test/java/org/htmlunit/javascript/host/SetTest.java b/src/test/java/org/htmlunit/javascript/host/SetTest.java index 35b8774042f..bf35ab4e6d9 100644 --- a/src/test/java/org/htmlunit/javascript/host/SetTest.java +++ b/src/test/java/org/htmlunit/javascript/host/SetTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,8 @@ import java.util.Set; import org.htmlunit.WebDriverTestCase; -import org.htmlunit.html.HtmlPageTest; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -38,8 +37,7 @@ public class SetTest extends WebDriverTestCase { @Test @Alerts({"3", "true"}) public void has() throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" + "\n" @@ -311,8 +307,8 @@ public void constructorIteratorParam() throws Exception { "undefined", "undefined", "[object Set]", "[object Window]", "null", "null", "[object Set]", "[object Window]"}) public void forEach() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; loadPageVerifyTitle2(html); } @@ -80,16 +76,16 @@ public void storageEquals() throws Exception { @Test @Alerts({"string", "1"}) public void localStorage() throws Exception { - final String firstHtml - = "\n" + final String firstHtml = DOCTYPE_HTML + + "\n" + "\n" + ""; - final String secondHtml - = "\n" + final String secondHtml = DOCTYPE_HTML + + "\n" + "\n" + + ""; + loadPageVerifyTitle2(html); + } + /** * @throws Exception if the test fails */ @Test @Alerts({"0", "2", "there", "world", "1", "0"}) public void sessionStorage() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; - final WebDriver driver = loadPage2(html1); - final List alerts = getCollectedAlerts(driver); - final String html2 = ""; getMockWebConnection().setResponse(URL_FIRST, html2); - releaseResources(); // we have to control 2nd driver by ourself - WebDriver driver2 = null; - try { - driver2 = buildWebDriver(); - driver2.get(URL_FIRST.toString()); - final List newAlerts = getCollectedAlerts(driver2); - alerts.addAll(newAlerts); - assertEquals(getExpectedAlerts(), alerts); - } - finally { - if (!(driver2 instanceof HtmlUnitDriver)) { - shutDownAll(); - } + driver = loadPage2(html2); + assertEquals(getExpectedAlerts()[1], driver.getTitle()); + + if (!(driver instanceof HtmlUnitDriver)) { + shutDownAll(); } } @@ -275,7 +293,8 @@ public void localStorageShouldBeShared() throws Exception { @Test @Alerts({"undefined", "null", "extraMethod called", "null"}) public void prototypeIsExtensible() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; loadPageVerifyTitle2(html); } @@ -302,7 +321,8 @@ public void prototypeIsExtensible() throws Exception { @Test @Alerts({"function", "null", "function", "value", "1"}) public void prototypePropertiesAreVisible() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; loadPageVerifyTitle2(html); @@ -328,7 +348,8 @@ public void prototypePropertiesAreVisible() throws Exception { @HtmlUnitNYI(FF = {"function", "null", "string", "value", "1"}, FF_ESR = {"function", "null", "string", "value", "1"}) public void writeToPrototypeProperty() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; loadPageVerifyTitle2(html); } diff --git a/src/test/java/org/htmlunit/javascript/host/SymbolTest.java b/src/test/java/org/htmlunit/javascript/host/SymbolTest.java index f1b5514bbd6..cd6257b46c5 100644 --- a/src/test/java/org/htmlunit/javascript/host/SymbolTest.java +++ b/src/test/java/org/htmlunit/javascript/host/SymbolTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.html.HtmlPageTest; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -130,8 +130,7 @@ public void toStringTag() throws Exception { } private void name(final String name) throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" + "\n" @@ -183,8 +182,7 @@ public void string() throws Exception { @Test @Alerts({"Symbol()", "Symbol(foo)", "Symbol(Symbol.iterator)"}) public void defaultValue() throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" + "\n" @@ -211,8 +209,7 @@ public void defaultValue() throws Exception { @Test @Alerts({"function", "symbol", "symbol", "symbol"}) public void typeOf() throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" + "\n" @@ -240,8 +237,7 @@ public void typeOf() throws Exception { @Test @Alerts({"false", "true", "Symbol(mario)"}) public void symbolFor() throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" + "\n" @@ -270,8 +266,7 @@ public void symbolFor() throws Exception { @Test @Alerts({"true", "false"}) public void symbolForGlobal() throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" + "\n" @@ -298,10 +293,9 @@ public void symbolForGlobal() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"exception", "exception"}) + @Alerts({"TypeError", "TypeError"}) public void symbolNew() throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" + "\n" @@ -327,10 +321,9 @@ public void symbolNew() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"exception", "exception"}) + @Alerts({"TypeError", "TypeError"}) public void globalSymbolRegistry() throws Exception { - final String html = - HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" + "\n" @@ -358,7 +351,8 @@ public void globalSymbolRegistry() throws Exception { @Test @Alerts("called") public void inFunction() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -646,7 +648,8 @@ private void encoding(final String encoding) throws Exception { @Test @Alerts({"0", "8", "72", "116"}) public void encode() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" @@ -731,16 +736,17 @@ public void decode2() throws Exception { * @throws Exception on test failure */ @Test - @Alerts("ex") + @Alerts("RangeError") public void decodeReplacement() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" @@ -754,9 +760,10 @@ public void decodeReplacement() throws Exception { * @throws Exception on test failure */ @Test - @Alerts({"", "ex-null", "\uf7cf!"}) + @Alerts({"", "ex-null", "TypeError", "\uf7cf!"}) public void decodeXuserDefined() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" diff --git a/src/test/java/org/htmlunit/javascript/host/TextEncoderTest.java b/src/test/java/org/htmlunit/javascript/host/TextEncoderTest.java index 595f89238c3..6be0f9e745e 100644 --- a/src/test/java/org/htmlunit/javascript/host/TextEncoderTest.java +++ b/src/test/java/org/htmlunit/javascript/host/TextEncoderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -35,7 +35,8 @@ public class TextEncoderTest extends WebDriverTestCase { @Test @Alerts("utf-8") public void encoding() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" @@ -386,8 +395,8 @@ public void stringMissingParam() throws Exception { "key=value&empty-key=undefined&key=overwrite", "key=value&empty-key=undefined&key=overwrite&key-null=null"}) public void append() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" @@ -956,8 +965,8 @@ public void forEachWrongParam() throws Exception { @Alerts({"true", "function entries() { [native code] }", "[object URLSearchParams Iterator]", "key1-val1", "key2-", "key1-val3", "-val4", "true"}) public void entries() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" @@ -689,6 +714,9 @@ public void protocol() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts({"https:", "http:", "http://mydomain.com/svn/Repos/", @@ -698,10 +726,10 @@ public void protocol() throws Exception { "http:", "http://mydomain.com/svn/Repos/", "http:", "http://mydomain.com/svn/Repos/", "http:", "http://mydomain.com/svn/Repos/", - "ex-unknown"}) + "ex-unknown", "ReferenceError"}) public void protocol2() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" @@ -755,6 +783,9 @@ public void protocol2() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts({"https:", "http:", "http://mydomain.com/svn/Repos/", @@ -764,10 +795,10 @@ public void protocol2() throws Exception { "http:", "http://mydomain.com/svn/Repos/", "http:", "http://mydomain.com/svn/Repos/", "http:", "http://mydomain.com/svn/Repos/", - "ex-unknown"}) + "ex-unknown", "ReferenceError"}) public void protocol3() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" @@ -821,6 +852,9 @@ public void protocol3() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ @Test @Alerts(DEFAULT = {"https:", "http:", "http://mydomain.com/svn/Repos/", @@ -864,8 +898,8 @@ public void protocol3() throws Exception { "wss:", "wss://mydomain.com/svn/Repos/", "file:", "file://mydomain.com/svn/Repos/"}) public void specialScheme() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" @@ -82,8 +82,8 @@ public void constructorSetParam() throws Exception { @Test @Alerts("true") public void constructorMapParam() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -109,8 +109,8 @@ public void constructorMapParam() throws Exception { @Test @Alerts("true") public void constructorIteratorParam() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/javascript/host/WeakSetTest.java b/src/test/java/org/htmlunit/javascript/host/WeakSetTest.java index 45d6ba3ce3c..d0f32b041a7 100644 --- a/src/test/java/org/htmlunit/javascript/host/WeakSetTest.java +++ b/src/test/java/org/htmlunit/javascript/host/WeakSetTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -35,8 +35,8 @@ public class WeakSetTest extends WebDriverTestCase { @Test @Alerts("true") public void constructorArray() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -227,7 +228,7 @@ public void chat() throws Exception { assertVisible("joined", driver); final WebElement chatE = driver.findElement(By.id("chat")); - long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME; + long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME.toMillis(); do { Thread.sleep(100); @@ -239,7 +240,7 @@ public void chat() throws Exception { driver.findElement(By.id("phrase")).sendKeys("Hope you are fine!"); driver.findElement(By.id("sendB")).click(); - maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME; + maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME.toMillis(); do { Thread.sleep(100); } @@ -358,7 +359,7 @@ public void cookies() throws Exception { driver.findElement(By.id("joinB")).click(); final WebElement chatE = driver.findElement(By.id("chat")); - long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME; + long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME.toMillis(); do { Thread.sleep(100); } @@ -369,7 +370,7 @@ public void cookies() throws Exception { driver.findElement(By.id("phrase")).sendKeys("Hope you are fine!"); driver.findElement(By.id("sendB")).click(); - maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME; + maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME.toMillis(); do { Thread.sleep(100); } @@ -463,13 +464,13 @@ public void events() throws Exception { driver.get(URL_FIRST + "WebSocketTest_events.html"); final WebElement logElement = driver.findElement(By.id("log")); - final long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME; + final long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME.toMillis(); String text; do { Thread.sleep(100); - text = logElement.getAttribute("value").trim().replaceAll("\r", ""); + text = logElement.getDomProperty("value").trim().replaceAll("\r", ""); } while (text.length() <= expected.length() && System.currentTimeMillis() < maxWait); @@ -523,7 +524,32 @@ public void events() throws Exception { "[object ArrayBuffer]", "§§URL§§", "", "null", "onCloseListener code: 1000 wasClean: false", "onClose code: 1000 wasClean: false"}) - @NotYetImplemented({FF, FF_ESR}) + @HtmlUnitNYI(FF = {"onOpenListener", + "onOpen", "open", "[object WebSocket]", "[object WebSocket]", + "undefined", "undefined", "undefined", "undefined", + "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "§§URL§§", "", "null", + "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "§§URL§§", "", "null", + "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "§§URL§§", "", "null", + "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "§§URL§§", "", "null", + "onCloseListener code: 1000 wasClean: true", + "onClose code: 1000 wasClean: true"}, + FF_ESR = {"onOpenListener", + "onOpen", "open", "[object WebSocket]", "[object WebSocket]", + "undefined", "undefined", "undefined", "undefined", + "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "§§URL§§", "", "null", + "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "§§URL§§", "", "null", + "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "§§URL§§", "", "null", + "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "§§URL§§", "", "null", + "onCloseListener code: 1000 wasClean: true", + "onClose code: 1000 wasClean: true"}) public void wasClean() throws Exception { expandExpectedAlertsVariables("ws://localhost:" + PORT); final String expected = String.join("\n", getExpectedAlerts()); @@ -535,13 +561,13 @@ public void wasClean() throws Exception { driver.get(URL_FIRST + "WebSocketTest_wasClean.html"); final WebElement logElement = driver.findElement(By.id("log")); - final long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME; + final long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME.toMillis(); String text; do { Thread.sleep(100); - text = logElement.getAttribute("value").trim().replaceAll("\r", ""); + text = logElement.getDomProperty("value").trim().replaceAll("\r", ""); } while (text.length() <= expected.length() && System.currentTimeMillis() < maxWait); @@ -569,9 +595,9 @@ public void eventsNoSocketServer() throws Exception { int counter = 0; String text; do { - Thread.sleep(DEFAULT_WAIT_TIME); + Thread.sleep(DEFAULT_WAIT_TIME.toMillis()); - text = logElement.getAttribute("value").trim().replaceAll("\r", ""); + text = logElement.getDomProperty("value").trim().replaceAll("\r", ""); } while (text.length() > 0 && counter++ < 10); @@ -658,7 +684,8 @@ public void onWebSocketBinary(final byte[] payload, final int offset, final int @Test @Alerts("true") public void prototypeUrl() throws Exception { - final String html = "\n" + ""; loadPageVerifyTitle2(html); @@ -185,18 +181,161 @@ public void atob() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"exception", "exception"}) + @Alerts({"SGVsbG8gV29ybGQh", "Hello World!"}) + public void atobTrailingWhitespace() throws Exception { + final String html = DOCTYPE_HTML + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"SGVsbG8gV29ybGQh", "Hello World!"}) + public void atobLeadingWhitespace() throws Exception { + final String html = DOCTYPE_HTML + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"SGVsbG8gV29ybGQh", "Hello World!"}) + public void atobWhitespace() throws Exception { + final String html = DOCTYPE_HTML + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"SGVsbG8gV29ybGQh", "InvalidCharacterError/DOMException", + "InvalidCharacterError/DOMException", "InvalidCharacterError/DOMException"}) + public void atobNbsp() throws Exception { + final String html = DOCTYPE_HTML + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"SGVsbG8gV29ybGQh", "InvalidCharacterError/DOMException"}) + public void atobInvalid() throws Exception { + final String html = DOCTYPE_HTML + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("InvalidCharacterError/DOMException") + public void atobMalformedInput() throws Exception { + final String html = DOCTYPE_HTML + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("InvalidCharacterError/DOMException") + public void atobEmptyInput() throws Exception { + final String html = DOCTYPE_HTML + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"InvalidCharacterError/DOMException", "InvalidCharacterError/DOMException"}) public void atobUnicode() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; loadPageVerifyTitle2(html); @@ -208,11 +347,11 @@ public void atobUnicode() throws Exception { @Test @Alerts({"M8OuwqY=", "3\u00C3\u00AE\u00C2\u00A6"}) public void atobUnicodeOutput() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -228,11 +367,11 @@ public void atobUnicodeOutput() throws Exception { @Test @Alerts({"CSAe", "\t \u001e"}) public void atobControlChar() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -248,13 +387,13 @@ public void atobControlChar() throws Exception { @Test @Alerts({"bnVsbA==", "null"}) public void atobNull() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; loadPageVerifyTitle2(html); @@ -266,13 +405,13 @@ public void atobNull() throws Exception { @Test @Alerts({"dW5kZWZpbmVk", "undefined"}) public void atobUndefined() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; loadPageVerifyTitle2(html); @@ -309,7 +448,8 @@ public void topLevelProperties() throws Exception { "NaN", "Infinity", "eval", "print", "parseInt", "parseFloat", "isNaN", "isFinite", "encodeURI", "encodeURIComponent", "decodeURI", "decodeURIComponent", "escape", "unescape"}; - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -364,14 +506,15 @@ public void execScript2() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("TypeError") public void execScript_returnValue() throws Exception { - final String html = "\n" + ""; @@ -384,7 +527,8 @@ public void execScript_returnValue() throws Exception { @Test @Alerts("undefined") public void collectGarbage() throws Exception { - final String html = "\n" @@ -646,7 +795,8 @@ public void open() throws Exception { + " window.open('" + URL_SECOND + "');\n" + "\n" + ""; - final String windowContent = "\n" + final String windowContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -678,7 +829,8 @@ public void openWindowParams() throws Exception { + " window.open('" + URL_SECOND + "', 'New window', 'width=200,height=100');\n" + "\n" + ""; - final String windowContent = "\n" + final String windowContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + ""; - final String windowContent = "\n" + final String windowContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" + ""; @@ -795,17 +951,47 @@ public void IEScriptEngineXxx() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(CHROME = {"true", "true", "147", "true", "true", "16"}, - EDGE = {"true", "true", "136", "true", "true", "24"}, - FF = {"true", "true", "91", "true", "true", "12"}, - FF_ESR = {"true", "true", "91", "true", "true", "12"}) + @Alerts(CHROME = {"true", "621", "147", "true", "16", "16"}, + EDGE = {"true", "630", "138", "true", "16", "24"}, + FF = {"true", "675", "93", "true", "16", "16"}, + FF_ESR = {"true", "677", "91", "true", "16", "12"}) + @HtmlUnitNYI(CHROME = {"true", "605", "147", "true", "0", "16"}, + EDGE = {"true", "605", "138", "true", "0", "24"}, + FF = {"true", "605", "93", "true", "0", "16"}, + FF_ESR = {"true", "605", "91", "true", "0", "12"}) public void heightsAndWidths() throws Exception { - final String html - = "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * Regression test for bug 2897473. + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = {"true", "0", "147", "true", "true", "16"}, + EDGE = {"true", "0", "138", "true", "true", "24"}, + FF = {"true", "0", "93", "true", "true", "16"}, + FF_ESR = {"true", "0", "91", "true", "true", "12"}) + public void heightsAndWidthsQuirks() throws Exception { + final String html = + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * Regression test for bug 2944261. + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = {"621", "1256", "606", "1241"}, + EDGE = {"630", "1248", "615", "1233"}, + FF = {"675", "1256", "658", "1239"}, + FF_ESR = {"677", "1260", "660", "1243"}) + // TODO width and height calculation needs to be reworked in HtmlUnit + // but as the calculation might be effected by e.g. current windows style it is not that simple + @HtmlUnitNYI(CHROME = {"605", "1256", "705", "1256"}, + EDGE = {"605", "1256", "705", "1256"}, + FF = {"605", "1256", "705", "1256"}, + FF_ESR = {"605", "1256", "705", "1256"}) + public void changeHeightsAndWidthsQuirks() throws Exception { + final String html = + "\n" + ""; @@ -1086,11 +1320,11 @@ public void typeof() throws Exception { */ @Test @Alerts(DEFAULT = {"undefined", "undefined"}, - FF = {"10", "89"}, + FF = {"12", "89"}, FF_ESR = {"10", "89"}) public void mozInnerScreen() throws Exception { - final String html - = "\n" + ""; @@ -1152,8 +1386,8 @@ public void eval() throws Exception { @Test @Alerts({"true", "I was here"}) public void firedEvent_equals_original_event() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; @@ -2150,8 +2396,8 @@ public void showModalDialog() throws Exception { @Test @Alerts("undefined") public void showModelessDialog() throws Exception { - final String html - = ""; @@ -2166,8 +2412,8 @@ public void showModelessDialog() throws Exception { @Test @Alerts("function") public void find() throws Exception { - final String html - = ""; @@ -2183,8 +2429,8 @@ public void find() throws Exception { @Test @Alerts("\"0.33\"") public void getComputedStylePseudo() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" @@ -2273,8 +2520,8 @@ public void getComputedStyleElementDocument() throws Exception { @Test @Alerts({"1", "false", "true", "false", "false"}) public void in() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -2317,15 +2565,16 @@ public void calledTwice() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception true") + @Alerts("TypeError") public void constructor() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -2343,7 +2592,8 @@ public void constructor() throws Exception { @Test @Alerts("0") public void constructorError() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -2366,7 +2616,8 @@ public void constructorError() throws Exception { @Test @Alerts({"false", "false", "test2 alert"}) public void objectCallOnFrameWindow() throws Exception { - final String firstContent = "\n" + final String firstContent = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -2455,8 +2708,8 @@ public void xmlNotInWindow() throws Exception { @Test @Alerts({"[object Window]", "true", "true"}) public void globalThis() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; @@ -2639,8 +2899,8 @@ public void isSecureContextLocalhost() throws Exception { @Test @Alerts("false") public void isSecureContextHttp() throws Exception { - final String html - = ""; @@ -2668,8 +2928,8 @@ public void isSecureContextHttpS() throws Exception { @Test @Alerts("true") public void isSecureContextFile() throws Exception { - final String html - = ""; @@ -2712,7 +2972,8 @@ public void isSecureContextAboutBlank() throws Exception { @Test @Alerts("inline") public void getComputedStyleShouldLoadOnlyStylesheets() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -2746,7 +3007,8 @@ public void getComputedStyleShouldLoadOnlyStylesheets() throws Exception { @Test @Alerts("length[GSCE]") public void lengthProperty() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" + + "\n" + + ""; + + loadPage2(content); + verifyTitle2(DEFAULT_WAIT_TIME, getWebDriver(), getExpectedAlerts()); + } +} diff --git a/src/test/java/org/htmlunit/javascript/host/Window3Test.java b/src/test/java/org/htmlunit/javascript/host/Window3Test.java index 2d7bb53a7a4..8d0c68b5f0d 100644 --- a/src/test/java/org/htmlunit/javascript/host/Window3Test.java +++ b/src/test/java/org/htmlunit/javascript/host/Window3Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,10 +27,9 @@ import org.apache.commons.lang3.StringUtils; import org.htmlunit.HttpHeader; import org.htmlunit.WebDriverTestCase; -import org.htmlunit.html.HtmlPageTest; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; -import org.htmlunit.junit.BrowserRunner.NotYetImplemented; +import org.htmlunit.junit.annotation.Alerts; +import org.htmlunit.junit.annotation.HtmlUnitNYI; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.By; @@ -62,7 +61,7 @@ public class Window3Test extends WebDriverTestCase { @Test @Alerts("about:blank") public void openWindow_emptyUrl() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + ""; - final String secondContent = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "Second\n" + + "\n" + + "\n" + "
\n" + ""; - final String thirdContent = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "Third\n" + final String firstContent = DOCTYPE_HTML + + "\n" + + "First\n" + + "\n" + + "\n" + + "\n" + ""; - final String secondContent = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "Second\n" + final String secondContent = DOCTYPE_HTML + + "\n" + + "Second\n" + + "\n" + + "\n" + + "\n" + + "\n" + ""; getMockWebConnection().setResponse(URL_SECOND, secondContent); - final String thirdContent = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "Third\n" + ""; getMockWebConnection().setResponse(urlThird, thirdContent); - final WebDriver driver = loadPageWithAlerts2(firstContent); + final WebDriver driver = loadPage2(firstContent); assertTitle(driver, "First"); + verifyWindowName2(driver, getExpectedAlerts()); } /** @@ -205,7 +223,7 @@ public void javascriptVariableFromNamedFrame() throws Exception { final URL urlThird = new URL(URL_FIRST, "third/"); final URL urlFourth = new URL(URL_FIRST, "fourth/"); - final String firstContent = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String firstContent = DOCTYPE_HTML + "first\n" + "\n" + " \n" @@ -215,30 +233,41 @@ public void javascriptVariableFromNamedFrame() throws Exception { + " \n" + ""; - final String secondContent = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "second

second

"; + final String secondContent = DOCTYPE_HTML + + "\n" + + "second\n" + + "\n" + + "\n" + + "

second

"; getMockWebConnection().setResponse(URL_SECOND, secondContent); - final String thirdContent = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "third

third

"; + final String thirdContent = DOCTYPE_HTML + + "\n" + + "third\n" + + "\n" + + "\n" + + "\n" + + "

third

"; getMockWebConnection().setResponse(urlThird, thirdContent); - final String fourthContent = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "fourth"; getMockWebConnection().setResponse(urlFourth, fourthContent); - final WebDriver driver = loadPageWithAlerts2(firstContent); + final WebDriver driver = loadPage2(firstContent); assertTitle(driver, "first"); + verifyWindowName2(driver, getExpectedAlerts()); } /** @@ -248,7 +277,7 @@ public void javascriptVariableFromNamedFrame() throws Exception { @Test @Alerts("true") public void javascriptVariableFromWindow_NotFound() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + ""; getMockWebConnection().setResponse(urlFourth, fourthContent); @@ -303,8 +336,9 @@ public void getFrameByName() throws Exception { } setExpectedAlerts(expectedAlerts); - final WebDriver driver = loadPageWithAlerts2(firstContent); + final WebDriver driver = loadPage2(firstContent); assertTitle(driver, "first"); + verifyWindowName2(driver, expectedAlerts); } /** @@ -314,7 +348,7 @@ public void getFrameByName() throws Exception { @Test @Alerts({"false", "false", "true"}) public void closed() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + + "\n" + + "\n" + ""; loadPageVerifyTitle2(html); } @@ -457,15 +492,17 @@ public void scrollBy() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"document", "body"}) + @Alerts({"document [object HTMLDocument]", "body", "window [object HTMLDocument]"}) public void scrollByEvents() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -484,17 +521,17 @@ public void scrollByEvents() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "TypeError", FF = {}, FF_ESR = {}) public void scrollByLines() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + ""; loadPageVerifyTitle2(html); @@ -505,17 +542,17 @@ public void scrollByLines() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "exception", + @Alerts(DEFAULT = "TypeError", FF = {}, FF_ESR = {}) public void scrollByPages() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + ""; loadPageVerifyTitle2(html); @@ -527,7 +564,7 @@ public void scrollByPages() throws Exception { */ @Test public void scrollTo() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" @@ -569,7 +607,7 @@ public void scrollToEvents() throws Exception { @Test @Alerts({"form1", "form1", "2", "2"}) public void formByName() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -1047,7 +1085,7 @@ public void execScript() throws Exception { @Test @Alerts({"test2", "test"}) public void onLoadFunction() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" + ""; @@ -1152,9 +1190,9 @@ public void attachOnLoadEvent() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("TypeError") public void detachEventInAttachEvent() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" + ""; @@ -1180,7 +1218,9 @@ public void detachEventInAttachEvent() throws Exception { @Test @Alerts({"window.name before: ", "window.name after: main"}) public void windowName() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + shutDownAll(); + + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -1203,7 +1243,7 @@ public void windowName() throws Exception { @Test @Alerts({"number", "number", "number", "number"}) public void viewport() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String html = DOCTYPE_HTML + "\n" + "\n" + "\n" @@ -1227,13 +1267,13 @@ public void viewport() throws Exception { @Test @Alerts("§§URL§§") public void openWindow_refererHeader() throws Exception { - final String firstContent = HtmlPageTest.STANDARDS_MODE_PREFIX_ + final String firstContent = DOCTYPE_HTML + "\n" + "\n" + "
"}) + @Alerts({"a\\sb", "2", "InvalidCharacterError/DOMException", + "2", "a\\sb", "
"}) public void removeBlank() throws Exception { remove("a b", "' '"); } @@ -1047,7 +1137,8 @@ public void removeBlank() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"a\\sb", "2", "exception", "2", "a\\sb", "
"}) + @Alerts({"a\\sb", "2", "InvalidCharacterError/DOMException", + "2", "a\\sb", "
"}) public void removeTab() throws Exception { remove("a b", "'\t'"); } @@ -1056,7 +1147,8 @@ public void removeTab() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"a\\sb", "2", "exception", "2", "a\\sb", "
"}) + @Alerts({"a\\sb", "2", "InvalidCharacterError/DOMException", + "2", "a\\sb", "
"}) public void removeCr() throws Exception { remove("a b", "'\\r'"); } @@ -1065,7 +1157,8 @@ public void removeCr() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"a\\sb", "2", "exception", "2", "a\\sb", "
"}) + @Alerts({"a\\sb", "2", "InvalidCharacterError/DOMException", + "2", "a\\sb", "
"}) public void removeNl() throws Exception { remove("a b", "'\\n'"); } @@ -1121,7 +1214,8 @@ public void removeDuplicated() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"a\\sb\\sa", "2", "exception", "2", "a\\sb\\sa", "
"}) + @Alerts({"a\\sb\\sa", "2", "InvalidCharacterError/DOMException", "2", "a\\sb\\sa", + "
"}) public void removeElementWithBlank() throws Exception { remove("a b a", "'a b'"); } @@ -1130,7 +1224,7 @@ public void removeElementWithBlank() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"a\\sb\\sa\\tb", "2", "exception", "2", "a\\sb\\sa\\tb", + @Alerts({"a\\sb\\sa\\tb", "2", "InvalidCharacterError/DOMException", "2", "a\\sb\\sa\\tb", ""}) public void removeElementWithTab() throws Exception { remove("a b a\tb", "'a\tb'"); @@ -1258,15 +1352,15 @@ public void removeTwoNull() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"a\\sb\\s7", "3", "exception", "3", "a\\sb\\s7", + @Alerts({"a\\sb\\s7", "3", "InvalidCharacterError/DOMException", "3", "a\\sb\\s7", ""}) public void removeTwoObject() throws Exception { remove("a b 7", "'b', { color: 'red' }"); } private void remove(final String in, final String toRemove) throws Exception { - String html - = "\n" + String html = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -68,9 +66,10 @@ public void createElementWithAngleBrackets() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("exception") + @Alerts("InvalidCharacterError/DOMException") public void createElementWithHtml() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -101,7 +100,8 @@ public void createElementWithHtml() throws Exception { @Test @Alerts("false") public void createElementPrototype() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; @@ -455,9 +462,11 @@ public void queryCommandEnabled() throws Exception { @Alerts(DEFAULT = {"true", "true", "true"}, FF = {"false", "false", "false"}, FF_ESR = {"false", "false", "false"}) - @NotYetImplemented({FF, FF_ESR}) + @HtmlUnitNYI(FF = {"true", "true", "true"}, + FF_ESR = {"true", "true", "true"}) public void queryCommandEnabledDesignMode() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + /** * @throws Exception if the test fails */ @Test @Alerts({"bar", "null"}) public void getElementById_resetId() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" diff --git a/src/test/java/org/htmlunit/javascript/host/dom/DocumentFragmentTest.java b/src/test/java/org/htmlunit/javascript/host/dom/DocumentFragmentTest.java index 741192f736f..13b94131c1c 100644 --- a/src/test/java/org/htmlunit/javascript/host/dom/DocumentFragmentTest.java +++ b/src/test/java/org/htmlunit/javascript/host/dom/DocumentFragmentTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ import org.htmlunit.WebDriverTestCase; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.junit.Test; import org.junit.runner.RunWith; @@ -41,7 +41,8 @@ public class DocumentFragmentTest extends WebDriverTestCase { FF = "[object CSS2Properties]", FF_ESR = "[object CSS2Properties]") public void getComputedStyleOnChild() throws Exception { - final String html = "\n" + "\n" @@ -52,7 +53,7 @@ public void getComputedStyleOnChild() throws Exception { + " var d = document.createElement('div');\n" + " frag.appendChild(d);\n" + " log(window.getComputedStyle(d, null));\n" - + " } catch (e) { log('exception'); }\n" + + " } catch(e) { logEx(e); }\n" + "\n" + "\n" + ""; @@ -65,8 +66,8 @@ public void getComputedStyleOnChild() throws Exception { */ @Test public void createElement() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" + " \n" @@ -658,8 +642,8 @@ public void documentCreateElementUnknown() throws Exception { public void documentCreateElementValidTagNames() throws Exception { expandExpectedAlertsVariables("\\\\"); - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" + "\n" @@ -1219,8 +1201,8 @@ public void appendChildAtDocumentLevel() throws Exception { @Test @Alerts("Some Text") public void appendChild_textNode() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -1346,8 +1328,8 @@ public void getElementById_scriptSrc() throws Exception { @Test @Alerts("parentDiv") public void parentNode_Nested() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + ""; + final String html = DOCTYPE_HTML + + ""; final String script = "alert(document.getElementsByTagName('script').length);\n"; getMockWebConnection().setResponse(new URL(URL_FIRST, "script"), script, "text/javascript"); @@ -1831,7 +1816,8 @@ public void getElementsByTagName_LoadScript() throws Exception { @Test @Alerts({"2", "Three", "Four", "1", "Two", "0", "0"}) public void getElementsByTagNameXml() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + ""; loadPageVerifyTitle2(html); @@ -1876,8 +1862,8 @@ public void getElementsByTagNameXml() throws Exception { @Test @Alerts({"HTML", "HEAD", "TITLE", "SCRIPT", "BODY"}) public void all_WithParentheses() throws Exception { - final String html - = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -2079,7 +2064,8 @@ public void all_tags() throws Exception { @Test @Alerts({"false", "false", "undefined"}) public void all() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -2122,7 +2108,8 @@ public void all_Caching() throws Exception { @Test @Alerts({"null", "null", "null"}) public void all_NotExisting() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -2187,7 +2175,8 @@ public void body_read() throws Exception { @Test @Alerts("FRAMESET") public void body_readFrameset() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + ""; @@ -2202,8 +2191,8 @@ public void body_readFrameset() throws Exception { @Test @Alerts({"0", "3", "3", "true", "firstImage"}) public void images() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" + "\n" @@ -2492,7 +2486,8 @@ public void scriptsArray() throws Exception { @Test @Alerts({"object", "FORM"}) public void precedence() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" @@ -2512,7 +2507,8 @@ public void precedence() throws Exception { @Test @Alerts({"true", "false"}) public void defaultViewAndParentWindow() throws Exception { - final String html = "\n" + ""; @@ -2601,25 +2596,25 @@ public void createStyleSheet() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("#document-fragment_null_11_null_0_") + @Alerts({"#document-fragment", "null", "11", "null", "0"}) public void createDocumentFragment() throws Exception { - final String html = "foo\n" - + "\n" + + LOG_TEXTAREA + ""; - final WebDriver driver = loadPage2(html); - final String expected = getExpectedAlerts()[0]; - assertEquals(expected, driver.findElement(By.id("myTextarea")).getAttribute("value")); + loadPageVerifyTextArea2(html); } /** @@ -2653,14 +2648,14 @@ public void createEvent_HTMLEvents() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts("exception") + @Alerts("NotSupportedError/DOMException") public void createEvent_Bogus() throws Exception { createEvent("Bogus"); } private void createEvent(final String eventType) throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + ""; @@ -2683,8 +2678,8 @@ private void createEvent(final String eventType) throws Exception { @Test @Alerts({"null", "null", "[object HTMLDivElement]"}) public void createEvent_target() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + "
abc
\n" + " \n" + " \n" @@ -2712,8 +2707,8 @@ public void createEvent_target() throws Exception { @Test @Alerts("function onload(event) { log(\"hi\") }") public void createEvent_overridden() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + "
abc
\n" + " \n" + " \n" @@ -2738,10 +2733,13 @@ public void createEvent_overridden() throws Exception { */ @Test @Alerts("test") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "undefined", + EDGE = "undefined", + FF = "undefined", + FF_ESR = "undefined") public void createEvent_caller() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + "
abc
\n" + " \n" + " \n" @@ -2765,10 +2763,13 @@ public void createEvent_caller() throws Exception { */ @Test @Alerts("null") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "undefined", + EDGE = "undefined", + FF = "undefined", + FF_ESR = "undefined") public void caller() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" + ""; @@ -2835,7 +2834,8 @@ public void createEventObject_IE() throws Exception { @Test @Alerts("null") public void elementFromPoint() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + "\n" @@ -3742,4 +3767,173 @@ public void newDoc() throws Exception { loadPageVerifyTitle2(html); } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = {"0", "0", "8", "1256"}, + EDGE = {"0", "0", "8", "1248"}, + FF = {"0", "0", "8", "1256"}, + FF_ESR = {"0", "0", "8", "1260"}) + @HtmlUnitNYI(EDGE = {"0", "0", "8", "1256"}, + FF_ESR = {"0", "0", "8", "1256"}) + public void documentElementBoundingClientRect() throws Exception { + final String html = DOCTYPE_HTML + + "" + + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = {"0", "0", "621", "1256"}, + EDGE = {"0", "0", "630", "1248"}, + FF = {"0", "0", "8", "1256"}, + FF_ESR = {"0", "0", "8", "1260"}) + @HtmlUnitNYI(CHROME = {"0", "0", "613", "1256"}, + EDGE = {"0", "0", "613", "1256"}, + FF = {"0", "0", "613", "1256"}, + FF_ESR = {"0", "0", "613", "1256"}) + public void documentElementBoundingClientRectQuirks() throws Exception { + final String html = + "" + + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = {"0", "0", "8", "1256"}, + EDGE = {"0", "0", "8", "1248"}, + FF = {"0", "0", "8", "1256"}, + FF_ESR = {"0", "0", "8", "1260"}) + @HtmlUnitNYI(EDGE = {"0", "0", "8", "1256"}, + FF_ESR = {"0", "0", "8", "1256"}) + public void documentElementOffset() throws Exception { + final String html = DOCTYPE_HTML + + "" + + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = {"0", "0", "621", "1256"}, + EDGE = {"0", "0", "630", "1248"}, + FF = {"0", "0", "8", "1256"}, + FF_ESR = {"0", "0", "8", "1260"}) + @HtmlUnitNYI(CHROME = {"0", "0", "613", "1256"}, + EDGE = {"0", "0", "613", "1256"}, + FF = {"0", "0", "613", "1256"}, + FF_ESR = {"0", "0", "613", "1256"}) + public void documentElementOffsetQuirks() throws Exception { + final String html = + "" + + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = {"0", "0", "621", "1256"}, + EDGE = {"0", "0", "630", "1248"}, + FF = {"0", "0", "675", "1256"}, + FF_ESR = {"0", "0", "677", "1260"}) + @HtmlUnitNYI(CHROME = {"0", "0", "605", "1256"}, + EDGE = {"0", "0", "605", "1256"}, + FF = {"0", "0", "605", "1256"}, + FF_ESR = {"0", "0", "605", "1256"}) + public void documentElementClientWidthHeight() throws Exception { + final String html = DOCTYPE_HTML + + "" + + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = {"0", "0", "621", "1256"}, + EDGE = {"0", "0", "630", "1248"}, + FF = {"0", "0", "8", "1256"}, + FF_ESR = {"0", "0", "8", "1260"}) + @HtmlUnitNYI(CHROME = {"0", "0", "605", "1256"}, + EDGE = {"0", "0", "605", "1256"}, + FF = {"0", "0", "605", "1256"}, + FF_ESR = {"0", "0", "605", "1256"}) + public void documentElementClientWidthHeightQuirks() throws Exception { + final String html = + "" + + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } } diff --git a/src/test/java/org/htmlunit/javascript/host/dom/DocumentTypeTest.java b/src/test/java/org/htmlunit/javascript/host/dom/DocumentTypeTest.java index 74cd6a4358d..34e60781df4 100644 --- a/src/test/java/org/htmlunit/javascript/host/dom/DocumentTypeTest.java +++ b/src/test/java/org/htmlunit/javascript/host/dom/DocumentTypeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2024 Gargoyle Software Inc. + * Copyright (c) 2002-2025 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,8 @@ package org.htmlunit.javascript.host.dom; import org.htmlunit.WebDriverTestCase; -import org.htmlunit.html.HtmlPageTest; import org.htmlunit.junit.BrowserRunner; -import org.htmlunit.junit.BrowserRunner.Alerts; +import org.htmlunit.junit.annotation.Alerts; import org.htmlunit.util.MimeType; import org.junit.Test; import org.junit.runner.RunWith; @@ -73,8 +72,8 @@ public void doctype() throws Exception { @Alerts({"[object DocumentType]", "greeting,10,null,undefined,undefined,undefined", "greeting,MyIdentifier,hello.dtd,undefined,undefined,undefined"}) public void doctype_xml() throws Exception { - final String html = - "\n" + final String html = DOCTYPE_HTML + + "\n" + " \n" + " \n" + "\n" + " \n" + " \n" - + " \n" + + LOG_TEXTAREA + ""; final WebDriver driver = loadPage2(html); @@ -120,23 +120,21 @@ public void clickEvents() throws Exception { driver.findElement(By.id("testInput")).click(); driver.findElement(By.id("testImage")).click(); driver.findElement(By.id("testTextarea")).click(); - final String expected = getExpectedAlerts()[0]; - assertEquals(expected, driver.findElement(By.id("myTextarea")).getAttribute("value")); + + verifyTextArea2(driver, getExpectedAlerts()); } /** * @throws Exception if the test fails */ @Test - @Alerts("mousedown label,mouseup label,click label,focus text,click text,") + @Alerts({"mousedown label", "mouseup label", "click label", "focus text", "click text"}) public void clickEventsLabel() throws Exception { - final String html = "\n" + final String html = DOCTYPE_HTML + + "\n" + "\n" + " \n" + "\n" + "