< prev index next >

test/jdk/sun/awt/dnd/8024061/bug8024061.java

Print this page
rev 51542 : 8210039: move OSInfo to top level testlibrary
Reviewed-by: duke

@@ -25,12 +25,12 @@
  * @test
  * @key headful
  * @bug 8024061
  * @summary Checks that no exception is thrown if dragGestureRecognized
  *          takes a while to complete.
- * @library ../../../../lib/testlibrary
- * @build jdk.testlibrary.OSInfo
+ * @library /test/lib
+ * @build jdk.test.lib.Platform
  * @run main bug8024061
  */
 import java.awt.*;
 import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.Transferable;

@@ -54,12 +54,12 @@
 import java.lang.reflect.InvocationTargetException;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
 import javax.swing.*;
-import jdk.testlibrary.OSInfo;
 
+import jdk.test.lib.Platform;
 
 /**
  * If dragGestureRecognized() takes a while to complete and if user performs a drag quickly,
  * an exception is thrown from DropTargetListener.dragEnter when it calls
  * DropTargetDragEvent.getTransferable().

@@ -112,12 +112,11 @@
         drop.place(panel1, new Point(10, 10));
         frame.setVisible(true);
     }
 
     public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException {
-        OSInfo.OSType type = OSInfo.getOSType();
-        if (type != OSInfo.OSType.LINUX && type != OSInfo.OSType.SOLARIS) {
+        if (!Platform.isLinux() && !Platform.isSolaris()) {
             System.out.println("This test is for Linux and Solaris only... " +
                                "skipping!");
             return;
         }
 
< prev index next >