changeset 55194:4cfbcfac47aa

8225105: java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java fails in Windows 10 Reviewed-by: prr, serb
author jdv
date Mon, 03 Jun 2019 11:56:48 +0530
parents 5f9ef936707c
children 8b8d83cf9097 ef91ba2e6cff
files test/jdk/java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
         }