Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8233637: [TESTBUG] Swing ActionListenerCalledTwiceTest.java fails on macos #926

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Expand Up @@ -791,7 +791,6 @@ javax/swing/JRadioButton/ButtonGroupFocus/ButtonGroupFocusTest.java 8233555 maco
javax/swing/JRadioButton/8075609/bug8075609.java 8233555 macosx-all
javax/swing/JRadioButton/8033699/bug8033699.java 8233555 macosx-all
javax/swing/JPopupMenu/4634626/bug4634626.java 8017175 macosx-all
javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 8233637 macosx-all
javax/swing/JMenuItem/6249972/bug6249972.java 8233640 macosx-all
javax/swing/JMenuItem/4171437/bug4171437.java 8233641 macosx-all

Expand Down
Expand Up @@ -63,13 +63,15 @@ public static void main(String[] args) throws Exception {
}

try {
Robot robot = new Robot();
robot.setAutoDelay(100);

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

Robot robot = new Robot();
robot.setAutoDelay(100);
robot.waitForIdle();
robot.delay(1000);

testForTwice(robot, "");

Expand Down Expand Up @@ -99,6 +101,7 @@ private static void createAndShowGUI() {
frame.setJMenuBar(bar);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}

Expand Down