Mercurial > hg > jdk9-shenandoah > jdk
changeset 12772:65cab946433b
8032568: Test javax/swing/JInternalFrame/8020708/bug8020708.java fails on Windows virtual hosts
Reviewed-by: serb, alexsch
Contributed-by: Rajeev Chamyal <rajeev.chamyal@oracle.com>
author | alexsch |
---|---|
date | Thu, 10 Sep 2015 17:02:30 +0400 |
parents | 873342a31dee |
children | 7da13611c26e |
files | test/javax/swing/JInternalFrame/8020708/bug8020708.java |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/test/javax/swing/JInternalFrame/8020708/bug8020708.java Wed Sep 09 19:10:38 2015 +0300 +++ b/test/javax/swing/JInternalFrame/8020708/bug8020708.java Thu Sep 10 17:02:30 2015 +0400 @@ -35,7 +35,7 @@ /** * @test - * @bug 8020708 + * @bug 8020708 8032568 * @author Alexander Scherbatiy * @summary NLS: mnemonics missing in SwingSet2/JInternalFrame demo * @library ../../regtesthelpers @@ -111,8 +111,14 @@ Util.hitKeys(robot, KeyEvent.VK_CONTROL, KeyEvent.VK_SPACE); robot.waitForIdle(); - - Util.hitKeys(robot, KeyEvent.VK_C); + int keyCode = KeyEvent.VK_C; + String mnemonic = UIManager + .getString("InternalFrameTitlePane.closeButton.mnemonic"); + try { + keyCode = Integer.parseInt(mnemonic); + } catch (NumberFormatException e) { + } + Util.hitKeys(robot, keyCode); robot.waitForIdle(); robot.delay(500);