< prev index next >

test/java/awt/Robot/ModifierRobotKey/ModifierRobotKeyTest.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -19,21 +19,27 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
-
-import java.awt.*;
-import java.awt.event.*;
+import java.awt.BorderLayout;
+import java.awt.Canvas;
+import java.awt.EventQueue;
+import java.awt.Frame;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
 
 import static jdk.testlibrary.Asserts.assertTrue;
 
 /*
- * @test
+ * @test 8155742
  * @summary Make sure that modifier key mask is set when robot press
  * some key with one or more modifiers.
- *
  * @library ../../../../lib/testlibrary/
  * @build ExtendedRobot
  * @run main ModifierRobotKeyTest
  */
 

@@ -58,19 +64,21 @@
         ModifierRobotKeyTest test = new ModifierRobotKeyTest();
         test.doTest();
     }
 
     public ModifierRobotKeyTest() throws Exception {
-        modifierKeys =  new int[3];
+        modifierKeys =  new int[4];
         modifierKeys[0] = KeyEvent.VK_SHIFT;
         modifierKeys[1] = KeyEvent.VK_CONTROL;
         modifierKeys[2] = KeyEvent.VK_ALT;
+        modifierKeys[3] = KeyEvent.VK_ALT_GRAPH;
 
-        inputMasks = new int[3];
+        inputMasks = new int[4];
         inputMasks[0] =  InputEvent.SHIFT_MASK;
         inputMasks[1] =  InputEvent.CTRL_MASK;
         inputMasks[2] =  InputEvent.ALT_MASK;
+        inputMasks[3] =  InputEvent.ALT_GRAPH_MASK;
 
         modifierStatus = new boolean[modifierKeys.length];
 
         textKeys = new int[2];
         textKeys[0] = KeyEvent.VK_A;
< prev index next >