< prev index next >

test/jdk/javax/swing/JMenu/6470128/bug6470128.java

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

@@ -25,19 +25,20 @@
  * @test
  * @key headful
  * @bug 6470128
  * @summary Escape Key causes JMenu Selection to Disappear
  * @author Alexander Potochkin
- * @library ../../../../lib/testlibrary
- * @build jdk.testlibrary.OSInfo
+ * @library /test/lib
+ * @build jdk.test.lib.Platform
  * @run main bug6470128
  */
 
 import javax.swing.*;
 import java.awt.*;
 import java.awt.event.KeyEvent;
-import jdk.testlibrary.OSInfo;
+
+import jdk.test.lib.Platform;
 
 public class bug6470128 {
     static JFrame frame;
     static JMenu subMenu;
 

@@ -64,18 +65,18 @@
             }
         });
         Robot robot = new Robot();
         robot.setAutoDelay(10);
         robot.waitForIdle();
-        if (OSInfo.getOSType() == OSInfo.OSType.MACOSX) {
+        if (Platform.isOSX()) {
             robot.keyPress(KeyEvent.VK_CONTROL);
         }
         robot.keyPress(KeyEvent.VK_ALT);
         robot.keyPress(KeyEvent.VK_M);
         robot.keyRelease(KeyEvent.VK_M);
         robot.keyRelease(KeyEvent.VK_ALT);
-        if (OSInfo.getOSType() == OSInfo.OSType.MACOSX) {
+        if (Platform.isOSX()) {
             robot.keyRelease(KeyEvent.VK_CONTROL);
         }
         robot.keyPress(KeyEvent.VK_ENTER);
         robot.keyRelease(KeyEvent.VK_ENTER);
         robot.keyPress(KeyEvent.VK_ESCAPE);
< prev index next >