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

8171998: javax/swing/JMenu/4692443/bug4692443.java fails on Windows #873

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Original file line number Diff line number Diff line change
@@ -805,7 +805,6 @@ javax/swing/JPopupMenu/4458079/bug4458079.java 8233556 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/JMenu/4692443/bug4692443.java 8171998 macosx-all

sanity/client/SwingSet/src/ToolTipDemoTest.java 8225012 windows-all,macosx-all
sanity/client/SwingSet/src/ScrollPaneDemoTest.java 8225013 linux-all
6 changes: 4 additions & 2 deletions test/jdk/javax/swing/JMenu/4692443/bug4692443.java
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@ public static void main(String args[]) throws Throwable {
pass = new PassedListener();
passed = false;
Robot robo = new Robot();
robo.setAutoDelay(100);

SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
@@ -58,9 +59,9 @@ public void run() {
});

robo.waitForIdle();
robo.delay(1000);

int altKey = java.awt.event.KeyEvent.VK_ALT;
robo.setAutoDelay(100);
Util.hitMnemonics(robo, KeyEvent.VK_F); // Enter File menu
robo.keyPress(KeyEvent.VK_S); // Enter submenu
robo.keyRelease(KeyEvent.VK_S);
@@ -79,6 +80,7 @@ public void run() {
}
}


private static void createAndShowGUI() {
mainFrame = new JFrame("Bug 4692443");
JMenuBar mbar = new JMenuBar();
@@ -109,7 +111,7 @@ public void menuCanceled(MenuEvent e) {
mainFrame.setJMenuBar(mbar);

mainFrame.setSize(200, 200);
mainFrame.setLocation(200, 200);
mainFrame.setLocationRelativeTo(null);
mainFrame.setVisible(true);
mainFrame.toFront();
}