mirror of
https://github.com/openjdk/jdk8u.git
synced 2025-12-12 00:34:09 -06:00
8196196: Headful tests should not be run in headless mode
Reviewed-by: sgehwolf Backport-of: 7578044e7107c1914d85894cef5eb712c223252a
This commit is contained in:
parent
c7599bd217
commit
537ff94225
@ -27,6 +27,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
|
* @key headful
|
||||||
* @bug 8177758
|
* @bug 8177758
|
||||||
* @requires os.family == "windows"
|
* @requires os.family == "windows"
|
||||||
* @summary Regression in java.awt.FileDialog
|
* @summary Regression in java.awt.FileDialog
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* @test
|
/* @test
|
||||||
|
* @key headful
|
||||||
* @bug 8156121 8200313
|
* @bug 8156121 8200313
|
||||||
* @summary "Fail forward" fails for GTK3 if no GTK2 available
|
* @summary "Fail forward" fails for GTK3 if no GTK2 available
|
||||||
* @modules java.desktop/sun.awt
|
* @modules java.desktop/sun.awt
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
# questions.
|
# questions.
|
||||||
|
|
||||||
# @test JAWT.sh
|
# @test JAWT.sh
|
||||||
|
# @key headful
|
||||||
# @bug 7190587
|
# @bug 7190587
|
||||||
# @summary Tests Java AWT native interface library
|
# @summary Tests Java AWT native interface library
|
||||||
# @author kshefov
|
# @author kshefov
|
||||||
@ -107,7 +108,7 @@ case "$OS" in
|
|||||||
else
|
else
|
||||||
ARCH="i386"
|
ARCH="i386"
|
||||||
fi
|
fi
|
||||||
SYST="cygwin"
|
SYST="cygwin"
|
||||||
MAKE="make"
|
MAKE="make"
|
||||||
;;
|
;;
|
||||||
Darwin )
|
Darwin )
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -24,18 +24,23 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
|
* @key headful
|
||||||
* @summary Test that Toolkit.getDefaultToolkit throws AWTError exception if bad DISPLAY variable was set
|
* @summary Test that Toolkit.getDefaultToolkit throws AWTError exception if bad DISPLAY variable was set
|
||||||
* @bug 6818083
|
* @bug 6818083
|
||||||
*
|
*
|
||||||
* @run shell/timeout=240 BadDisplayTest.sh
|
* @run shell/timeout=240 BadDisplayTest.sh
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.AWTError;
|
||||||
|
import java.awt.Toolkit;
|
||||||
|
|
||||||
public class BadDisplayTest{
|
public class BadDisplayTest{
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
if (Boolean.getBoolean("java.awt.headless")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Throwable th = null;
|
Throwable th = null;
|
||||||
try {
|
try {
|
||||||
Toolkit.getDefaultToolkit();
|
Toolkit.getDefaultToolkit();
|
||||||
} catch (Throwable x) {
|
} catch (Throwable x) {
|
||||||
|
|||||||
@ -28,6 +28,7 @@ import java.io.InputStream;
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
|
* @key headful
|
||||||
* @bug 4758438
|
* @bug 4758438
|
||||||
* @summary Testcase to check the implementation of RFE 4758438
|
* @summary Testcase to check the implementation of RFE 4758438
|
||||||
* The RFE suggests that the GNOME desktop properties
|
* The RFE suggests that the GNOME desktop properties
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import java.awt.*;
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
|
* @key headful
|
||||||
* @summary Check the getSystemTray method of the SystemTray. Checks if
|
* @summary Check the getSystemTray method of the SystemTray. Checks if
|
||||||
* a proper instance is returned in supported platforms and a proper
|
* a proper instance is returned in supported platforms and a proper
|
||||||
* exception is thrown in unsupported platforms
|
* exception is thrown in unsupported platforms
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
|
* @key headful
|
||||||
* @bug 8163889
|
* @bug 8163889
|
||||||
* @summary Printing crashes on OSX.
|
* @summary Printing crashes on OSX.
|
||||||
* @run main PrintCrashTest
|
* @run main PrintCrashTest
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -28,9 +28,22 @@
|
|||||||
* @author Pavel Porvatov
|
* @author Pavel Porvatov
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import javax.swing.*;
|
import java.awt.Container;
|
||||||
import static javax.swing.SwingConstants.*;
|
|
||||||
import java.awt.*;
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.LayoutStyle;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
|
import javax.swing.UIManager;
|
||||||
|
import javax.swing.UnsupportedLookAndFeelException;
|
||||||
|
|
||||||
|
import static javax.swing.SwingConstants.EAST;
|
||||||
|
import static javax.swing.SwingConstants.NORTH;
|
||||||
|
import static javax.swing.SwingConstants.NORTH_EAST;
|
||||||
|
import static javax.swing.SwingConstants.NORTH_WEST;
|
||||||
|
import static javax.swing.SwingConstants.SOUTH;
|
||||||
|
import static javax.swing.SwingConstants.SOUTH_EAST;
|
||||||
|
import static javax.swing.SwingConstants.SOUTH_WEST;
|
||||||
|
import static javax.swing.SwingConstants.WEST;
|
||||||
|
|
||||||
public class bug7071166 {
|
public class bug7071166 {
|
||||||
private static final int[] POSITIONS = {NORTH, EAST, SOUTH, WEST, // valid positions
|
private static final int[] POSITIONS = {NORTH, EAST, SOUTH, WEST, // valid positions
|
||||||
@ -38,8 +51,11 @@ public class bug7071166 {
|
|||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) {
|
for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) {
|
||||||
UIManager.setLookAndFeel(lookAndFeelInfo.getClassName());
|
try {
|
||||||
|
UIManager.setLookAndFeel(lookAndFeelInfo.getClassName());
|
||||||
|
} catch (final UnsupportedLookAndFeelException ignored) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
System.out.println("LookAndFeel: " + lookAndFeelInfo.getName());
|
System.out.println("LookAndFeel: " + lookAndFeelInfo.getName());
|
||||||
|
|
||||||
SwingUtilities.invokeAndWait(new Runnable() {
|
SwingUtilities.invokeAndWait(new Runnable() {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -29,6 +29,7 @@
|
|||||||
import javax.swing.JComboBox;
|
import javax.swing.JComboBox;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
|
import javax.swing.UnsupportedLookAndFeelException;
|
||||||
import javax.swing.plaf.metal.MetalComboBoxUI;
|
import javax.swing.plaf.metal.MetalComboBoxUI;
|
||||||
|
|
||||||
public class bug6632953 {
|
public class bug6632953 {
|
||||||
@ -43,6 +44,8 @@ public class bug6632953 {
|
|||||||
: UIManager.getInstalledLookAndFeels()) {
|
: UIManager.getInstalledLookAndFeels()) {
|
||||||
try {
|
try {
|
||||||
UIManager.setLookAndFeel(lafInfo.getClassName());
|
UIManager.setLookAndFeel(lafInfo.getClassName());
|
||||||
|
} catch (UnsupportedLookAndFeelException ignored) {
|
||||||
|
continue;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -36,7 +36,11 @@ public class bug7082443 {
|
|||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) {
|
for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) {
|
||||||
if (lookAndFeelInfo.getClassName().contains(GTK_LAF_CLASS)) {
|
if (lookAndFeelInfo.getClassName().contains(GTK_LAF_CLASS)) {
|
||||||
UIManager.setLookAndFeel(lookAndFeelInfo.getClassName());
|
try {
|
||||||
|
UIManager.setLookAndFeel(lookAndFeelInfo.getClassName());
|
||||||
|
} catch (final UnsupportedLookAndFeelException ignored) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
SwingUtilities.invokeAndWait(new Runnable() {
|
SwingUtilities.invokeAndWait(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* @test
|
/* @test
|
||||||
|
* @key headful
|
||||||
* @bug 6489130
|
* @bug 6489130
|
||||||
* @summary FileChooserDemo hung by keeping pressing Enter key
|
* @summary FileChooserDemo hung by keeping pressing Enter key
|
||||||
* @author Pavel Porvatov
|
* @author Pavel Porvatov
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -25,6 +25,7 @@ import java.util.Locale;
|
|||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
import javax.swing.UIManager.LookAndFeelInfo;
|
import javax.swing.UIManager.LookAndFeelInfo;
|
||||||
|
import javax.swing.UnsupportedLookAndFeelException;
|
||||||
|
|
||||||
import sun.swing.SwingUtilities2;
|
import sun.swing.SwingUtilities2;
|
||||||
|
|
||||||
@ -76,7 +77,11 @@ public class bug8080628 {
|
|||||||
try {
|
try {
|
||||||
LookAndFeelInfo[] lafInfo = UIManager.getInstalledLookAndFeels();
|
LookAndFeelInfo[] lafInfo = UIManager.getInstalledLookAndFeels();
|
||||||
for (LookAndFeelInfo info : lafInfo) {
|
for (LookAndFeelInfo info : lafInfo) {
|
||||||
UIManager.setLookAndFeel(info.getClassName());
|
try {
|
||||||
|
UIManager.setLookAndFeel(info.getClassName());
|
||||||
|
} catch (final UnsupportedLookAndFeelException ignored) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
for (Locale locale : LOCALES) {
|
for (Locale locale : LOCALES) {
|
||||||
for (String key : MNEMONIC_KEYS) {
|
for (String key : MNEMONIC_KEYS) {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -67,7 +67,11 @@ public class bug6657138 implements Runnable {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String className = laf.getClassName();
|
String className = laf.getClassName();
|
||||||
UIManager.setLookAndFeel(className);
|
try {
|
||||||
|
UIManager.setLookAndFeel(className);
|
||||||
|
} catch (final UnsupportedLookAndFeelException ignored) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
ComponentUI ui = UIManager.getUI(c);
|
ComponentUI ui = UIManager.getUI(c);
|
||||||
if (ui == null) {
|
if (ui == null) {
|
||||||
throw new RuntimeException("UI is null for " + c);
|
throw new RuntimeException("UI is null for " + c);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -102,8 +102,10 @@ public final class bug6190373 {
|
|||||||
try {
|
try {
|
||||||
UIManager.setLookAndFeel(laf.getClassName());
|
UIManager.setLookAndFeel(laf.getClassName());
|
||||||
System.out.println("LookAndFeel: " + laf.getClassName());
|
System.out.println("LookAndFeel: " + laf.getClassName());
|
||||||
|
} catch (final UnsupportedLookAndFeelException ignored){
|
||||||
|
System.out.println("Unsupported LookAndFeel: " + laf.getClassName());
|
||||||
} catch (ClassNotFoundException | InstantiationException |
|
} catch (ClassNotFoundException | InstantiationException |
|
||||||
UnsupportedLookAndFeelException | IllegalAccessException e) {
|
IllegalAccessException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user