8015588: [TEST_BUG] [macosx] Test java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java fails on MacOSX
authorkshefov
Mon, 16 Sep 2013 19:21:50 +0400
changeset 20138 7103851d7850
parent 20137 82f491ad2aed
child 20139 53e1e07a811e
8015588: [TEST_BUG] [macosx] Test java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java fails on MacOSX Reviewed-by: anthony, serb
jdk/test/java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java
--- a/jdk/test/java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java	Mon Sep 16 19:15:53 2013 +0400
+++ b/jdk/test/java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java	Mon Sep 16 19:21:50 2013 +0400
@@ -65,6 +65,12 @@
     }
 
     public static void main(final String[] args) throws Exception {
+
+        if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) {
+            System.err.println("This test is not for OS X. Menu.setFont() is not supported on OS X.");
+            return;
+        }
+
         //Components initialization.
         frame.setMenuBar(mb);
         mb.setFont(new Font("Helvetica", Font.ITALIC, 5));