8058726: Update regtests using sun.awt.OSInfo, part 1

Reviewed-by: alexsch
This commit is contained in:
Yuri Nesterenko 2014-09-18 17:34:44 +04:00
parent 8be77eed11
commit 13c109280f
31 changed files with 80 additions and 34 deletions

View File

@ -36,7 +36,7 @@ import java.awt.image.BufferedImage;
import java.util.LinkedList;
import java.util.List;
import javax.swing.JApplet;
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
import sun.awt.image.MultiResolutionImage;
/**
@ -44,6 +44,8 @@ import sun.awt.image.MultiResolutionImage;
* @bug 8028212
* @summary [macosx] Custom Cursor HiDPI support
* @author Alexander Scherbatiy
* @library ../../../../lib/testlibrary
* @build jdk.testlibrary.OSInfo
* @run applet/manual=yesno MultiResolutionCursorTest.html
*/
public class MultiResolutionCursorTest extends JApplet {
@ -263,4 +265,4 @@ class TestDialog extends Dialog {
messageText.append(messageIn + "\n");
System.out.println(messageIn);
}
}// Te
}// Te

View File

@ -28,7 +28,9 @@
@summary We should support "apple.awt.fileDialogForDirectories" property.
@author Sergey Bylokhov area=awt.filedialog
@library ../../regtesthelpers
@library ../../../../lib/testlibrary
@build Sysout
@build jdk.testlibrary.OSInfo
@run applet/manual=yesno FileDialogForDirectories.html
-->
<head>

View File

@ -22,7 +22,7 @@
*/
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
import test.java.awt.regtesthelpers.Sysout;
import java.applet.Applet;

View File

@ -28,7 +28,9 @@
@summary Support apple.awt.use-file-dialog-packages property.
@author Petr Pchelko area=awt.filedialog
@library ../../regtesthelpers
@library ../../../../lib/testlibrary
@build Sysout
@build jdk.testlibrary.OSInfo
@run applet/manual=yesno FileDialogForPackages.html
-->
<head>

View File

@ -22,7 +22,7 @@
*/
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
import test.java.awt.regtesthelpers.Sysout;
import java.applet.Applet;

View File

@ -28,7 +28,9 @@
@summary Submenu should be shown by mnemonic key press.
@author anton.tarasov@...: area=awt.focus
@library ../../../regtesthelpers
@library ../../../../../lib/testlibrary
@build Util
@build jdk.testlibrary.OSInfo
@run applet SubMenuShowTest.html
-->
<head>

View File

@ -36,7 +36,7 @@ import java.applet.Applet;
import java.util.concurrent.atomic.AtomicBoolean;
import java.lang.reflect.InvocationTargetException;
import test.java.awt.regtesthelpers.Util;
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
public class SubMenuShowTest extends Applet {
Robot robot;

View File

@ -26,6 +26,8 @@
@bug 6299858
@summary PIT. Focused border not shown on List if selected item is removed, XToolkit
@author Dmitry.Cherepanov@SUN.COM area=awt.list
@library ../../../../lib/testlibrary
@build jdk.testlibrary.OSInfo
@run applet FirstItemRemoveTest.html
-->
<head>

View File

@ -65,7 +65,7 @@ public class FirstItemRemoveTest extends Applet
private void test(){
if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) {
if (jdk.testlibrary.OSInfo.getOSType() == jdk.testlibrary.OSInfo.OSType.MACOSX) {
System.err.println("Skipped. This test is not for OS X.");
return;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2014, 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
@ -26,10 +26,12 @@
@bug 6315717
@summary verifies that modifiers are correct for extra buttons
@author Andrei Dmitriev : area=awt.mouse
@library ../../../../lib/testlibrary
@build jdk.testlibrary.OSInfo
@run main MouseModifiersUnitTest_Extra
*/
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
import java.awt.*;
import java.awt.event.*;

View File

@ -27,6 +27,8 @@
@summary Frame is not created on the specified GraphicsDevice with two
monitors
@author Oleg Pekhovskiy
@library ../../../../lib/testlibrary
@build jdk.testlibrary.OSInfo
@run main MultiScreenInsetsTest
*/
@ -37,7 +39,7 @@ import java.awt.GraphicsEnvironment;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.Toolkit;
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
public class MultiScreenInsetsTest {
private static final int SIZE = 100;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2014 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
@ -26,6 +26,8 @@
* @bug 7129133
* @summary [macosx] Accelerators are displayed as Meta instead of the Command symbol
* @author leonid.romanov@oracle.com
* @library ../../../../lib/testlibrary
* @build jdk.testlibrary.OSInfo
* @run main bug7129133
*/
@ -33,7 +35,7 @@ import java.awt.*;
public class bug7129133 {
public static void main(String[] args) throws Exception {
if (sun.awt.OSInfo.getOSType() != sun.awt.OSInfo.OSType.MACOSX) {
if (jdk.testlibrary.OSInfo.getOSType() != jdk.testlibrary.OSInfo.OSType.MACOSX) {
System.out.println("This test is for MacOS only. Automatically passed on other platforms.");
return;
}

View File

@ -28,7 +28,9 @@
@bug 6284070
@summary Tests that ActionEvent is generated when a tray icon is double-clicked
@library ../../regtesthelpers
@library ../../../../lib/testlibrary
@build Sysout
@build jdk.testlibrary.OSInfo
@author artem.ananiev: area=awt.tray
@run applet/manual=yesno DblClickActionEventTest.html
-->

View File

@ -37,7 +37,7 @@ import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
import test.java.awt.regtesthelpers.Sysout;
public class DblClickActionEventTest extends Applet {

View File

@ -29,7 +29,9 @@
@summary Tests that no NPE is thrown when the tray icon is disposed from the
handler of action event caused by clicking on this icon.
@library ../../regtesthelpers
@library ../../../../lib/testlibrary
@build Sysout
@build jdk.testlibrary.OSInfo
@author artem.ananiev: area=awt.tray
@run applet/manual=yesno DisposeInActionEventTest.html
-->

View File

@ -38,7 +38,7 @@ import java.applet.*;
import java.awt.*;
import java.awt.image.*;
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
import test.java.awt.regtesthelpers.Sysout;
public class DisposeInActionEventTest extends Applet {

View File

@ -26,8 +26,10 @@
@bug 7075105
@summary WIN: Provide a way to format HTML on drop
@author Denis Fokin: area=datatransfer
@library ../../../../lib/testlibrary
@build HtmlTransferable PutAllHtmlFlavorsOnClipboard
@build PutOnlyAllHtmlFlavorOnClipboard PutSelectionAndFragmentHtmlFlavorsOnClipboard
@build jdk.testlibrary.OSInfo
@run main HTMLDataFlavorTest
*/
@ -43,7 +45,7 @@ public class HTMLDataFlavorTest {
public static void main(String[] args) throws IOException, UnsupportedFlavorException {
if (sun.awt.OSInfo.getOSType() != sun.awt.OSInfo.OSType.WINDOWS) {
if (jdk.testlibrary.OSInfo.getOSType() != jdk.testlibrary.OSInfo.OSType.WINDOWS) {
System.err.println("This test is for MS Windows only. Considered passed.");
return;
}

View File

@ -29,8 +29,10 @@
@author mikhail.cherkasov@oracle.com
@library ../../regtesthelpers
@library ../../regtesthelpers/process
@library ../../../../lib/testlibrary
@build Util
@build ProcessResults ProcessCommunicator
@build jdk.testlibrary.OSInfo
@run applet/othervm MissedHtmlAndRtfBug.html
-->

View File

@ -31,7 +31,7 @@ import java.util.ArrayList;
import test.java.awt.regtesthelpers.process.ProcessCommunicator;
import test.java.awt.regtesthelpers.process.ProcessResults;
import test.java.awt.regtesthelpers.Util;
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
import static java.lang.Thread.sleep;

View File

@ -25,6 +25,8 @@
* @bug 4449413
* @summary Tests that checkbox and radiobuttons' check marks are visible when background is black
* @author Ilya Boyandin
* @library ../../../../lib/testlibrary
* @build jdk.testlibrary.OSInfo
* @run applet/manual=yesno bug4449413.html
*/
@ -32,7 +34,7 @@ import javax.swing.*;
import javax.swing.plaf.metal.*;
import java.awt.event.*;
import java.awt.*;
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
public class bug4449413 extends JApplet {

View File

@ -28,11 +28,13 @@ import java.awt.image.BufferedImage;
import javax.swing.JCheckBox;
import javax.swing.JComponent;
import javax.swing.SwingUtilities;
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
/* @test
* @bug 8032667
* @summary [macosx] Components cannot be rendered in HiDPI to BufferedImage
* @library ../../../../lib/testlibrary
* @build jdk.testlibrary.OSInfo
* @run main bug8032667_image_diff
*/
public class bug8032667_image_diff {

View File

@ -1,6 +1,6 @@
<html>
<!--
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 2014 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,6 +27,8 @@
@bug 4150029 8006087
@summary BackSpace keyboard button does not lead to parent directory
@author Oleg Mokhovikov
@library ../../../../lib/testlibrary
@build jdk.testlibrary.OSInfo
@run applet/manual=done bug4150029.html
-->

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2014, 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
@ -35,7 +35,7 @@ public class bug4150029 extends JApplet {
private boolean res;
public void init() {
if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) {
if (jdk.testlibrary.OSInfo.getOSType() == jdk.testlibrary.OSInfo.OSType.MACOSX) {
try {
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
} catch (Exception e) {

View File

@ -25,10 +25,12 @@
@bug 6840086
@summary JFileChooser lacks icons on top right when running on Windows 7
@author Pavel Porvatov
@library ../../../../lib/testlibrary
@build jdk.testlibrary.OSInfo
@run main bug6840086
*/
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
import sun.awt.shell.ShellFolder;
import java.awt.*;

View File

@ -26,12 +26,14 @@
* @bug 8046391
* @summary JFileChooser hangs if displayed in Windows L&F
* @author Alexey Ivanov
* @library ../../../../lib/testlibrary
* @build jdk.testlibrary.OSInfo
* @run main/othervm/timeout=10 bug8046391
*/
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
import sun.awt.OSInfo;
import sun.awt.OSInfo.OSType;
import jdk.testlibrary.OSInfo;
import jdk.testlibrary.OSInfo.OSType;
import javax.swing.JFileChooser;
import javax.swing.SwingUtilities;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2014, 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
@ -24,8 +24,10 @@
/* @test
@bug 8016356
@summary Any swing frame resizes ugly.
@run main bug8016356
@author Oleg Pekhovskiy
@library ../../../../lib/testlibrary
@build jdk.testlibrary.OSInfo
@run main bug8016356
*/
import java.awt.AWTException;
@ -42,7 +44,7 @@ import java.awt.event.InputEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
public class bug8016356 {
private static JFrame frame;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2014, 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
@ -26,6 +26,8 @@
* @bug 7186371
* @summary [macosx] Main menu shortcuts not displayed
* @author vera.akulova@oracle.com
* @library ../../../../lib/testlibrary
* @build jdk.testlibrary.OSInfo
* @run main/manual ShortcutNotDisplayedTest
*/
@ -39,7 +41,7 @@ public class ShortcutNotDisplayedTest {
static final String PASS_COMMAND = "pass";
public static void main(String[] args) throws Exception {
if (sun.awt.OSInfo.getOSType() != sun.awt.OSInfo.OSType.MACOSX) {
if (jdk.testlibrary.OSInfo.getOSType() != jdk.testlibrary.OSInfo.OSType.MACOSX) {
System.out.println("This test is for MacOS only. Automatically passed on other platforms.");
return;
}

View File

@ -27,13 +27,15 @@ import java.awt.Frame;
import java.awt.TextArea;
import javax.swing.JApplet;
import javax.swing.JOptionPane;
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
/**
* @test
* @bug 8024926 8040279
* @summary [macosx] AquaIcon HiDPI support
* @author Alexander Scherbatiy
* @library ../../../../lib/testlibrary
* @build jdk.testlibrary.OSInfo
* @run applet/manual=yesno bug8024926.html
*/
public class bug8024926 extends JApplet {

View File

@ -25,10 +25,12 @@
* @bug 6579827
* @summary vista : JSlider on JColorchooser is not properly render or can't be seen completely
* @author Pavel Porvatov
* @library ../../../../lib/testlibrary
* @build jdk.testlibrary.OSInfo
@run main bug6579827
*/
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
import javax.swing.*;
import java.awt.*;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014, 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,6 +27,8 @@
* @summary Ensures that selected tab is painted properly in the scroll tab layout
* under WindowsLookAndFeel in Windows' "Windows XP" theme.
* @author Mikhail Lapshin
* @library ../../../../lib/testlibrary
* @build jdk.testlibrary.OSInfo
* @run main bug6416920
*/
@ -35,7 +37,7 @@ import javax.swing.JTabbedPane;
import javax.swing.SwingConstants;
import java.awt.Rectangle;
import java.awt.Insets;
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
public class bug6416920 extends BasicTabbedPaneUI {
public AccessibleTabbedPaneLayout layout = new AccessibleTabbedPaneLayout();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2014, 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
@ -25,10 +25,12 @@
* @bug 6940863
* @summary Textarea within scrollpane shows vertical scrollbar
* @author Pavel Porvatov
* @library ../../../../lib/testlibrary
* @build jdk.testlibrary.OSInfo
* @run main bug6940863
*/
import sun.awt.OSInfo;
import jdk.testlibrary.OSInfo;
import javax.swing.*;
import java.awt.*;