Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8233641: [TESTBUG] JMenuItem test bug4171437.java fails on macos
Backport-of: e97809d
  • Loading branch information
RealCLanger committed Nov 6, 2021
1 parent ca35b75 commit 8dc5f14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Expand Up @@ -765,7 +765,6 @@ javax/swing/JRootPane/4670486/bug4670486.java 8042381 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
javax/swing/plaf/synth/7158712/bug7158712.java 8238720 windows-all
javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java 8238720 windows-all
javax/swing/plaf/basic/BasicComboPopup/7072653/bug7072653.java 8238720 windows-all
Expand Down
7 changes: 4 additions & 3 deletions test/jdk/javax/swing/JMenuItem/4171437/bug4171437.java
Expand Up @@ -44,21 +44,21 @@ public class bug4171437 {

public static void main(String[] args) throws Exception {
try {
Robot robot = new Robot();
robot.setAutoDelay(100);
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
createAndShowGUI();
}
});

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

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

robot.waitForIdle();
Thread.sleep(1000);

if (!closeActivated || customActivated) {
throw new RuntimeException("Didn't pass the muster");
Expand Down Expand Up @@ -109,6 +109,7 @@ public void menuCanceled(MenuEvent e) {}
frame.setSize(300, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
}

1 comment on commit 8dc5f14

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.