Skip to content

Commit 4a201e2

Browse files
committed
[Win32] Correct WebView environment initialization in Edge browser tests
The browser tests contain a setup method that, on Windows, creates an Edge browser before any test is executed in order to set up the WebView environment. Since the first Edge browser instantiation takes rather long at least in the GitHub actions test environment, the initialization is extended to wait for the browser being initialized.
1 parent bd3357c commit 4a201e2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,15 @@ public Test_org_eclipse_swt_browser_Browser(int swtBrowserSettings) {
165165

166166
@BeforeClass
167167
public static void setupEdgeEnvironment() {
168-
// initialize Edge environment before any test runs to isolate environment setup
168+
// Initialize Edge environment before any test runs to isolate environment setup
169+
// as this takes quite long in GitHub Actions builds
169170
if (SwtTestUtil.isWindows) {
170171
Shell shell = new Shell();
171-
new Browser(shell, SWT.EDGE);
172+
Browser firstBrowser = new Browser(shell, SWT.EDGE);
173+
// Ensure browser is initialized by calling blocking method
174+
firstBrowser.getUrl();
172175
shell.dispose();
176+
processUiEvents();
173177
}
174178
}
175179

0 commit comments

Comments
 (0)