< prev index next >

test/java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java

Print this page
rev 14989 : 8160974: [TESTBUG] Mark more headful tests with @key headful.


  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  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.Frame;
  25 import java.awt.Robot;
  26 import java.awt.event.KeyEvent;
  27 import java.awt.event.KeyAdapter;
  28 
  29 /*
  30  * @test

  31  * @bug 8007156 8025126
  32  * @summary Extended key code is not set for a key event
  33  * @author Alexandr Scherbatiy
  34  * @library ../../../../../lib/testlibrary
  35  * @build ExtendedRobot
  36  * @run main ExtendedKeyCodeTest
  37  */
  38 public class ExtendedKeyCodeTest {
  39 
  40     private static volatile boolean setExtendedKeyCode = true;
  41     private static volatile int eventsCount = 0;
  42 
  43     public static void main(String[] args) throws Exception {
  44         ExtendedRobot robot = new ExtendedRobot();
  45         robot.setAutoDelay(50);
  46 
  47         Frame frame = new Frame();
  48         frame.setSize(300, 300);
  49 
  50         frame.addKeyListener(new KeyAdapter() {




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  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.Frame;
  25 import java.awt.Robot;
  26 import java.awt.event.KeyEvent;
  27 import java.awt.event.KeyAdapter;
  28 
  29 /*
  30  * @test
  31  * @key headful
  32  * @bug 8007156 8025126
  33  * @summary Extended key code is not set for a key event
  34  * @author Alexandr Scherbatiy
  35  * @library ../../../../../lib/testlibrary
  36  * @build ExtendedRobot
  37  * @run main ExtendedKeyCodeTest
  38  */
  39 public class ExtendedKeyCodeTest {
  40 
  41     private static volatile boolean setExtendedKeyCode = true;
  42     private static volatile int eventsCount = 0;
  43 
  44     public static void main(String[] args) throws Exception {
  45         ExtendedRobot robot = new ExtendedRobot();
  46         robot.setAutoDelay(50);
  47 
  48         Frame frame = new Frame();
  49         frame.setSize(300, 300);
  50 
  51         frame.addKeyListener(new KeyAdapter() {


< prev index next >