changeset 10730:07156012ab78

8058726: Update regtests using sun.awt.OSInfo, part 1 Reviewed-by: alexsch
author yan
date Thu, 18 Sep 2014 17:34:44 +0400
parents 9eff979a26e7
children e66f69113b89
files test/java/awt/Cursor/MultiResolutionCursorTest/MultiResolutionCursorTest.java test/java/awt/FileDialog/FileDialogForDirectories/FileDialogForDirectories.html test/java/awt/FileDialog/FileDialogForDirectories/FileDialogForDirectories.java test/java/awt/FileDialog/FileDialogForPackages/FileDialogForPackages.html test/java/awt/FileDialog/FileDialogForPackages/FileDialogForPackages.java test/java/awt/KeyboardFocusmanager/TypeAhead/SubMenuShowTest/SubMenuShowTest.html test/java/awt/KeyboardFocusmanager/TypeAhead/SubMenuShowTest/SubMenuShowTest.java test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.html test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.java test/java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Extra.java test/java/awt/Multiscreen/MultiScreenInsetsTest/MultiScreenInsetsTest.java test/java/awt/Toolkit/ToolkitPropertyTest/bug7129133.java test/java/awt/TrayIcon/DblClickActionEventTest/DblClickActionEventTest.html test/java/awt/TrayIcon/DblClickActionEventTest/DblClickActionEventTest.java test/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.html test/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java test/java/awt/datatransfer/HTMLDataFlavors/HTMLDataFlavorTest.java test/java/awt/datatransfer/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.html test/java/awt/datatransfer/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.java test/javax/swing/JCheckBox/4449413/bug4449413.java test/javax/swing/JCheckBox/8032667/bug8032667_image_diff.java test/javax/swing/JFileChooser/4150029/bug4150029.html test/javax/swing/JFileChooser/4150029/bug4150029.java test/javax/swing/JFileChooser/6840086/bug6840086.java test/javax/swing/JFileChooser/8046391/bug8046391.java test/javax/swing/JFrame/8016356/bug8016356.java test/javax/swing/JMenuItem/ShortcutNotDiplayed/ShortcutNotDisplayedTest.java test/javax/swing/JOptionPane/8024926/bug8024926.java test/javax/swing/JSlider/6579827/bug6579827.java test/javax/swing/JTabbedPane/6416920/bug6416920.java test/javax/swing/JTextArea/6940863/bug6940863.java
diffstat 31 files changed, 80 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/awt/Cursor/MultiResolutionCursorTest/MultiResolutionCursorTest.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/Cursor/MultiResolutionCursorTest/MultiResolutionCursorTest.java	Thu Sep 18 17:34:44 2014 +0400
@@ -36,7 +36,7 @@
 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 @@
  * @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 @@
         messageText.append(messageIn + "\n");
         System.out.println(messageIn);
     }
-}// Te
\ No newline at end of file
+}// Te
--- a/test/java/awt/FileDialog/FileDialogForDirectories/FileDialogForDirectories.html	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/FileDialog/FileDialogForDirectories/FileDialogForDirectories.html	Thu Sep 18 17:34:44 2014 +0400
@@ -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>
--- a/test/java/awt/FileDialog/FileDialogForDirectories/FileDialogForDirectories.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/FileDialog/FileDialogForDirectories/FileDialogForDirectories.java	Thu Sep 18 17:34:44 2014 +0400
@@ -22,7 +22,7 @@
  */
 
 
-import sun.awt.OSInfo;
+import jdk.testlibrary.OSInfo;
 import test.java.awt.regtesthelpers.Sysout;
 
 import java.applet.Applet;
--- a/test/java/awt/FileDialog/FileDialogForPackages/FileDialogForPackages.html	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/FileDialog/FileDialogForPackages/FileDialogForPackages.html	Thu Sep 18 17:34:44 2014 +0400
@@ -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>
--- a/test/java/awt/FileDialog/FileDialogForPackages/FileDialogForPackages.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/FileDialog/FileDialogForPackages/FileDialogForPackages.java	Thu Sep 18 17:34:44 2014 +0400
@@ -22,7 +22,7 @@
  */
 
 
-import sun.awt.OSInfo;
+import jdk.testlibrary.OSInfo;
 import test.java.awt.regtesthelpers.Sysout;
 
 import java.applet.Applet;
--- a/test/java/awt/KeyboardFocusmanager/TypeAhead/SubMenuShowTest/SubMenuShowTest.html	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/KeyboardFocusmanager/TypeAhead/SubMenuShowTest/SubMenuShowTest.html	Thu Sep 18 17:34:44 2014 +0400
@@ -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>
--- a/test/java/awt/KeyboardFocusmanager/TypeAhead/SubMenuShowTest/SubMenuShowTest.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/KeyboardFocusmanager/TypeAhead/SubMenuShowTest/SubMenuShowTest.java	Thu Sep 18 17:34:44 2014 +0400
@@ -36,7 +36,7 @@
 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;
--- a/test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.html	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.html	Thu Sep 18 17:34:44 2014 +0400
@@ -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>
--- a/test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.java	Thu Sep 18 17:34:44 2014 +0400
@@ -65,7 +65,7 @@
 
     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;
         }
--- a/test/java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Extra.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Extra.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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.*;
--- a/test/java/awt/Multiscreen/MultiScreenInsetsTest/MultiScreenInsetsTest.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/Multiscreen/MultiScreenInsetsTest/MultiScreenInsetsTest.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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.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;
--- a/test/java/awt/Toolkit/ToolkitPropertyTest/bug7129133.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/Toolkit/ToolkitPropertyTest/bug7129133.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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 @@
 
 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;
         }
--- a/test/java/awt/TrayIcon/DblClickActionEventTest/DblClickActionEventTest.html	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/TrayIcon/DblClickActionEventTest/DblClickActionEventTest.html	Thu Sep 18 17:34:44 2014 +0400
@@ -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
   -->
--- a/test/java/awt/TrayIcon/DblClickActionEventTest/DblClickActionEventTest.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/TrayIcon/DblClickActionEventTest/DblClickActionEventTest.java	Thu Sep 18 17:34:44 2014 +0400
@@ -37,7 +37,7 @@
 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 {
--- a/test/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.html	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.html	Thu Sep 18 17:34:44 2014 +0400
@@ -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
   -->
--- a/test/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java	Thu Sep 18 17:34:44 2014 +0400
@@ -38,7 +38,7 @@
 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 {
--- a/test/java/awt/datatransfer/HTMLDataFlavors/HTMLDataFlavorTest.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/datatransfer/HTMLDataFlavors/HTMLDataFlavorTest.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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 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;
         }
--- a/test/java/awt/datatransfer/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.html	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/datatransfer/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.html	Thu Sep 18 17:34:44 2014 +0400
@@ -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
 -->
 
--- a/test/java/awt/datatransfer/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/java/awt/datatransfer/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.java	Thu Sep 18 17:34:44 2014 +0400
@@ -31,7 +31,7 @@
 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;
 
--- a/test/javax/swing/JCheckBox/4449413/bug4449413.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JCheckBox/4449413/bug4449413.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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.plaf.metal.*;
 import java.awt.event.*;
 import java.awt.*;
-import sun.awt.OSInfo;
+import jdk.testlibrary.OSInfo;
 
 public class bug4449413 extends JApplet {
 
--- a/test/javax/swing/JCheckBox/8032667/bug8032667_image_diff.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JCheckBox/8032667/bug8032667_image_diff.java	Thu Sep 18 17:34:44 2014 +0400
@@ -28,11 +28,13 @@
 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 {
--- a/test/javax/swing/JFileChooser/4150029/bug4150029.html	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JFileChooser/4150029/bug4150029.html	Thu Sep 18 17:34:44 2014 +0400
@@ -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
 -->
 
--- a/test/javax/swing/JFileChooser/4150029/bug4150029.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JFileChooser/4150029/bug4150029.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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 @@
     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) {
--- a/test/javax/swing/JFileChooser/6840086/bug6840086.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JFileChooser/6840086/bug6840086.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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.*;
--- a/test/javax/swing/JFileChooser/8046391/bug8046391.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JFileChooser/8046391/bug8046391.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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;
--- a/test/javax/swing/JFrame/8016356/bug8016356.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JFrame/8016356/bug8016356.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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.
+   @author Oleg Pekhovskiy
+   @library ../../../../lib/testlibrary
+   @build jdk.testlibrary.OSInfo
    @run main bug8016356
-   @author Oleg Pekhovskiy
 */
 
 import java.awt.AWTException;
@@ -42,7 +44,7 @@
 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;
--- a/test/javax/swing/JMenuItem/ShortcutNotDiplayed/ShortcutNotDisplayedTest.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JMenuItem/ShortcutNotDiplayed/ShortcutNotDisplayedTest.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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 @@
     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;
         }
--- a/test/javax/swing/JOptionPane/8024926/bug8024926.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JOptionPane/8024926/bug8024926.java	Thu Sep 18 17:34:44 2014 +0400
@@ -27,13 +27,15 @@
 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 {
--- a/test/javax/swing/JSlider/6579827/bug6579827.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JSlider/6579827/bug6579827.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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.*;
--- a/test/javax/swing/JTabbedPane/6416920/bug6416920.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JTabbedPane/6416920/bug6416920.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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.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();
--- a/test/javax/swing/JTextArea/6940863/bug6940863.java	Wed Sep 17 16:14:12 2014 +0400
+++ b/test/javax/swing/JTextArea/6940863/bug6940863.java	Thu Sep 18 17:34:44 2014 +0400
@@ -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.*;