< 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,36 ****
* @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
* @run main bug8024061
*/
import java.awt.*;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
--- 25,36 ----
* @test
* @key headful
* @bug 8024061
* @summary Checks that no exception is thrown if dragGestureRecognized
* takes a while to complete.
! * @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,65 ****
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import javax.swing.*;
- import jdk.testlibrary.OSInfo;
/**
* 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().
--- 54,65 ----
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import javax.swing.*;
+ 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,123 ****
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) {
System.out.println("This test is for Linux and Solaris only... " +
"skipping!");
return;
}
--- 112,122 ----
drop.place(panel1, new Point(10, 10));
frame.setVisible(true);
}
public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException {
! if (!Platform.isLinux() && !Platform.isSolaris()) {
System.out.println("This test is for Linux and Solaris only... " +
"skipping!");
return;
}
< prev index next >