--- a/jdk/test/javax/swing/JPopupMenu/4458079/bug4458079.java Wed Nov 19 16:42:19 2014 +0400
+++ b/jdk/test/javax/swing/JPopupMenu/4458079/bug4458079.java Fri Nov 21 16:11:03 2014 +0300
@@ -35,7 +35,6 @@
import javax.swing.event.*;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
-import sun.awt.SunToolkit;
public class bug4458079 extends JFrame implements PopupMenuListener {
public JMenu menu;
@@ -47,21 +46,20 @@
new bug4458079().createAndShowGUI();
}
});
- SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
- toolkit.realSync();
+ Robot robot = new Robot();
+ robot.waitForIdle();
- Robot robot = new Robot();
robot.setAutoDelay(50);
Util.hitMnemonics(robot, KeyEvent.VK_M);
- toolkit.realSync();
+ robot.waitForIdle();
Thread.sleep(1000);
Util.hitKeys(robot, KeyEvent.VK_DOWN);
Util.hitKeys(robot, KeyEvent.VK_ENTER);
- toolkit.realSync();
+ robot.waitForIdle();
Thread.sleep(1000);
if (!itemASelected) {