8191678: [TESTBUG] Add keyword headful in java/awt and javax tests

Also fix some NPE thrown if run headless.

Reviewed-by: serb
This commit is contained in:
Goetz Lindenmaier 2017-11-21 17:39:04 +01:00
parent c4bab8bce7
commit 9da6eea9fe
12 changed files with 43 additions and 13 deletions
test/jdk
java/awt
Component/GetScreenLocTest
Dialog/SiblingChildOrder
Focus/FocusTransitionTest
javax/swing
DefaultButtonModel
GraphicsConfigNotifier
JButton
JComboBox/8182031
JMenu/8178430
JTextArea
dnd/8139050
plaf/nimbus
text/DefaultCaret/HidingSelection

@ -25,6 +25,7 @@
* @test
* @bug 8189204
* @summary Possible NPE in Component::getLocationOnScreen()
* @key headful
* @run main ComponentGetLocationOnScreenNPETest
*/

@ -21,9 +21,11 @@
* questions.
*/
/* @test
/**
* @test
* @bug 8190230
* @summary [macosx] Order of overlapping of modal dialogs is wrong
* @key headful
* @run main SiblingChildOrderTest
*/

@ -21,10 +21,12 @@
* questions.
*/
/* @test
/**
* @test
* @bug 8155197
* @summary Tests whether the value of mostRecentFocusOwner for a window is correct, if
* another window is displayed during focus transition
* @key headful
* @library ../../regtesthelpers
* @build Util
* @run main FocusTransitionTest

@ -20,12 +20,15 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
/**
* @test
* @bug 8182577
* @summary Verifies if moving focus via custom ButtonModel causes crash
* @key headful
* @run main DefaultButtonModelCrashTest
*/
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Point;
@ -61,7 +64,7 @@ public class DefaultButtonModelCrashTest {
robot.keyPress(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_TAB);
} finally {
SwingUtilities.invokeAndWait(()->frame .dispose());
if (frame != null) { SwingUtilities.invokeAndWait(()->frame.dispose()); }
}
}

@ -20,12 +20,14 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
/**
* @test
* @bug 8178025
* @summary Verifies if graphicsConfiguration property notification is sent
* when frame is moved from one screen to another in multiscreen
* environment.
* @key headful
* @run main TestMultiScreenGConfigNotify
*/

@ -20,10 +20,12 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
/**
* @test
* @bug 8191428
* @summary Verifies if text view is not borken into multiple lines
* @key headful
* @run main/othervm -Dsun.java2d.uiScale=1.2 TestGlyphBreak
*/

@ -20,12 +20,15 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
/**
* @test
* @bug 8182031
* @summary Verifies if ComboBox Popup opens and closes immediately
* @key headful
* @run main ComboPopupTest
*/
import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;
@ -80,7 +83,7 @@ public class ComboPopupTest {
throw new RuntimeException("combobox popup is not visible");
}
} finally {
SwingUtilities.invokeAndWait(()->frame.dispose());
if (frame != null) { SwingUtilities.invokeAndWait(()->frame.dispose()); }
}
}

@ -20,13 +20,16 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
/**
* @test
* @bug 8178430
* @summary JMenu in GridBagLayout flickers when label text shows "..." and
* is updated
* @key headful
* @run main LabelDotTest
*/
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
@ -112,7 +115,9 @@ public class LabelDotTest
SwingUtilities.invokeAndWait(() -> createUI());
runTest(50);
} finally {
SwingUtilities.invokeAndWait(() -> frame.dispose());
if (frame != null) {
SwingUtilities.invokeAndWait(() -> frame.dispose());
}
if (isException)
throw new RuntimeException("Size of Menu bar is not correct.");
}

@ -20,10 +20,12 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
/**
* @test
* @bug 8187957
* @summary Verifies Tab Size works correctly in JTextArea
* @key headful
* @run main TestTabSize
*/
@ -96,7 +98,9 @@ public class TestTabSize {
} catch (BadLocationException ex) {
excpnthrown = true;
} finally {
f.dispose();
if (f != null) {
f.dispose();
}
}
});
if (excpnthrown) {

@ -40,10 +40,12 @@ import static javax.swing.UIManager.getInstalledLookAndFeels;
/**
* @test
* @bug 8139050 8153871
* @key headful
* @library ../../../../lib/testlibrary
* @build ExtendedRobot
* @run main/othervm/timeout=360 -Xcheck:jni NativeErrorsInTableDnD
*/
public final class NativeErrorsInTableDnD {
private static JFrame frame;

@ -20,13 +20,16 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
/**
* @test
* @bug 8043315
* @summary Verifies if setting Nimbus.Overrides property affects
* keymap installation
* @key headful
* @run main TestNimbusOverride
*/
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;

@ -30,6 +30,7 @@ import java.awt.image.BufferedImage;
* @test
* @bug 8188081
* @summary Text selection does not clear after focus is lost
* @key headful
* @run main HidingSelectionTest
*/