< prev index next >

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

Print this page
rev 51789 : [mq]: asserts


  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.awt.BorderLayout;
  25 import java.awt.Canvas;
  26 import java.awt.EventQueue;
  27 import java.awt.Frame;
  28 import java.awt.event.FocusAdapter;
  29 import java.awt.event.FocusEvent;
  30 import java.awt.event.InputEvent;
  31 import java.awt.event.KeyAdapter;
  32 import java.awt.event.KeyEvent;
  33 import java.awt.event.MouseEvent;
  34 
  35 import static jdk.testlibrary.Asserts.assertNull;
  36 import static jdk.testlibrary.Asserts.assertTrue;
  37 
  38 /*
  39  * @test
  40  * @bug 8155742
  41  * @key headful
  42  * @summary Make sure that modifier key mask is set when robot press
  43  *          some key with one or more modifiers.
  44  * @library ../../../../lib/testlibrary/

  45  * @build ExtendedRobot
  46  * @run main ModifierRobotKeyTest
  47  */
  48 
  49 public class ModifierRobotKeyTest extends KeyAdapter {
  50 
  51     private boolean focusGained = false;
  52     private boolean startTest = false;
  53     private ExtendedRobot robot;
  54     private Frame frame;
  55     private Canvas canvas;
  56 
  57     private volatile boolean tempPress = false;
  58 
  59     private int[] textKeys, modifierKeys, inputMasks;
  60     private boolean[] modifierStatus, textStatus;
  61 
  62     private final static int WAIT_DELAY = 5000;
  63     private final Object lock = new Object();
  64 




  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.awt.BorderLayout;
  25 import java.awt.Canvas;
  26 import java.awt.EventQueue;
  27 import java.awt.Frame;
  28 import java.awt.event.FocusAdapter;
  29 import java.awt.event.FocusEvent;
  30 import java.awt.event.InputEvent;
  31 import java.awt.event.KeyAdapter;
  32 import java.awt.event.KeyEvent;
  33 import java.awt.event.MouseEvent;
  34 
  35 import static jdk.test.lib.Asserts.assertNull;
  36 import static jdk.test.lib.Asserts.assertTrue;
  37 
  38 /*
  39  * @test
  40  * @bug 8155742
  41  * @key headful
  42  * @summary Make sure that modifier key mask is set when robot press
  43  *          some key with one or more modifiers.
  44  * @library /lib/testlibrary
  45  * @library /test/lib
  46  * @build ExtendedRobot
  47  * @run main ModifierRobotKeyTest
  48  */
  49 
  50 public class ModifierRobotKeyTest extends KeyAdapter {
  51 
  52     private boolean focusGained = false;
  53     private boolean startTest = false;
  54     private ExtendedRobot robot;
  55     private Frame frame;
  56     private Canvas canvas;
  57 
  58     private volatile boolean tempPress = false;
  59 
  60     private int[] textKeys, modifierKeys, inputMasks;
  61     private boolean[] modifierStatus, textStatus;
  62 
  63     private final static int WAIT_DELAY = 5000;
  64     private final Object lock = new Object();
  65 


< prev index next >