--- old/test/java/awt/List/ItemEventTest/ItemEventTest.java 2017-06-01 17:04:59.000000000 +0530 +++ new/test/java/awt/List/ItemEventTest/ItemEventTest.java 2017-06-01 17:04:59.000000000 +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. */ @@ -70,6 +70,7 @@ pack(); setVisible(true); robot.waitForIdle(); + } @Override @@ -109,14 +110,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(); }