Skip to content

Commit

Permalink
JBR-5751 java/awt/Focus/RowToleranceTransitivityTest.java: Focus got …
Browse files Browse the repository at this point in the history
…stuck while traversing.
  • Loading branch information
JB-Dmitry authored and vprovodin committed Aug 30, 2024
1 parent e3d8d95 commit 0c840a5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test/jdk/java/awt/Focus/RowToleranceTransitivityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,12 @@ public void focusGained(FocusEvent e) {
static void test() throws Exception {
robot.delay(500);

// Set focus on the first component to start traversal
if (!setFocusOn(ft, new Runnable() {
public void run() {
clickOn(ft);
}
})) {
System.out.println("Couldn't set focus on " + ft);
throw new RuntimeException("Test couldn't be performed.");
clickOn(ft);

robot.delay(500);

if (KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner() != ft) {
throw new RuntimeException("Cannot set initial focus");
}

robot.delay(500);
Expand Down

0 comments on commit 0c840a5

Please sign in to comment.