8225105: java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java fails in Windows 10
Reviewed-by: prr, serb
--- a/test/jdk/java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java Mon Jun 03 11:06:24 2019 +0530
+++ b/test/jdk/java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java Mon Jun 03 11:56:48 2019 +0530
@@ -66,7 +66,7 @@
public void start() {
showButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- testToplevel.setVisible(true);
+ Util.showWindowWait(testToplevel);
}
});
nofocusFrame.add(showButton);
@@ -98,10 +98,12 @@
switch (stage) {
case 1:
- toplevel.setVisible(true);
+ Util.showWindowWait(toplevel);
break;
case 2:
testToplevel = toplevel;
+ Util.showWindowWait(nofocusFrame);
+ Util.waitForIdle(robot);
Util.clickOnComp(showButton, robot);
break;
}