changeset 16310:2e5f7c4c78e5

8167284: [TESTBUG] [PIT] possible regression: javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java Reviewed-by: ssadetsky, yan Contributed-by: Maksim Khramov <maksim.khramov@oracle.com>
author yan
date Mon, 28 Nov 2016 14:36:46 +0300
parents 7d77392d12c4
children d82266274ca8
files test/javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java
diffstat 1 files changed, 10 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java	Mon Nov 28 10:36:40 2016 +0300
+++ b/test/javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java	Mon Nov 28 14:36:46 2016 +0300
@@ -42,7 +42,6 @@
 import javax.swing.JRadioButton;
 import javax.swing.JTextField;
 import javax.swing.KeyStroke;
-import javax.swing.LookAndFeel;
 import javax.swing.SwingUtilities;
 import javax.swing.UIManager;
 import javax.swing.UnsupportedLookAndFeelException;
@@ -133,41 +132,19 @@
     }
 
     private static void runTestCase() throws Exception {
-        LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
         focusOn(a);
-        if (isExcludedLookAndFeel(lookAndFeel)) {
-            robot.keyPress(KeyEvent.VK_ENTER);
-            robot.keyRelease(KeyEvent.VK_ENTER);
-            robot.waitForIdle();
-            isFocusOwner(b, "forward");
-            robot.keyPress(KeyEvent.VK_SHIFT);
-            robot.keyPress(KeyEvent.VK_TAB);
-            robot.keyRelease(KeyEvent.VK_TAB);
-            robot.keyRelease(KeyEvent.VK_SHIFT);
-            robot.waitForIdle();
-            isFocusOwner(a, "backward");
 
-        } else {
+        robot.keyPress(KeyEvent.VK_ENTER);
+        robot.keyRelease(KeyEvent.VK_ENTER);
+        robot.waitForIdle();
+        isFocusOwner(next, "forward");
+        robot.keyPress(KeyEvent.VK_SHIFT);
+        robot.keyPress(KeyEvent.VK_TAB);
+        robot.keyRelease(KeyEvent.VK_TAB);
+        robot.keyRelease(KeyEvent.VK_SHIFT);
+        robot.waitForIdle();
+        isFocusOwner(a, "backward");
 
-            robot.keyPress(KeyEvent.VK_ENTER);
-            robot.keyRelease(KeyEvent.VK_ENTER);
-            robot.waitForIdle();
-            isFocusOwner(next, "forward");
-            robot.keyPress(KeyEvent.VK_SHIFT);
-            robot.keyPress(KeyEvent.VK_TAB);
-            robot.keyRelease(KeyEvent.VK_TAB);
-            robot.keyRelease(KeyEvent.VK_SHIFT);
-            robot.waitForIdle();
-            isFocusOwner(d, "backward");
-        }
-
-    }
-
-    private static boolean isExcludedLookAndFeel(LookAndFeel lookAndFeel) {
-
-        return lookAndFeel.toString().toLowerCase().contains("aqua")
-                || lookAndFeel.toString().toLowerCase().contains("nimbus")
-                || lookAndFeel.toString().toLowerCase().contains("gtk");
     }
 
     private static void focusOn(Component component)