Skip to content

Commit 289454d

Browse files
Copilotrbri
andauthored
Align RequestTest invalid URL case with real browsers
Agent-Logs-Url: https://github.com/HtmlUnit/htmlunit/sessions/639df19b-aefe-4c95-bd99-42085be15473 Co-authored-by: rbri <2544132+rbri@users.noreply.github.com>
1 parent fc4cc7b commit 289454d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/test/java/org/htmlunit/javascript/host/fetch/RequestTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public void invalidConstructionCases() throws Exception {
173173
final String html = DOCTYPE_HTML
174174
+ "<html><head><script>\n"
175175
+ LOG_TITLE_FUNCTION
176-
+ " try { new Request('%%%'); log('ok'); } catch (e) { log(e.name); }\n"
176+
+ " try { new Request('ftp://example.com/path'); log('ok'); } catch (e) { log(e.name); }\n"
177177
+ " try { new Request('" + URL_SECOND + "', {method: 'GET', body: 'x'}); log('ok'); }\n"
178178
+ " catch (e) { log(e.name); }\n"
179179
+ "</script></head><body></body></html>";

0 commit comments

Comments
 (0)