6544871: java/awt/event/KeyEvent/KeyTyped/CtrlASCII.html fails from jdk b09 on windows
authoryan
Fri, 31 Jul 2015 13:13:30 +0300
changeset 32128 8506d9dade57
parent 32127 eda186393829
child 32129 51464cf078d5
6544871: java/awt/event/KeyEvent/KeyTyped/CtrlASCII.html fails from jdk b09 on windows Reviewed-by: serb
jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java
--- a/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java	Thu Jul 30 19:10:23 2015 +0300
+++ b/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java	Fri Jul 31 13:13:30 2015 +0300
@@ -257,8 +257,12 @@
     }// start()
     public void punchCtrlKey( Robot ro, int keyCode ) {
         ro.keyPress(KeyEvent.VK_CONTROL);
-        ro.keyPress(keyCode);
-        ro.keyRelease(keyCode);
+        try {
+            ro.keyPress(keyCode);
+            ro.keyRelease(keyCode);
+        }catch(IllegalArgumentException iae) {
+            System.err.println("skip probably invalid keyCode "+keyCode);
+        }
         ro.keyRelease(KeyEvent.VK_CONTROL);
         ro.delay(200);
     }