< prev index next >

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

Print this page
rev 17565 : 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 6345003 8171363
  27  @summary grab problems with EmbeddedFrame
  28  @requires (os.family == "windows")
  29  @modules java.desktop/java.awt.peer
  30  @modules java.desktop/sun.awt
  31  @modules java.desktop/sun.awt.windows:open
  32  @author Oleg.Semenov@sun.com area=EmbeddedFrame
  33  @run main EmbeddedFrameGrabTest
  34  */
  35 /**
  36  * EmbeddedFrameGrabTest.java
  37  *
  38  * summary: grab problems with EmbeddedFrame







  39  */

  40 import java.awt.Frame;
  41 import java.awt.peer.FramePeer;
  42 import javax.swing.JComboBox;
  43 import java.awt.Panel;
  44 import java.awt.BorderLayout;
  45 import java.awt.Robot;
  46 import java.awt.event.InputEvent;
  47 import java.awt.Rectangle;
  48 import java.awt.TextArea;
  49 import java.awt.Dialog;
  50 
  51 import java.lang.reflect.Constructor;
  52 import java.lang.reflect.Field;
  53 
  54 import sun.awt.AWTAccessor;
  55 
  56 public class EmbeddedFrameGrabTest {
  57 
  58     /**
  59      * 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  * @modules java.desktop/java.awt.peer
  31  * @modules java.desktop/sun.awt
  32  * @modules java.desktop/sun.awt.windows:open
  33  * @author Oleg.Semenov@sun.com area=EmbeddedFrame
  34  * @run main EmbeddedFrameGrabTest
  35  */
  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.


< prev index next >