Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,9 @@ void shouldRunTimeBeforePopup(Page page, Server server) {
Page popup = page.waitForPopup(() -> {
page.evaluate("url => window.open(url)", server.PREFIX + "/popup.html");
});
popup.waitForURL(server.PREFIX + "/popup.html");
Double popupTime = (Double) popup.evaluate("time");
assertTrue(popupTime >= 2000);
assertTrue(popupTime >= 2000, "popupTime = " + popupTime);
}

@Test
Expand All @@ -310,6 +311,7 @@ void shouldNotRunTimeBeforePopupOnPause(Page page, Server server) {
Page popup = page.waitForPopup(() -> {
page.evaluate("url => window.open(url)", server.PREFIX + "/popup.html");
});
popup.waitForURL(server.PREFIX + "/popup.html");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait for url does wait for load state too by default and also ensures we are not on about:blank (unlikely).

Object popupTime = popup.evaluate("time");
assertEquals(1000, popupTime);
}
Expand Down
Loading