test/javax/swing/JPopupMenu/6827786/bug6827786.java

Print this page

        

@@ -25,13 +25,16 @@
  * @test
  * @bug 6827786
  * @summary Tests duplicate mnemonics
  * @author Peter Zhelezniakov
  * @library ../../regtesthelpers
+ * @library ../../../../lib/testlibrary
+ * @build jdk.testlibrary.OSInfo
  * @build Util
  * @run main bug6827786
  */
+import jdk.testlibrary.OSInfo;
 import java.awt.*;
 import java.awt.event.KeyEvent;
 import javax.swing.*;
 
 public class bug6827786 {

@@ -61,11 +64,11 @@
 
         robot.waitForIdle();
         checkfocus();
 
         // select menu
-        if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) {
+        if (OSInfo.getOSType() == OSInfo.OSType.MACOSX) {
             Util.hitKeys(robot, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT, KeyEvent.VK_F);
         } else {
             Util.hitKeys(robot, KeyEvent.VK_ALT, KeyEvent.VK_F);
         }
         // select submenu