8224830: test/jdk/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java fails on linux-x64

Reviewed-by: jdv
This commit is contained in:
Prasanta Sadhukhan 2019-05-28 16:35:47 +05:30
parent d655301d49
commit 15acb9faf7

View File

@ -113,7 +113,9 @@ public class ModalExcludedWindowClickTest {
} 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 @@ public class ModalExcludedWindowClickTest {
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) {}