changeset 17203:92d4889c9b57

8172510: This test fails for me on OS X consistently with result: Expected : 01230123 Actual : 001122303011223 Reviewed-by: serb, prr Contributed-by: manajit.halder@oracle.com
author mhalder
date Tue, 06 Jun 2017 14:38:19 +0530
parents e7ede182f86f
children ed1e99c1bba2
files test/java/awt/List/ItemEventTest/ItemEventTest.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/awt/List/ItemEventTest/ItemEventTest.java	Tue Jun 06 11:56:01 2017 +0530
+++ b/test/java/awt/List/ItemEventTest/ItemEventTest.java	Tue Jun 06 14:38:19 2017 +0530
@@ -24,7 +24,7 @@
 /*
  * @test
  * @key headful
- * @bug 8033936
+ * @bug 8033936 8172510
  * @summary Verify that correct ItemEvent is received while selection &
  *          deselection of multi select List items.
  */
@@ -109,14 +109,16 @@
         boolean isMac = osName.contains("Mac") || osName.contains("mac");
         if(isMac) {
             robot.keyPress(KeyEvent.VK_META);
+            robot.waitForIdle();
         }
 
         // First loop to select & Second loop to deselect the list items.
         for (int j = 0; j < 2; ++j) {
             for (int i = 0; i < list.getItemCount(); ++i) {
                 robot.mouseMove(loc.x, loc.y + i * dY);
+                robot.waitForIdle();
                 robot.mousePress(InputEvent.BUTTON1_MASK);
-                robot.delay(100);
+                robot.waitForIdle();
                 robot.mouseRelease(InputEvent.BUTTON1_MASK);
                 robot.waitForIdle();
             }