Skip to content

Commit 2b5869a

Browse files
committed
8233565: [TESTBUG] NullModalityDialogTest.java fails on MacOS
Reviewed-by: jdv
1 parent bba16f6 commit 2b5869a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/jdk/ProblemList.txt

-1
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java 7099223 linux-all,windows
518518
java/awt/Window/WindowResizing/DoubleClickTitleBarTest.java 8233557 macosx-all
519519
java/awt/Window/WindowOwnedByEmbeddedFrameTest/WindowOwnedByEmbeddedFrameTest.java 8233558 macosx-all
520520
java/awt/Mouse/MouseComboBoxTest/MouseComboBoxTest.java 8233564 macosx-all
521-
java/awt/Modal/NullModalityDialogTest/NullModalityDialogTest.java 8233565 macosx-all
522521
java/awt/keyboard/AllKeyCode/AllKeyCode.java 8242930 macosx-all
523522
java/awt/FullScreen/8013581/bug8013581.java 8169471 macosx-all
524523
java/awt/event/MouseEvent/RobotLWTest/RobotLWTest.java 8233568 macosx-all

test/jdk/java/awt/Modal/NullModalityDialogTest/NullModalityDialogTest.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -83,7 +83,8 @@ public void doOpenAction() {
8383
NullModalityDialogTest() throws Exception {
8484

8585
robot = new ExtendedRobot();
86-
EventQueue.invokeLater(this::createGUI);
86+
robot.setAutoDelay(100);
87+
EventQueue.invokeAndWait(this::createGUI);
8788
}
8889

8990
private void createGUI() {
@@ -134,7 +135,9 @@ public void doTest() throws Exception {
134135

135136
dialog.openGained.reset();
136137

137-
robot.type(KeyEvent.VK_TAB);
138+
robot.keyPress(KeyEvent.VK_TAB);
139+
robot.keyRelease(KeyEvent.VK_TAB);
140+
robot.waitForIdle();
138141

139142
dialog.openGained.waitForFlagTriggered();
140143
assertTrue(dialog.openGained.flag(),

0 commit comments

Comments
 (0)