< prev index next >

test/jdk/java/awt/event/KeyEvent/8020209/bug8020209.java

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

*** 25,43 **** * @test * @key headful * @bug 8020209 * @summary [macosx] Mac OS X key event confusion for "COMMAND PLUS" * @author leonid.romanov@oracle.com ! * @library ../../../../../lib/testlibrary ! * @build jdk.testlibrary.OSInfo * @run main bug8020209 */ import java.awt.*; import java.awt.event.*; ! import jdk.testlibrary.OSInfo; public class bug8020209 { static volatile int listenerCallCounter = 0; static AWTKeyStroke keyStrokes[] = { --- 25,43 ---- * @test * @key headful * @bug 8020209 * @summary [macosx] Mac OS X key event confusion for "COMMAND PLUS" * @author leonid.romanov@oracle.com ! * @library /test/lib ! * @build jdk.test.lib.Platform * @run main bug8020209 */ import java.awt.*; import java.awt.event.*; ! import jdk.test.lib.Platform; public class bug8020209 { static volatile int listenerCallCounter = 0; static AWTKeyStroke keyStrokes[] = {
*** 45,55 **** AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_EQUALS, InputEvent.META_MASK), AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_ESCAPE, InputEvent.CTRL_MASK), }; public static void main(String[] args) throws Exception { ! if (OSInfo.getOSType() != OSInfo.OSType.MACOSX) { System.out.println("This test is for MacOS only. Automatically passed on other platforms."); return; } System.setProperty("apple.laf.useScreenMenuBar", "true"); --- 45,55 ---- AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_EQUALS, InputEvent.META_MASK), AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_ESCAPE, InputEvent.CTRL_MASK), }; public static void main(String[] args) throws Exception { ! if (!Platform.isOSX()) { System.out.println("This test is for MacOS only. Automatically passed on other platforms."); return; } System.setProperty("apple.laf.useScreenMenuBar", "true");
< prev index next >