Skip to content

Commit e4a4d28

Browse files
committed
Browser Tests: Try to stabilize test_TabTraversalOutOfBrowser
1 parent 603eecd commit e4a4d28

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2638,8 +2638,7 @@ public void completed(ProgressEvent event) {
26382638
browser2.dispose();
26392639
}
26402640

2641-
//@Test
2642-
// FIXME This test should at least work for Edge on Windows.
2641+
@Test
26432642
public void test_TabTraversalOutOfBrowser() {
26442643
assumeFalse("Not currently working on macOS, see https://github.com/eclipse-platform/eclipse.platform.swt/issues/1644", SwtTestUtil.isCocoa);
26452644
assumeFalse("Not currently working on Linux, see https://github.com/eclipse-platform/eclipse.platform.swt/issues/1644", SwtTestUtil.isGTK);
@@ -2665,6 +2664,8 @@ public void test_TabTraversalOutOfBrowser() {
26652664
// send tab key via low-level event -> focus should move to Text control
26662665
AtomicBoolean textGainedFocus = new AtomicBoolean(false);
26672666
text.addFocusListener(FocusListener.focusGainedAdapter(e -> textGainedFocus.set(true)));
2667+
// make sure the browser's shell is active
2668+
browser.getShell().forceActive();
26682669
Event event = new Event();
26692670
event.type = SWT.KeyDown;
26702671
event.keyCode = SWT.TAB;

0 commit comments

Comments
 (0)