mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-03 12:40:10 +00:00
8074092: Newly introduced unnecessary dependencies on internal API in client regtests
Reviewed-by: serb, azvegint
This commit is contained in:
parent
08af89e08e
commit
0803af98c7
@ -27,15 +27,17 @@
|
||||
@summary awt Choice doesn't fire ItemStateChange when selecting item after select() call
|
||||
@author Oleg Pekhovskiy: area=awt-choice
|
||||
@library ../../regtesthelpers
|
||||
@library ../../../../lib/testlibrary
|
||||
@build Util
|
||||
@build jdk.testlibrary.OSInfo
|
||||
@run main ItemStateChangeTest
|
||||
*/
|
||||
|
||||
import test.java.awt.regtesthelpers.Util;
|
||||
import jdk.testlibrary.OSInfo;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import sun.awt.OSInfo;
|
||||
|
||||
public class ItemStateChangeTest extends Frame {
|
||||
|
||||
|
||||
@ -25,10 +25,11 @@
|
||||
* @bug 8064934
|
||||
* @summary Incorrect Exception message from java.awt.Desktop.open()
|
||||
* @author Dmitry Markov
|
||||
* @library ../../../../lib/testlibrary
|
||||
* @build jdk.testlibrary.OSInfo
|
||||
* @run main bug8064934
|
||||
*/
|
||||
import sun.awt.OSInfo;
|
||||
|
||||
import jdk.testlibrary.OSInfo;
|
||||
import java.awt.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@ -27,6 +27,8 @@
|
||||
@summary REG: Menu does not disappear when clicked, keeping Choice's drop-down open, XToolkit
|
||||
@author andrei.dmitriev: area=awt.menu
|
||||
@library ../../regtesthelpers
|
||||
@library ../../../../lib/testlibrary
|
||||
@build jdk.testlibrary.OSInfo
|
||||
@build Util
|
||||
@run main OpensWithNoGrab
|
||||
*/
|
||||
@ -34,7 +36,7 @@
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
|
||||
import sun.awt.OSInfo;
|
||||
import jdk.testlibrary.OSInfo;
|
||||
import test.java.awt.regtesthelpers.Util;
|
||||
|
||||
public class OpensWithNoGrab
|
||||
|
||||
@ -21,8 +21,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
import sun.awt.OSInfo;
|
||||
|
||||
import jdk.testlibrary.OSInfo;
|
||||
import java.awt.*;
|
||||
import java.awt.Robot;
|
||||
import java.awt.event.InputEvent;
|
||||
@ -38,6 +37,8 @@ import javax.swing.*;
|
||||
* @bug 8024185
|
||||
* @summary Native Mac OS X full screen does not work after showing the splash
|
||||
* @library ../
|
||||
* @library ../../../../lib/testlibrary
|
||||
* @build jdk.testlibrary.OSInfo
|
||||
* @build GenerateTestImage
|
||||
* @run main GenerateTestImage
|
||||
* @author Petr Pchelko area=awt.event
|
||||
|
||||
@ -27,10 +27,13 @@
|
||||
@summary Tests that key events with modifiers are not swallowed.
|
||||
@author anton.tarasov: area=awt.focus
|
||||
@library ../../../regtesthelpers
|
||||
@library ../../../../../lib/testlibrary
|
||||
@build jdk.testlibrary.OSInfo
|
||||
@build Util
|
||||
@run main SwallowKeyEvents
|
||||
*/
|
||||
|
||||
import jdk.testlibrary.OSInfo;
|
||||
import java.awt.AWTException;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Robot;
|
||||
@ -49,7 +52,7 @@ public class SwallowKeyEvents {
|
||||
static Robot r;
|
||||
|
||||
public static void main(String[] args) {
|
||||
if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.WINDOWS) {
|
||||
if (OSInfo.getOSType() == OSInfo.OSType.WINDOWS) {
|
||||
System.out.println("Skipped. Test not for MS Windows.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -27,14 +27,15 @@
|
||||
* @summary XP Only: JButton.setBorderPainted() does not work with XP L&F
|
||||
* @author Alexander Scherbatiy
|
||||
* @library ../../regtesthelpers
|
||||
* @library ../../../../lib/testlibrary
|
||||
* @build jdk.testlibrary.OSInfo
|
||||
* @build Util
|
||||
* @run main bug4796987
|
||||
*/
|
||||
|
||||
import jdk.testlibrary.OSInfo;
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import sun.awt.OSInfo;
|
||||
import sun.awt.SunToolkit;
|
||||
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
|
||||
|
||||
public class bug4796987 {
|
||||
@ -51,7 +52,6 @@ public class bug4796987 {
|
||||
}
|
||||
|
||||
private static void testButtonBorder() throws Exception {
|
||||
SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
|
||||
Robot robot = new Robot();
|
||||
robot.setAutoDelay(50);
|
||||
|
||||
@ -62,7 +62,7 @@ public class bug4796987 {
|
||||
}
|
||||
});
|
||||
|
||||
toolkit.realSync();
|
||||
robot.waitForIdle();
|
||||
Thread.sleep(500);
|
||||
|
||||
Point p1 = Util.getCenterPoint(button1);
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
import jdk.testlibrary.OSInfo;
|
||||
import java.awt.Robot;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.File;
|
||||
@ -31,12 +32,13 @@ import java.util.concurrent.TimeUnit;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.filechooser.FileSystemView;
|
||||
import sun.awt.OSInfo;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8062561
|
||||
* @summary File system view returns null default directory
|
||||
* @library ../../../../lib/testlibrary
|
||||
* @build jdk.testlibrary.OSInfo
|
||||
* @run main/othervm bug8062561 GENERATE_POLICY
|
||||
* @run main/othervm/policy=security.policy bug8062561 CHECK_DEFAULT_DIR run
|
||||
*/
|
||||
@ -72,7 +74,7 @@ public class bug8062561 {
|
||||
File defaultDirectory = FileSystemView.getFileSystemView().
|
||||
getDefaultDirectory();
|
||||
if (defaultDirectory != null) {
|
||||
throw new RuntimeException("File system default directory is null!");
|
||||
throw new RuntimeException("File system default directory must be null! (FilePermission has not been granted in our policy file).");
|
||||
}
|
||||
}
|
||||
private static volatile JFileChooser fileChooser;
|
||||
|
||||
@ -27,9 +27,12 @@
|
||||
* @summary Tests duplicate mnemonics
|
||||
* @author Peter Zhelezniakov
|
||||
* @library ../../regtesthelpers
|
||||
* @library ../../../../lib/testlibrary
|
||||
* @build jdk.testlibrary.OSInfo
|
||||
* @build Util
|
||||
* @run main bug6827786
|
||||
*/
|
||||
import jdk.testlibrary.OSInfo;
|
||||
import java.awt.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
import javax.swing.*;
|
||||
@ -63,7 +66,7 @@ public class bug6827786 {
|
||||
checkfocus();
|
||||
|
||||
// select menu
|
||||
if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) {
|
||||
if (OSInfo.getOSType() == OSInfo.OSType.MACOSX) {
|
||||
Util.hitKeys(robot, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT, KeyEvent.VK_F);
|
||||
} else {
|
||||
Util.hitKeys(robot, KeyEvent.VK_ALT, KeyEvent.VK_F);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user