Skip to content

Commit d616c03

Browse files
committed
use std log
1 parent 3985d04 commit d616c03

2 files changed

Lines changed: 64 additions & 128 deletions

File tree

src/test/java/org/htmlunit/html/HtmlLink2Test.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private void onLoadOnError(final String attribs) throws Exception {
226226
* @throws Exception if an error occurs
227227
*/
228228
@Test
229-
@Alerts({"onLoad1", "onLoadJs1", "onLoad2", "body onLoad;"})
229+
@Alerts({"onLoad1", "onLoadJs1", "onLoad2", "body onLoad"})
230230
public void onLoadOrder() throws Exception {
231231
getMockWebConnection().setResponse(new URL(URL_FIRST, "simple1.css"), "");
232232
getMockWebConnection().setResponse(new URL(URL_FIRST, "simple2.css"), "");
@@ -236,9 +236,7 @@ public void onLoadOrder() throws Exception {
236236
= "<html>\n"
237237
+ "<head>\n"
238238
+ " <script>\n"
239-
+ " function log(x) {\n"
240-
+ " document.title += x + ';';\n"
241-
+ " }\n"
239+
+ LOG_TITLE_FUNCTION
242240
+ " </script>\n"
243241
+ " <link rel='stylesheet' href='simple1.css' onload='log(\"onLoad1\")'>\n"
244242
+ " <script type='text/javascript' src='simple1.js' onload='log(\"onLoadJs1\")'></script>\n"
@@ -248,8 +246,7 @@ public void onLoadOrder() throws Exception {
248246
+ "</body>\n"
249247
+ "</html>";
250248

251-
final WebDriver driver = loadPage2(html);
252-
assertTitle(driver, String.join(";", getExpectedAlerts()));
249+
loadPageVerifyTitle2(html);
253250
}
254251

255252
/**

0 commit comments

Comments
 (0)