8196094: javax/swing/JFileChooser/8002077/bug8002077.java fails

Reviewed-by: psadhukhan
This commit is contained in:
Pankaj Bansal 2020-06-01 23:06:02 +05:30
parent d616488567
commit e97c5f41ee
2 changed files with 5 additions and 1 deletions

View File

@ -755,7 +755,6 @@ javax/swing/JComboBox/8032878/bug8032878.java 8196092,8196439 windows-all,macosx
javax/swing/JComboBox/8072767/bug8072767.java 8196093 windows-all,macosx-all
javax/swing/JComponent/4337267/bug4337267.java 8146451 windows-all
javax/swing/JFileChooser/4524490/bug4524490.java 8042380 generic-all
javax/swing/JFileChooser/8002077/bug8002077.java 8196094 windows-all,macosx-all
javax/swing/JFileChooser/6396844/TwentyThousandTest.java 8198003 generic-all
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java 8193942 generic-all
javax/swing/JList/6462008/bug6462008.java 7156347 generic-all

View File

@ -61,20 +61,25 @@ public class bug8002077 {
SwingUtilities.invokeLater(() ->
fileChooserState = new JFileChooser().showSaveDialog(null));
robot.waitForIdle();
robot.delay(100);
Util.hitMnemonics(robot, KeyEvent.VK_N);
robot.waitForIdle();
robot.delay(100);
Util.hitKeys(robot, KeyEvent.VK_A);
robot.waitForIdle();
robot.delay(100);
Util.hitMnemonics(robot, KeyEvent.VK_S);
robot.waitForIdle();
robot.delay(100);
if (fileChooserState != JFileChooser.APPROVE_OPTION) {
// Close the dialog
Util.hitKeys(robot, KeyEvent.VK_ESCAPE);
robot.waitForIdle();
robot.delay(100);
throw new RuntimeException("Save button is not pressed!");
}