Skip to content
Permalink
Browse files
8233564: [TESTBUG] MouseComboBoxTest.java is failing
Backport-of: b72d99e
  • Loading branch information
GoeLin committed Sep 28, 2021
1 parent 8d78072 commit c9855f114de786491dedf72b947d9f0bb7c30b2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
@@ -499,7 +499,6 @@ java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsDocModalTest.java 816
java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java 7099223 linux-all,solaris-all,windows-all
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/KeyboardFocusmanager/TypeAhead/SubMenuShowTest/SubMenuShowTest.java 8233566 macosx-all
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 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
@@ -47,7 +47,7 @@ public class MouseComboBoxTest {

public static void main(String[] args) throws Exception {
robot = new Robot();
robot.setAutoDelay(50);
robot.setAutoDelay(100);

UIManager.setLookAndFeel(new MetalLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
@@ -57,6 +57,7 @@ public void run() {
}
});
robot.waitForIdle();
robot.delay(1000);

for (int i = 0; i < items.length; i++) {
// Open popup
@@ -116,13 +117,15 @@ private static void createAndShowGUI() {
comboBoxUI = new MyComboBoxUI();
comboBox.setUI(comboBoxUI);

frame.setUndecorated(true);
frame.pack();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);

JWindow window = new JWindow(frame);
window.add(comboBox);
window.pack();
window.setLocationRelativeTo(null);
window.setVisible(true);
}

1 comment on commit c9855f1

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on c9855f1 Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.