8024161: [TEST_BUG] [macosx] java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java failed "menu was opened by first click after opened Choice"
authorpchelko
Tue, 26 Nov 2013 18:50:35 +0400
changeset 21796 66b60a81cfff
parent 21795 4eda0f93544c
child 21797 6223607d1c49
8024161: [TEST_BUG] [macosx] java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java failed "menu was opened by first click after opened Choice" Reviewed-by: anthony, serb
jdk/test/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java
--- a/jdk/test/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java	Tue Nov 26 17:16:32 2013 +0400
+++ b/jdk/test/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java	Tue Nov 26 18:50:35 2013 +0400
@@ -33,6 +33,8 @@
 
 import java.awt.*;
 import java.awt.event.*;
+
+import sun.awt.OSInfo;
 import test.java.awt.regtesthelpers.Util;
 
 public class OpensWithNoGrab
@@ -49,8 +51,8 @@
         Sysout.createDialog( );
         Sysout.printInstructions( instructions );
 
-        String toolkit = Toolkit.getDefaultToolkit().getClass().getName();
-        if (toolkit.equals("sun.awt.windows.WToolkit")){
+        if (!(OSInfo.getOSType().equals(OSInfo.OSType.LINUX)
+                || OSInfo.getOSType().equals(OSInfo.OSType.SOLARIS))) {
             System.out.println("This test is for XAWT/Motif only");
             OpensWithNoGrab.pass();
         }