# HG changeset patch # User alexsch # Date 1418660460 -10800 # Node ID f488c331f61012edbe783d88ce9ef9ee6d0cfad0 # Parent 15b31c9a2351f5a415989078b0cfb9f88435848c 8067441: Some tests fails with error: cannot find symbol getSystemMnemonicKeyCodes() Reviewed-by: serb, azvegint diff -r 15b31c9a2351 -r f488c331f610 jdk/test/javax/swing/regtesthelpers/Util.java --- a/jdk/test/javax/swing/regtesthelpers/Util.java Mon Dec 15 16:00:53 2014 +0300 +++ b/jdk/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 getSystemMnemonicKeyCodes() { + String osName = System.getProperty("os.name"); + ArrayList result = new ArrayList<>(); + if (osName.contains("OS X")) { + result.add(KeyEvent.VK_CONTROL); + } + result.add(KeyEvent.ALT_MASK); + return result; + } }