8234332: [TESTBUG] java/awt/Focus/DisposedWindow/DisposeDialogNotActivateOwnerTest/DisposeDialogNotActivateOwnerTest.java fails on linux-x64 nightly
authorpsadhukhan
Wed, 20 Nov 2019 11:29:27 +0530
changeset 59194 10385df5d986
parent 59193 b83adf4bd4ee
child 59195 b9bde9d224b9
8234332: [TESTBUG] java/awt/Focus/DisposedWindow/DisposeDialogNotActivateOwnerTest/DisposeDialogNotActivateOwnerTest.java fails on linux-x64 nightly Reviewed-by: serb
test/jdk/java/awt/Focus/DisposedWindow/DisposeDialogNotActivateOwnerTest/DisposeDialogNotActivateOwnerTest.java
--- a/test/jdk/java/awt/Focus/DisposedWindow/DisposeDialogNotActivateOwnerTest/DisposeDialogNotActivateOwnerTest.java	Wed Nov 20 10:52:28 2019 +0530
+++ b/test/jdk/java/awt/Focus/DisposedWindow/DisposeDialogNotActivateOwnerTest/DisposeDialogNotActivateOwnerTest.java	Wed Nov 20 11:29:27 2019 +0530
@@ -62,6 +62,7 @@
             throw new RuntimeException("Error: unable to create robot");
         }
 
+        robot.setAutoDelay(200);
         dialogInvisibleOwner = new Frame("Dialog Invisible Owner Frame");
         dialog = new Dialog(dialogInvisibleOwner, "Owned Dialog");
 
@@ -79,8 +80,10 @@
 
     public void performTest() {
         frame.setVisible(true);
+        robot.delay(200);
         robot.waitForIdle();
         clickOnTitle(frame);
+        robot.delay(200);
         robot.waitForIdle();
         robot.delay(200);
         if (!frame.isFocused()) {
@@ -89,6 +92,7 @@
         }
 
         dialog.setVisible(true);
+        robot.delay(200);
         robot.waitForIdle();
         robot.delay(200);
         if (!dialog.isFocused()) {
@@ -118,7 +122,6 @@
         robot.mouseMove(p.x + (int)(d.getWidth() / 2),
                         p.y + ((Frame)c).getInsets().top / 2);
         robot.mousePress(InputEvent.BUTTON1_MASK);
-        robot.delay(20);
         robot.mouseRelease(InputEvent.BUTTON1_MASK);
     }
 }