changeset 58977:4a0330be9a84

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
author psadhukhan
date Fri, 17 Apr 2020 11:29:01 +0530
parents 27fd8ff9d6ea
children d5d7e0df08d2
files test/jdk/ProblemList.txt test/jdk/javax/swing/JInternalFrame/8020708/bug8020708.java
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/ProblemList.txt	Fri Apr 17 11:10:45 2020 +0530
+++ b/test/jdk/ProblemList.txt	Fri Apr 17 11:29:01 2020 +0530
@@ -883,7 +883,6 @@
 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
--- a/test/jdk/javax/swing/JInternalFrame/8020708/bug8020708.java	Fri Apr 17 11:10:45 2020 +0530
+++ b/test/jdk/javax/swing/JInternalFrame/8020708/bug8020708.java	Fri Apr 17 11:29:01 2020 +0530
@@ -73,14 +73,15 @@
                 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 @@
         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 @@
             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();
             }