Skip to content

Commit 25fffcc

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 9aa7973 commit 25fffcc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,13 @@ public Test_org_eclipse_swt_browser_Browser(int swtBrowserSettings) {
160160

161161
@BeforeClass
162162
public static void setupEdgeEnvironment() {
163-
// initialize Edge environment before any test runs to isolate environment setup
163+
// Initialize Edge environment before any test runs to isolate environment setup
164+
// as this takes quite long in GitHub Actions builds
164165
if (SwtTestUtil.isWindows) {
165166
Shell shell = new Shell();
166-
new Browser(shell, SWT.EDGE);
167+
Browser firstBrowser = new Browser(shell, SWT.EDGE);
168+
// Ensure browser is initialized by calling blocking method
169+
firstBrowser.getUrl();
167170
shell.dispose();
168171
}
169172
}

0 commit comments

Comments
 (0)