Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/java/awt/Frame/7024749/bug7024749.java
38821 views
/*1* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/*24* @test25* @bug 7024749 801999026* @summary JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x7527* @library ../../regtesthelpers28* @build Util29* @author Oleg Pekhovskiy: area=awt.toplevel30@run main bug702474931*/3233import java.awt.*;34import test.java.awt.regtesthelpers.Util;3536public class bug7024749 {37public static void main(String[] args) {38final Frame f = new Frame("F");39f.setBounds(0,0,200,200);40f.setEnabled(false); // <- disable the top-level41f.setVisible(true);4243Window w = new Window(f);44w.setBounds(300,300,300,300);45w.add(new TextField(20));46w.setVisible(true);4748Robot robot = Util.createRobot();49robot.setAutoDelay(1000);50Util.waitForIdle(robot);51robot.delay(1000);52Util.clickOnTitle(f, robot);53Util.waitForIdle(robot);5455f.dispose();56System.out.println("Test passed!");57}58}596061