8224830: test/jdk/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java fails on linux-x64
Reviewed-by: jdv
--- 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) {}