< prev index next >

test/jdk/java/awt/Robot/RobotWheelTest/RobotWheelTest.java

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

@@ -22,20 +22,21 @@
  */
 import java.awt.Button;
 import java.awt.Frame;
 import java.awt.Rectangle;
 import java.awt.Robot;
-import jdk.testlibrary.OSInfo;
+
+import jdk.test.lib.Platform;
 
 /*
  * @test 1.2 98/08/05
  * @key headful
  * @bug 4373478 8079255
  * @summary Test mouse wheel functionality of Robot
  * @author bchristi: area=Robot
- * @library ../../../../lib/testlibrary
- * @build jdk.testlibrary.OSInfo
+ * @library /test/lib
+ * @build jdk.test.lib.Platform
  * @run main RobotWheelTest
  */
 public class RobotWheelTest {
 
     private static final int NUMTESTS = 20;

@@ -43,11 +44,11 @@
 
     public static void main(String[] args) throws Exception {
 
         Frame frame = null;
         try {
-            int wheelSign = OSInfo.getOSType().equals(OSInfo.OSType.MACOSX) ? -1 : 1;
+            int wheelSign = Platform.isOSX() ? -1 : 1;
 
             frame = new Frame();
             frame.setSize(200, 200);
             Button button = new Button("WheelButton");
             button.addMouseWheelListener(e -> wheelRotation = e.getWheelRotation());
< prev index next >