mirror of
https://github.com/microsoft/playwright-java.git
synced 2025-09-08 21:01:00 +00:00
fix: unflake exposeBindingHandleShouldNotThrowDuringNavigation (#37)
This commit is contained in:
parent
5f578aae41
commit
f9fc50b6de
@ -187,15 +187,19 @@ public class PageImpl extends ChannelOwner implements Page {
|
||||
|
||||
@Override
|
||||
public void addListener(EventType type, Listener<EventType> listener) {
|
||||
if (type == EventType.FILECHOOSER) {
|
||||
willAddFileChooserListener();
|
||||
}
|
||||
listeners.add(type, listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeListener(EventType type, Listener<EventType> listener) {
|
||||
listeners.remove(type, listener);
|
||||
if (type == EventType.FILECHOOSER) {
|
||||
didRemoveFileChooserListener();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close(CloseOptions options) {
|
||||
|
@ -47,6 +47,12 @@ public class TestBase {
|
||||
headful = false;
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
static void closeBrowser() {
|
||||
browser.close();
|
||||
browser = null;
|
||||
}
|
||||
|
||||
@BeforeAll
|
||||
static void startServer() throws IOException {
|
||||
server = Server.createHttp(8907);
|
||||
@ -55,7 +61,6 @@ public class TestBase {
|
||||
|
||||
@AfterAll
|
||||
static void stopServer() throws IOException {
|
||||
browser.close();
|
||||
server.stop();
|
||||
server = null;
|
||||
httpsServer.stop();
|
||||
@ -63,7 +68,7 @@ public class TestBase {
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
void createContextAndPage() {
|
||||
server.reset();
|
||||
httpsServer.reset();
|
||||
context = browser.newContext();
|
||||
@ -71,7 +76,7 @@ public class TestBase {
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void tearDown() {
|
||||
void closeContext() {
|
||||
context.close();
|
||||
context = null;
|
||||
page = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user