< prev index next >
test/jdk/javax/swing/JMenuItem/ShortcutNotDiplayed/ShortcutNotDisplayedTest.java
Print this page
rev 51542 : 8210039: move OSInfo to top level testlibrary
Reviewed-by: duke
*** 24,49 ****
/*
* @test
* @bug 7186371
* @summary [macosx] Main menu shortcuts not displayed
* @author vera.akulova@oracle.com
! * @library ../../../../lib/testlibrary
! * @build jdk.testlibrary.OSInfo
* @run main/manual ShortcutNotDisplayedTest
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ShortcutNotDisplayedTest {
static volatile boolean done = false;
static volatile boolean pass = false;
static final String PASS_COMMAND = "pass";
public static void main(String[] args) throws Exception {
! if (jdk.testlibrary.OSInfo.getOSType() != jdk.testlibrary.OSInfo.OSType.MACOSX) {
System.out.println("This test is for MacOS only. Automatically passed on other platforms.");
return;
}
System.setProperty("apple.laf.useScreenMenuBar", "true");
SwingUtilities.invokeAndWait(new Runnable() {
--- 24,51 ----
/*
* @test
* @bug 7186371
* @summary [macosx] Main menu shortcuts not displayed
* @author vera.akulova@oracle.com
! * @library /test/lib
! * @build jdk.test.lib.Platform
* @run main/manual ShortcutNotDisplayedTest
*/
+ import jdk.test.lib.Platform;
+
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ShortcutNotDisplayedTest {
static volatile boolean done = false;
static volatile boolean pass = false;
static final String PASS_COMMAND = "pass";
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");
SwingUtilities.invokeAndWait(new Runnable() {
< prev index next >