mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-08 17:41:41 +01:00
JBR-4456: fixed HandleJSQueryTest
first invocation of dispatch(WindowEvent.WINDOW_CLOSING) calls System.exit() internally (because of setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE))
(cherry picked from commit 0f9afa7fbc)
This commit is contained in:
committed by
Vitaly Provodin
parent
7b00601b71
commit
2e63a6d07a
@@ -42,11 +42,11 @@ public class HandleJSQueryTest {
|
||||
}
|
||||
System.out.println("Test PASSED");
|
||||
} finally {
|
||||
firstBrowser.getBrowser().dispose();
|
||||
secondBrowser.getBrowser().dispose();
|
||||
System.out.println("Close all windows");
|
||||
SwingUtilities.invokeAndWait(() -> firstBrowser.dispatchEvent(new WindowEvent(firstBrowser, WindowEvent.WINDOW_CLOSING)));
|
||||
SwingUtilities.invokeAndWait(() -> secondBrowser.dispatchEvent(new WindowEvent(secondBrowser, WindowEvent.WINDOW_CLOSING)));
|
||||
System.out.println("Dispose CefApp");
|
||||
JBCefApp.getInstance().getCefApp().dispose();
|
||||
SwingUtilities.invokeAndWait(firstBrowser::dispose);
|
||||
SwingUtilities.invokeAndWait(secondBrowser::dispose);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user