changeset 17900:b2f62e354b34

7151823: The test incorrectly recognizing OS Reviewed-by: serb, alexp
author alitvinov
date Mon, 03 Jun 2013 14:05:55 +0400
parents d3a864bdee7d
children 88326b660820
files jdk/test/javax/swing/JTabbedPane/4624207/bug4624207.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/javax/swing/JTabbedPane/4624207/bug4624207.java	Mon Jun 03 10:14:05 2013 +0400
+++ b/jdk/test/javax/swing/JTabbedPane/4624207/bug4624207.java	Mon Jun 03 14:05:55 2013 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,8 @@
 import java.awt.event.FocusEvent;
 import java.awt.event.FocusListener;
 import java.awt.event.KeyEvent;
+
+import sun.awt.OSInfo;
 import sun.awt.SunToolkit;
 
 public class bug4624207 implements ChangeListener, FocusListener {
@@ -99,7 +101,7 @@
 
         toolkit.realSync();
 
-        if ("Aqua".equals(UIManager.getLookAndFeel().getID())) {
+        if (OSInfo.getOSType() == OSInfo.OSType.MACOSX) {
             Util.hitKeys(robot, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT, KeyEvent.VK_B);
         } else {
             Util.hitKeys(robot, KeyEvent.VK_ALT, KeyEvent.VK_B);