Skip to content

Commit 521ed72

Browse files
committedDec 4, 2024
8345357: test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java fails in ubuntu22.04
Reviewed-by: abhiscxk
1 parent 447f8d4 commit 521ed72

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed
 

‎test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
2828
* @summary Incorrect radio button behavior when pressing tab key
2929
* @run main bug8033699
3030
*/
31+
3132
import java.awt.KeyboardFocusManager;
3233
import java.awt.Robot;
3334
import java.awt.event.ActionListener;
@@ -57,42 +58,50 @@ public class bug8033699 {
5758

5859
public static void main(String[] args) throws Throwable {
5960
SwingUtilities.invokeAndWait(() -> {
60-
changeLAF();
61-
createAndShowGUI();
61+
changeLAF();
62+
createAndShowGUI();
6263
});
6364

6465
robot = new Robot();
65-
Thread.sleep(100);
66-
robot.waitForIdle();
67-
6866
robot.setAutoDelay(100);
67+
robot.waitForIdle();
68+
robot.delay(1000);
6969

7070
// tab key test grouped radio button
7171
runTest1();
72+
robot.delay(100);
7273

7374
// tab key test non-grouped radio button
7475
runTest2();
76+
robot.delay(100);
7577

7678
// shift tab key test grouped and non-grouped radio button
7779
runTest3();
80+
robot.delay(100);
7881

7982
// left/up key test in grouped radio button
8083
runTest4();
84+
robot.delay(100);
8185

8286
// down/right key test in grouped radio button
8387
runTest5();
88+
robot.delay(100);
8489

8590
// tab from radio button in group to next component in the middle of button group layout
8691
runTest6();
92+
robot.delay(100);
8793

8894
// tab to radio button in group from component in the middle of button group layout
8995
runTest7();
96+
robot.delay(100);
9097

9198
// down key circle back to first button in grouped radio button
9299
runTest8();
100+
robot.delay(100);
93101

94102
// Verify that ActionListener is called when a RadioButton is selected using arrow key.
95103
runTest9();
104+
robot.delay(100);
96105

97106
SwingUtilities.invokeAndWait(() -> mainFrame.dispose());
98107
}

0 commit comments

Comments
 (0)
Please sign in to comment.