< prev index next >

test/java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java

Print this page

        

@@ -74,11 +74,11 @@
         robot.mouseMove(point.x, point.y);
         robot.waitForIdle();
 
         mouseDragAndDrop(robot, point, getCenterPoint(targetFrame));
 
-        long time = System.currentTimeMillis() + 200;
+        long time = System.currentTimeMillis() + 1000;
 
         while (!passed) {
             if (time < System.currentTimeMillis()) {
                 sourceFrame.dispose();
                 targetFrame.dispose();

@@ -220,14 +220,16 @@
                 if (time < System.currentTimeMillis()) {
                     throw new RuntimeException("Dialog is not visible!");
                 }
                 Thread.sleep(10);
             }
-
-            Point point = getCenterPoint(dialog);
             Robot robot = new Robot();
             robot.setAutoDelay(50);
+            robot.waitForIdle();
+            robot.delay(200);
+
+            Point point = getCenterPoint(dialog);
 
             robot.mouseMove(point.x, point.y);
             robot.mousePress(InputEvent.BUTTON1_MASK);
             robot.mouseRelease(InputEvent.BUTTON1_MASK);
 
< prev index next >