< prev index next >

test/java/awt/Frame/FramesGC/FramesGC.java

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


  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.*;
  25 import java.awt.image.BufferedImage;
  26 import java.lang.ref.PhantomReference;
  27 import java.lang.ref.ReferenceQueue;
  28 import java.util.ArrayList;
  29 import java.util.Vector;
  30 
  31 /*
  32  * @test

  33  * @summary Verify that disposed frames are collected with GC
  34  * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
  35  * @library ../../../../lib/testlibrary
  36  * @build ExtendedRobot
  37  * @run main/othervm -Xmx20m FramesGC
  38  */
  39 
  40 
  41 public class FramesGC {
  42 
  43     ExtendedRobot robot;
  44     ArrayList<PhantomReference<Frame>> refs = new ArrayList<PhantomReference<Frame>>();
  45     ReferenceQueue<Frame> que = new ReferenceQueue<Frame>();
  46 
  47     public static void main(String []args) throws Exception {
  48         new FramesGC().doTest();
  49     }
  50 
  51     FramesGC() throws Exception{
  52         robot = new ExtendedRobot();




  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.*;
  25 import java.awt.image.BufferedImage;
  26 import java.lang.ref.PhantomReference;
  27 import java.lang.ref.ReferenceQueue;
  28 import java.util.ArrayList;
  29 import java.util.Vector;
  30 
  31 /*
  32  * @test
  33  * @key headful
  34  * @summary Verify that disposed frames are collected with GC
  35  * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
  36  * @library ../../../../lib/testlibrary
  37  * @build ExtendedRobot
  38  * @run main/othervm -Xmx20m FramesGC
  39  */
  40 
  41 
  42 public class FramesGC {
  43 
  44     ExtendedRobot robot;
  45     ArrayList<PhantomReference<Frame>> refs = new ArrayList<PhantomReference<Frame>>();
  46     ReferenceQueue<Frame> que = new ReferenceQueue<Frame>();
  47 
  48     public static void main(String []args) throws Exception {
  49         new FramesGC().doTest();
  50     }
  51 
  52     FramesGC() throws Exception{
  53         robot = new ExtendedRobot();


< prev index next >