Looks fine.

On 3/18/20 6:25 am, Prasanta Sadhukhan wrote:
Hi All,

Please review a fix for an issue where this test fails in ubuntu citing " Close 
mnemonic does not work in [The CDE/Motif Look and Feel - 
com.sun.java.swing.plaf.motif.MotifLookAndFeel]"

Issue was in the test where subsequent frame with JInternalFrame were created 
almost instantaneously after the previous frame's mnemonic was tested. Added a 
delay and also make sure the frame is created in middle and decorations off to 
prevent any false clicks at wrong locations since the mouse needs to be moved 
to the menu for opening the menu which might overlap with ubuntu's top menubar.

Testing on ubuntu 16, 18.04 and 19.10, windows and mac is green.

diff -r 889b4191879c test/jdk/javax/swing/JInternalFrame/8020708/bug8020708.java
--- a/test/jdk/javax/swing/JInternalFrame/8020708/bug8020708.java Mon Mar 16 
12:49:08 2020 +0530
+++ b/test/jdk/javax/swing/JInternalFrame/8020708/bug8020708.java Wed Mar 18 
18:43:37 2020 +0530
@@ -57,6 +57,7 @@
          new Locale("sv"),
          new Locale("zh", "CN"),
      };
      private static final String[] LOOK_AND_FEELS = {
          "Nimbus",
@@ -87,6 +88,8 @@
              public void run() {
                  frame = new JFrame("Test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+               frame.setUndecorated(true);
+               frame.setLocationRelativeTo(null);
                  frame.setSize(300, 200);

                  JDesktopPane desktop = new JDesktopPane();
@@ -132,6 +135,7 @@
                  frame.dispose();
              }
          });
+       robot.delay(500);

      }
Regards
Prasanta


--
Best regards, Sergey.

Reply via email to