changeset 56566:8cddb14bb234

8224830: test/jdk/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java fails on linux-x64 Reviewed-by: jdv
author psadhukhan
date Tue, 28 May 2019 16:35:47 +0530
parents 4929c53ff29d
children f11d2e10a6e4
files test/jdk/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java	Mon May 27 12:24:26 2019 -0700
+++ b/test/jdk/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java	Tue May 28 16:35:47 2019 +0530
@@ -113,7 +113,9 @@
         } else {
             robot.mouseMove(p.x + (int)(d.getWidth()/2), p.y + (int)(d.getHeight()/2));
         }
+        waitForIdle();
         robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.delay(50);
         robot.mouseRelease(InputEvent.BUTTON1_MASK);
         waitForIdle();
     }
@@ -121,8 +123,9 @@
         while (true) {
             try {
                 Thread.sleep(100);
-                c.getLocationOnScreen();
-                break;
+                Point p = c.getLocationOnScreen();
+                if (p != null)
+                    break;
             } catch (InterruptedException e) {
                 throw new RuntimeException(e);
             } catch (IllegalComponentStateException e) {}