Skip to content

Commit 488f702

Browse files
Copilotrbri
andauthored
Fix ResponseTest staticMethods for real browsers
Agent-Logs-Url: https://github.com/HtmlUnit/htmlunit/sessions/d72cd26b-ab7c-41f5-a64b-2d3a325c7c72 Co-authored-by: rbri <2544132+rbri@users.noreply.github.com>
1 parent 014577e commit 488f702

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,21 +143,21 @@ public void clone() throws Exception {
143143
* @throws Exception if the test fails
144144
*/
145145
@Test
146-
@Alerts({"200", "true", "0", "error", "301", "/a", "302"})
146+
@Alerts({"200", "true", "0", "error", "301", "https://example.com/a", "302"})
147147
public void staticMethods() throws Exception {
148148
final String html = DOCTYPE_HTML
149149
+ "<html><head><script>\n"
150150
+ LOG_TITLE_FUNCTION
151-
+ " const ok = Response.ok();\n"
151+
+ " const ok = new Response();\n"
152152
+ " log(ok.status);\n"
153153
+ " log(ok.ok);\n"
154154
+ " const err = Response.error();\n"
155155
+ " log(err.status);\n"
156156
+ " log(err.type);\n"
157-
+ " const redir = Response.redirect('/a', 301);\n"
157+
+ " const redir = Response.redirect('https://example.com/a', 301);\n"
158158
+ " log(redir.status);\n"
159159
+ " log(redir.headers.get('location'));\n"
160-
+ " log(Response.redirect('/b').status);\n"
160+
+ " log(Response.redirect('https://example.com/b').status);\n"
161161
+ "</script></head><body></body></html>";
162162

163163
loadPageVerifyTitle2(html);

0 commit comments

Comments
 (0)