8253980: javax/swing/plaf/synth/7158712/bug7158712.java fails on windows

Reviewed-by: kizune, prr
This commit is contained in:
Prasanta Sadhukhan 2020-10-07 06:41:02 +00:00
parent 703b345eee
commit bdd5782a67
2 changed files with 13 additions and 7 deletions
test/jdk
ProblemList.txt
javax/swing/plaf/synth/7158712

@ -833,7 +833,6 @@ javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.ja
javax/swing/JMenuItem/6249972/bug6249972.java 8233640 macosx-all
javax/swing/JMenuItem/4171437/bug4171437.java 8233641 macosx-all
javax/swing/JMenu/4692443/bug4692443.java 8171998 macosx-all
javax/swing/plaf/synth/7158712/bug7158712.java 8238720 windows-all
javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java 8238720 windows-all
sanity/client/SwingSet/src/ToolTipDemoTest.java 8225012 windows-all,macosx-all

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012,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
@ -27,13 +27,19 @@
* @bug 7158712
* @summary Synth Property "ComboBox.popupInsets" is ignored
* @library ../../../regtesthelpers
* @author Pavel Porvatov
* @run main/othervm -Dsun.java2d.uiScale=1 bug7158712
*/
import javax.swing.*;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.plaf.basic.BasicComboPopup;
import javax.swing.plaf.synth.SynthLookAndFeel;
import java.awt.*;
import javax.swing.UIManager;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Robot;
import java.awt.Point;
import java.awt.event.InputEvent;
import java.io.ByteArrayInputStream;
import java.util.concurrent.Callable;
@ -59,7 +65,7 @@ public class bug7158712 {
public static void main(String[] args) throws Exception {
Robot robot = new Robot();
robot.setAutoDelay(500);
robot.setAutoDelay(100);
SynthLookAndFeel laf = new SynthLookAndFeel();
@ -67,7 +73,7 @@ public class bug7158712 {
UIManager.setLookAndFeel(laf);
EventQueue.invokeAndWait(new Runnable() {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
comboBox = new JComboBox<>(
new String[]{"Very Looooooooooooooooooooong Text Item 1", "Item 2"});
@ -83,6 +89,7 @@ public class bug7158712 {
});
robot.waitForIdle();
robot.delay(1000);
Point comboBoxLocation = Util.invokeOnEDT(new Callable<Point>() {
@Override