bug7024749.java revision 5414
0N/A/*
1988N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A */
0N/A
0N/A/*
1879N/A * @test
1879N/A * @bug 7024749 7184326
1879N/A * @summary JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
1879N/A * @library ../../regtesthelpers
1879N/A * @build Util
1879N/A * @author Oleg Pekhovskiy: area=awt.toplevel
1879N/A @run main bug7024749
1879N/A */
1879N/A
2433N/Aimport java.awt.*;
2011N/Aimport test.java.awt.regtesthelpers.Util;
1879N/A
1879N/Apublic class bug7024749 {
1879N/A public static void main(String[] args) {
1879N/A final Frame f = new Frame("F");
1879N/A f.setBounds(0,0,200,200);
2062N/A f.setEnabled(false); // <- disable the top-level
1879N/A f.setVisible(true);
1879N/A
1879N/A Window w = new Window(f);
1879N/A w.setBounds(300,300,300,300);
1879N/A w.add(new TextField(20));
1879N/A w.setVisible(true);
1879N/A
1879N/A Robot robot = Util.createRobot();
1879N/A robot.setAutoDelay(1000);
1879N/A Util.waitForIdle(robot);
1879N/A robot.delay(1000);
1879N/A Util.clickOnTitle(f, robot);
1879N/A Util.waitForIdle(robot);
1879N/A
1879N/A f.dispose();
1879N/A System.out.println("Test passed!");
1879N/A }
1879N/A}
1879N/A