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

Reviewed-by: serb
This commit is contained in:
Prasanta Sadhukhan 2020-10-28 06:32:29 +00:00
parent a804c6a6ef
commit 4acf634d05
2 changed files with 4 additions and 3 deletions

View File

@ -806,7 +806,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

View File

@ -50,6 +50,7 @@ public class bug4692443 {
pass = new PassedListener();
passed = false;
Robot robo = new Robot();
robo.setAutoDelay(100);
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
@ -58,9 +59,9 @@ public class bug4692443 {
});
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 class bug4692443 {
}
}
private static void createAndShowGUI() {
mainFrame = new JFrame("Bug 4692443");
JMenuBar mbar = new JMenuBar();
@ -109,7 +111,7 @@ public class bug4692443 {
mainFrame.setJMenuBar(mbar);
mainFrame.setSize(200, 200);
mainFrame.setLocation(200, 200);
mainFrame.setLocationRelativeTo(null);
mainFrame.setVisible(true);
mainFrame.toFront();
}