8242526: PIT: javax/swing/JInternalFrame/8020708/bug8020708.java fails in mach5 ubuntu system

8233644: [TESTBUG] JInternalFrame test bug8020708.java is failing on macos

Reviewed-by: serb, pbansal, jdv
This commit is contained in:
Prasanta Sadhukhan 2020-04-17 11:29:01 +05:30
parent 12d93f11c0
commit 8b002d881d
2 changed files with 9 additions and 9 deletions
test/jdk
ProblemList.txt
javax/swing/JInternalFrame/8020708

@ -883,7 +883,6 @@ javax/swing/JMenuItem/4171437/bug4171437.java 8233641 macosx-all
javax/swing/JMenuBar/4750590/bug4750590.java 8233642 macosx-all
javax/swing/JMenu/4692443/bug4692443.java 8171998 macosx-all
javax/swing/JMenu/4515762/bug4515762.java 8233643 macosx-all
javax/swing/JInternalFrame/8020708/bug8020708.java 8233644 macosx-all
javax/swing/JColorChooser/Test8051548.java 8233647 macosx-all
javax/swing/plaf/synth/7158712/bug7158712.java 8238720 windows-all
javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java 8238720 windows-all

@ -73,14 +73,15 @@ public class bug8020708 {
if (!installLookAndFeel(laf)) {
continue;
}
testInternalFrameMnemonic();
testInternalFrameMnemonic(locale);
}
}
}
static void testInternalFrameMnemonic() throws Exception {
static void testInternalFrameMnemonic(Locale locale) throws Exception {
Robot robot = new Robot();
robot.setAutoDelay(50);
robot.setAutoDelay(250);
robot.setAutoWaitForIdle(true);
SwingUtilities.invokeAndWait(new Runnable() {
@Override
@ -110,10 +111,11 @@ public class bug8020708 {
robot.mouseMove(clickPoint.x, clickPoint.y);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
robot.waitForIdle();
robot.delay(500);
Util.hitKeys(robot, KeyEvent.VK_SHIFT, KeyEvent.VK_ESCAPE);
robot.waitForIdle();
robot.delay(500);
int keyCode = KeyEvent.VK_C;
String mnemonic = UIManager
.getString("InternalFrameTitlePane.closeButton.mnemonic");
@ -121,15 +123,14 @@ public class bug8020708 {
keyCode = Integer.parseInt(mnemonic);
} catch (NumberFormatException e) {
}
System.out.println("keyCode " + keyCode);
Util.hitKeys(robot, keyCode);
robot.waitForIdle();
robot.delay(500);
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
if (internalFrame.isVisible()) {
throw new RuntimeException("Close mnemonic does not work in "+UIManager.getLookAndFeel());
throw new RuntimeException("Close mnemonic does not work in "+UIManager.getLookAndFeel() + " for locale " + locale);
}
frame.dispose();
}