Skip to content

Commit 98c91b6

Browse files
committed
8233637: [TESTBUG] Swing ActionListenerCalledTwiceTest.java fails on macos
Reviewed-by: jdv
1 parent e97809d commit 98c91b6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

test/jdk/ProblemList.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,6 @@ javax/swing/JRadioButton/ButtonGroupFocus/ButtonGroupFocusTest.java 8233555 maco
786786
javax/swing/JRadioButton/8075609/bug8075609.java 8233555 macosx-all
787787
javax/swing/JRadioButton/8033699/bug8033699.java 8233555 macosx-all
788788
javax/swing/JPopupMenu/4634626/bug4634626.java 8017175 macosx-all
789-
javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 8233637 macosx-all
790789
javax/swing/JMenuItem/6249972/bug6249972.java 8233640 macosx-all
791790

792791
sanity/client/SwingSet/src/ToolTipDemoTest.java 8225012 windows-all,macosx-all

test/jdk/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@ public static void main(String[] args) throws Exception {
6363
}
6464

6565
try {
66+
Robot robot = new Robot();
67+
robot.setAutoDelay(100);
6668

6769
System.setProperty("apple.laf.useScreenMenuBar", "true");
6870
SwingUtilities.invokeAndWait(
6971
ActionListenerCalledTwiceTest::createAndShowGUI);
7072

71-
Robot robot = new Robot();
72-
robot.setAutoDelay(100);
73+
robot.waitForIdle();
74+
robot.delay(1000);
7375

7476
testForTwice(robot, "");
7577

@@ -99,6 +101,7 @@ private static void createAndShowGUI() {
99101
frame.setJMenuBar(bar);
100102
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
101103
frame.pack();
104+
frame.setLocationRelativeTo(null);
102105
frame.setVisible(true);
103106
}
104107

0 commit comments

Comments
 (0)