test: unflake TestPageClock (#1699)

This commit is contained in:
Yury Semikhatsky 2024-11-15 14:38:02 -08:00 committed by GitHub
parent d2d78a7299
commit 29f58a5840
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -290,8 +290,9 @@ public class TestPageClock {
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
@ -310,6 +311,7 @@ public class TestPageClock {
Page popup = page.waitForPopup(() -> {
page.evaluate("url => window.open(url)", server.PREFIX + "/popup.html");
});
popup.waitForURL(server.PREFIX + "/popup.html");
Object popupTime = popup.evaluate("time");
assertEquals(1000, popupTime);
}