Skip to content

Commit 4e0b6ac

Browse files
committed
remove more alerts
1 parent e03c8cd commit 4e0b6ac

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/test/java/com/gargoylesoftware/htmlunit/html/HtmlPage3Test.java

+10-7
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,12 @@ public void application_javascript_type() throws Exception {
259259
final String html = "<html>\n"
260260
+ "<body>\n"
261261
+ " <script type='application/javascript'>\n"
262-
+ " alert('Hello');\n"
262+
+ LOG_TITLE_FUNCTION
263+
+ " log('Hello');\n"
263264
+ " </script>\n"
264265
+ "</body></html>";
265266

266-
loadPageWithAlerts2(html);
267+
loadPageVerifyTitle2(html);
267268
}
268269

269270
/**
@@ -275,11 +276,12 @@ public void application_x_javascript_type() throws Exception {
275276
final String html = "<html>\n"
276277
+ "<body>\n"
277278
+ " <script type='application/x-javascript'>\n"
278-
+ " alert('Hello');\n"
279+
+ LOG_TITLE_FUNCTION
280+
+ " log('Hello');\n"
279281
+ " </script>\n"
280282
+ "</body></html>";
281283

282-
loadPageWithAlerts2(html);
284+
loadPageVerifyTitle2(html);
283285
}
284286

285287
/**
@@ -511,15 +513,16 @@ public void readyStateInDOMContentLoaded() throws Exception {
511513
"<html>\n"
512514
+ " <head>\n"
513515
+ " <script>\n"
516+
+ LOG_TITLE_FUNCTION
514517
+ " document.addEventListener('DOMContentLoaded', function () {\n"
515-
+ " alert(document.readyState);\n"
518+
+ " log(document.readyState);\n"
516519
+ " });\n"
517520
+ " </script>\n"
518521
+ " </head>\n"
519522
+ " <body>test</body>\n"
520523
+ "</html>";
521524

522-
loadPageWithAlerts2(html);
525+
loadPageVerifyTitle2(html);
523526
}
524527

525528
/**
@@ -590,7 +593,7 @@ public void loadExternalJavaScript_absolute() throws Exception {
590593
+ " iframesrc += ' var y = squared(5);';\n"
591594
+ " iframesrc += ' alert(y);';\n"
592595
+ " iframesrc += ' } catch (e) {';\n"
593-
+ " iframesrc += ' alert(\"error\");';\n"
596+
+ " iframesrc += ' log(\"error\");';\n"
594597
+ " iframesrc += ' }';\n"
595598
+ " iframesrc += '}';\n"
596599
+ " iframesrc += '</' + 'script>';\n"

0 commit comments

Comments
 (0)