< prev index next >

test/jdk/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java

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

*** 26,41 **** * @key headful * @bug 7160951 8152492 8178448 * @summary [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar * @author vera.akulova@oracle.com * @modules java.desktop/java.awt:open ! * @library ../../../../lib/testlibrary ! * @build jdk.testlibrary.OSInfo * @run main ActionListenerCalledTwiceTest */ ! import jdk.testlibrary.OSInfo; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ActionListenerCalledTwiceTest { --- 26,41 ---- * @key headful * @bug 7160951 8152492 8178448 * @summary [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar * @author vera.akulova@oracle.com * @modules java.desktop/java.awt:open ! * @library /test/lib ! * @build jdk.test.lib.Platform * @run main ActionListenerCalledTwiceTest */ ! import jdk.test.lib.Platform; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ActionListenerCalledTwiceTest {
*** 54,64 **** static JMenuBar bar; static JFrame frame; static volatile int listenerCallCounter = 0; 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; } --- 54,64 ---- static JMenuBar bar; static JFrame frame; static volatile int listenerCallCounter = 0; 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; }
< prev index next >