8161473: [TEST_BUG] [macosx] add autodelay to java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java
Reviewed-by: arapte, serb
Contributed-by: anubhav.meena@oracle.com
--- a/jdk/test/java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java Mon Oct 17 13:04:33 2016 +0530
+++ b/jdk/test/java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java Mon Oct 17 13:20:04 2016 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,11 @@
* questions.
*/
-import java.awt.*;
+import java.awt.EventQueue;
+import java.awt.Image;
+import java.awt.Point;
+import java.awt.SystemTray;
+import java.awt.TrayIcon;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
@@ -31,9 +35,10 @@
/*
* @test
+ * @bug 8161473
+ * @key headful
* @summary Check if MouseEvent has the proper modifiers when
* TrayIcon is clicked pressing the modifier keys
- * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
* @library /java/awt/patchlib
* @library ../../../../lib/testlibrary ../
* @build java.desktop/java.awt.Helper
@@ -213,6 +218,7 @@
mousePressed = false;
robot.keyPress(keyTypes[j]);
+ robot.waitForIdle();
robot.mousePress(buttonTypes[i]);
if (! mousePressed) {