aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Prasanta Sadhukhan <psadhukhan@openjdk.org> 2021-04-15 09:55:29 +0000
committerGravatar Prasanta Sadhukhan <psadhukhan@openjdk.org> 2021-04-15 09:55:29 +0000
commit2b5869ad09e8f34277a4c965abbaed3f79fc5b59 (patch)
tree084101238d810be4901a96fabd4e1d464fab5d2c
parentbba16f61bb52c31fead723fdc0e28e40a78ec493 (diff)
downloadjdk-2b5869ad09e8f34277a4c965abbaed3f79fc5b59.tar.gz
jdk-2b5869ad09e8f34277a4c965abbaed3f79fc5b59.zip
8233565: [TESTBUG] NullModalityDialogTest.java fails on MacOS
Reviewed-by: jdv
-rw-r--r--test/jdk/ProblemList.txt1
-rw-r--r--test/jdk/java/awt/Modal/NullModalityDialogTest/NullModalityDialogTest.java9
2 files changed, 6 insertions, 4 deletions
diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt
index 3f930cbad38..acf221b5ae1 100644
--- a/test/jdk/ProblemList.txt
+++ b/test/jdk/ProblemList.txt
@@ -518,7 +518,6 @@ java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java 7099223 linux-all,windows
java/awt/Window/WindowResizing/DoubleClickTitleBarTest.java 8233557 macosx-all
java/awt/Window/WindowOwnedByEmbeddedFrameTest/WindowOwnedByEmbeddedFrameTest.java 8233558 macosx-all
java/awt/Mouse/MouseComboBoxTest/MouseComboBoxTest.java 8233564 macosx-all
-java/awt/Modal/NullModalityDialogTest/NullModalityDialogTest.java 8233565 macosx-all
java/awt/keyboard/AllKeyCode/AllKeyCode.java 8242930 macosx-all
java/awt/FullScreen/8013581/bug8013581.java 8169471 macosx-all
java/awt/event/MouseEvent/RobotLWTest/RobotLWTest.java 8233568 macosx-all
diff --git a/test/jdk/java/awt/Modal/NullModalityDialogTest/NullModalityDialogTest.java b/test/jdk/java/awt/Modal/NullModalityDialogTest/NullModalityDialogTest.java
index 7cdafff2210..86dea801ea4 100644
--- a/test/jdk/java/awt/Modal/NullModalityDialogTest/NullModalityDialogTest.java
+++ b/test/jdk/java/awt/Modal/NullModalityDialogTest/NullModalityDialogTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2021, 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
@@ -83,7 +83,8 @@ public class NullModalityDialogTest {
NullModalityDialogTest() throws Exception {
robot = new ExtendedRobot();
- EventQueue.invokeLater(this::createGUI);
+ robot.setAutoDelay(100);
+ EventQueue.invokeAndWait(this::createGUI);
}
private void createGUI() {
@@ -134,7 +135,9 @@ public class NullModalityDialogTest {
dialog.openGained.reset();
- robot.type(KeyEvent.VK_TAB);
+ robot.keyPress(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_TAB);
+ robot.waitForIdle();
dialog.openGained.waitForFlagTriggered();
assertTrue(dialog.openGained.flag(),