< prev index next >

test/jdk/javax/swing/JComboBox/WindowsComboBoxSize/WindowsComboBoxSizeTest.java

Print this page
rev 53939 : 8213116: javax/swing/JComboBox/WindowsComboBoxSize/WindowsComboBoxSizeTest.java fails in Windows
Reviewed-by: prr

*** 22,32 **** */ /** * @test * @key headful ! * @bug 8179027 * @requires (os.family == "windows") * @summary JComboBox too small under Windows LAF * @run main WindowsComboBoxSizeTest */ --- 22,32 ---- */ /** * @test * @key headful ! * @bug 8179027 8213116 * @requires (os.family == "windows") * @summary JComboBox too small under Windows LAF * @run main WindowsComboBoxSizeTest */
*** 62,72 **** frame.pack(); frame.setVisible( true ); }); Robot robot = new Robot(); robot.waitForIdle(); - try { test(); } finally { SwingUtilities.invokeLater(frame::dispose); } --- 62,71 ----
*** 76,91 **** SwingUtilities.invokeAndWait(() -> { int expected = textField.getSize().height; if (comboBox.getSize().height != expected ) { throw new RuntimeException( "Wrong non-editable JComboBox height " + ! comboBox.getSize().height); } if (comboBoxEd.getSize().height != expected ) { throw new RuntimeException( "Wrong editable JComboBox height " + ! comboBoxEd.getSize().height); } }); } } --- 75,90 ---- SwingUtilities.invokeAndWait(() -> { int expected = textField.getSize().height; if (comboBox.getSize().height != expected ) { throw new RuntimeException( "Wrong non-editable JComboBox height " + ! comboBox.getSize().height + " expected " + expected); } if (comboBoxEd.getSize().height != expected ) { throw new RuntimeException( "Wrong editable JComboBox height " + ! comboBoxEd.getSize().height + " expected " + expected); } }); } }
< prev index next >