changeset 8836:7d33bca26091

8024161: [TEST_BUG] [macosx] java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java failed "menu was opened by first click after opened Choice" Reviewed-by: anthony, serb
author pchelko
date Tue, 26 Nov 2013 18:50:35 +0400
parents ab933b508274
children f99277913d40
files test/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java	Tue Nov 26 17:16:32 2013 +0400
+++ b/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();
         }