8225105: java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java fails in Windows 10
authorjdv
Mon, 03 Jun 2019 11:56:48 +0530
changeset 55194 4cfbcfac47aa
parent 55193 5f9ef936707c
child 55195 8b8d83cf9097
child 55359 ef91ba2e6cff
8225105: java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java fails in Windows 10 Reviewed-by: prr, serb
test/jdk/java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java
--- a/test/jdk/java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java	Mon Jun 03 11:06:24 2019 +0530
+++ b/test/jdk/java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java	Mon Jun 03 11:56:48 2019 +0530
@@ -66,7 +66,7 @@
     public void start() {
         showButton.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
-                testToplevel.setVisible(true);
+                Util.showWindowWait(testToplevel);
             }
         });
         nofocusFrame.add(showButton);
@@ -98,10 +98,12 @@
 
         switch (stage) {
             case 1:
-                toplevel.setVisible(true);
+                Util.showWindowWait(toplevel);
                 break;
             case 2:
                 testToplevel = toplevel;
+                Util.showWindowWait(nofocusFrame);
+                Util.waitForIdle(robot);
                 Util.clickOnComp(showButton, robot);
                 break;
         }