Skip to content

Commit e97809d

Browse files
committedNov 2, 2020
8233641: [TESTBUG] JMenuItem test bug4171437.java fails on macos
Reviewed-by: jdv
1 parent 69f5235 commit e97809d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎test/jdk/ProblemList.txt

-1
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,6 @@ javax/swing/JRadioButton/8033699/bug8033699.java 8233555 macosx-all
788788
javax/swing/JPopupMenu/4634626/bug4634626.java 8017175 macosx-all
789789
javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 8233637 macosx-all
790790
javax/swing/JMenuItem/6249972/bug6249972.java 8233640 macosx-all
791-
javax/swing/JMenuItem/4171437/bug4171437.java 8233641 macosx-all
792791

793792
sanity/client/SwingSet/src/ToolTipDemoTest.java 8225012 windows-all,macosx-all
794793
sanity/client/SwingSet/src/ScrollPaneDemoTest.java 8225013 linux-all

‎test/jdk/javax/swing/JMenuItem/4171437/bug4171437.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,21 @@ public class bug4171437 {
4444

4545
public static void main(String[] args) throws Exception {
4646
try {
47+
Robot robot = new Robot();
48+
robot.setAutoDelay(100);
4749
SwingUtilities.invokeAndWait(new Runnable() {
4850
public void run() {
4951
createAndShowGUI();
5052
}
5153
});
5254

53-
Robot robot = new Robot();
54-
robot.setAutoDelay(50);
5555
robot.waitForIdle();
56+
robot.delay(1000);
5657

5758
Util.hitMnemonics(robot, KeyEvent.VK_F);
5859
Util.hitKeys(robot, KeyEvent.VK_C);
5960

6061
robot.waitForIdle();
61-
Thread.sleep(1000);
6262

6363
if (!closeActivated || customActivated) {
6464
throw new RuntimeException("Didn't pass the muster");
@@ -109,6 +109,7 @@ public void menuCanceled(MenuEvent e) {}
109109
frame.setSize(300, 300);
110110
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
111111
frame.pack();
112+
frame.setLocationRelativeTo(null);
112113
frame.setVisible(true);
113114
}
114115
}

0 commit comments

Comments
 (0)
Please sign in to comment.