8040914: Test javax/swing/JLabel/6596966/bug6596966.java fails : comboBox isn't focus owner

Reviewed-by: prr
This commit is contained in:
Prasanta Sadhukhan 2020-08-31 17:53:04 +05:30
parent 22bb597d0d
commit 1a480ab570
2 changed files with 12 additions and 5 deletions

View File

@ -779,7 +779,6 @@ javax/swing/JFileChooser/8021253/bug8021253.java 8169954 windows-all,linux-all,m
javax/swing/JFileChooser/8062561/bug8062561.java 8196466 linux-all,macosx-all
javax/swing/JInternalFrame/Test6325652.java 8224977 macosx-all
javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java 8225045 linux-all
javax/swing/JLabel/6596966/bug6596966.java 8040914 macosx-all
javax/swing/JPopupMenu/4870644/bug4870644.java 8194130 macosx-all,linux-all
javax/swing/JPopupMenu/4966112/bug4966112.java 8064915 macosx-all
javax/swing/MultiUIDefaults/Test6860438.java 8198391 generic-all

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2020, 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
@ -33,11 +33,18 @@
* @author Pavel Porvatov
*/
import java.awt.*;
import java.awt.EventQueue;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.awt.event.InputEvent;
import java.util.ArrayList;
import javax.swing.*;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import jdk.test.lib.Platform;
@ -51,6 +58,7 @@ public class bug6596966 {
public static void main(String[] args) throws Exception {
try {
Robot robot = new Robot();
robot.setAutoDelay(100);
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
@ -76,7 +84,7 @@ public class bug6596966 {
});
robot.waitForIdle();
robot.delay(1000);
int keyMask = InputEvent.ALT_MASK;
if (Platform.isOSX()) {