changeset 11165:549a6b894938

8067441: Some tests fails with error: cannot find symbol getSystemMnemonicKeyCodes() Reviewed-by: serb, azvegint
author alexsch
date Mon, 15 Dec 2014 19:21:00 +0300
parents 3c08f7316a87
children d70f1fb31205
files test/javax/swing/regtesthelpers/Util.java
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/swing/regtesthelpers/Util.java	Mon Dec 15 16:00:53 2014 +0300
+++ b/test/javax/swing/regtesthelpers/Util.java	Mon Dec 15 19:21:00 2014 +0300
@@ -253,4 +253,18 @@
         }
         return result;
     }
+
+    /**
+     * Gets key codes from system mnemonic key mask
+     * @return key codes list
+     */
+    public static ArrayList<Integer> getSystemMnemonicKeyCodes() {
+        String osName = System.getProperty("os.name");
+        ArrayList<Integer> result = new ArrayList<>();
+        if (osName.contains("OS X")) {
+            result.add(KeyEvent.VK_CONTROL);
+        }
+        result.add(KeyEvent.ALT_MASK);
+        return result;
+    }
 }