< prev index next >

test/java/awt/EmbeddedFrame/EmbeddedFrameGrabTest/EmbeddedFrameGrabTest.java

Print this page
rev 14565 : 8185500: [TESTBUG] Add keywords headful/printer in java/awt and javax tests.
Summary: Add new keyword 'printer'. Some minor test fixes to show headless exception. Add some @requires windows.
Reviewed-by: serb, mbaesken
   1 /*
   2  * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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 /*
  25  @test
  26  @bug 6345002
  27  @summary grab problems with EmbeddedFrame
  28  @requires (os.family == "windows")
  29  @author Oleg.Semenov@sun.com area=EmbeddedFrame
  30  @run main EmbeddedFrameGrabTest
  31  */
  32 /**
  33  * EmbeddedFrameGrabTest.java
  34  *
  35  * summary: grab problems with EmbeddedFrame




  36  */

  37 import java.awt.Frame;
  38 import java.awt.peer.FramePeer;
  39 import javax.swing.JComboBox;
  40 import java.awt.Panel;
  41 import java.awt.BorderLayout;
  42 import java.awt.Robot;
  43 import java.awt.event.InputEvent;
  44 import java.awt.Rectangle;
  45 import java.awt.TextArea;
  46 import java.awt.Dialog;
  47 
  48 import java.lang.reflect.Constructor;
  49 import java.lang.reflect.Field;
  50 
  51 import sun.awt.AWTAccessor;
  52 
  53 public class EmbeddedFrameGrabTest {
  54 
  55     /**
  56      * Test fails if it throws any exception.


   1 /*
   2  * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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 /**
  25  * @test
  26  * @key headful
  27  * @bug 6345003 8171363
  28  * @summary grab problems with EmbeddedFrame
  29  * @requires (os.family == "windows")
  30  * @author Oleg.Semenov@sun.com area=EmbeddedFrame
  31  * @run main EmbeddedFrameGrabTest
  32  */
  33 
  34 import java.awt.Frame;
  35 import java.awt.peer.FramePeer;
  36 import javax.swing.JComboBox;
  37 import java.awt.Panel;
  38 import java.awt.BorderLayout;
  39 import java.awt.Robot;
  40 import java.awt.event.InputEvent;
  41 import java.awt.Rectangle;
  42 import java.awt.TextArea;
  43 import java.awt.Dialog;
  44 
  45 import java.lang.reflect.Constructor;
  46 import java.lang.reflect.Field;
  47 
  48 import sun.awt.AWTAccessor;
  49 
  50 public class EmbeddedFrameGrabTest {
  51 
  52     /**
  53      * Test fails if it throws any exception.


< prev index next >