Skip to content

Failing atob test case for malformed input #940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/test/java/org/htmlunit/javascript/host/Window2Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,24 @@
loadPageVerifyTitle2(html);
}

/**
* @throws Exception if the test fails
*/
@Test
@Alerts({"InvalidCharacterError/DOMException"})

Check failure on line 188 in src/test/java/org/htmlunit/javascript/host/Window2Test.java

View workflow job for this annotation

GitHub Actions / CheckStyle

[checkstyle] reported by reviewdog 🐶 Annotation style must be 'COMPACT_NO_ARRAY'. Raw Output: /home/runner/work/htmlunit/htmlunit/src/test/java/org/htmlunit/javascript/host/Window2Test.java:188:5: error: Annotation style must be 'COMPACT_NO_ARRAY'. (com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck)

Check failure on line 188 in src/test/java/org/htmlunit/javascript/host/Window2Test.java

View workflow job for this annotation

GitHub Actions / build (21)

[CodeStyleTest::codeStyle] reported by reviewdog 🐶 No need for curly brackets Raw Output: src/test/java/org/htmlunit/javascript/host/Window2Test.java, line 188: No need for curly brackets
public void atobMalformedInput() throws Exception {
final String html
= "<html><head></head><body>\n"
+ "<script>\n"
+ LOG_TITLE_FUNCTION
+ " try {\n"
+ " window.atob('b');\n"
+ " } catch(e) {logEx(e)}\n"
+ "</script>\n"
+ "</body></html>";
loadPageVerifyTitle2(html);
}

/**
* @throws Exception if the test fails
*/
Expand Down
Loading