jdk/test/java/awt/Frame/7024749/bug7024749.java
author goetz
Tue, 14 Jun 2016 10:44:59 +0200
changeset 39056 d99e63b6d962
parent 24155 53e618ceb567
permissions -rw-r--r--
8159690: [TESTBUG] Mark headful tests with @key headful. Reviewed-by: simonis, alexsch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13144
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
     1
/*
39056
d99e63b6d962 8159690: [TESTBUG] Mark headful tests with @key headful.
goetz
parents: 24155
diff changeset
     2
 * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
13144
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
     4
 *
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
     7
 * published by the Free Software Foundation.
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
     8
 *
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    13
 * accompanied this code).
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    14
 *
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    18
 *
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    21
 * questions.
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    22
 */
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    23
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    24
/*
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    25
 * @test
39056
d99e63b6d962 8159690: [TESTBUG] Mark headful tests with @key headful.
goetz
parents: 24155
diff changeset
    26
 * @key headful
24155
53e618ceb567 8019990: IM candidate window appears on the South-East corner of the display.
bae
parents: 14158
diff changeset
    27
 * @bug 7024749 8019990
13144
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    28
 * @summary JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
14158
f0692ac401cf 7184326: TEST_BUG: java/awt/Frame/7024749/bug7024749.java has a typo
kshefov
parents: 13144
diff changeset
    29
 * @library ../../regtesthelpers
13144
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    30
 * @build Util
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    31
 * @author Oleg Pekhovskiy: area=awt.toplevel
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    32
   @run main bug7024749
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    33
 */
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    34
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    35
import java.awt.*;
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    36
import test.java.awt.regtesthelpers.Util;
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    37
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    38
public class bug7024749 {
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    39
    public static void main(String[] args) {
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    40
        final Frame f = new Frame("F");
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    41
        f.setBounds(0,0,200,200);
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    42
        f.setEnabled(false); // <- disable the top-level
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    43
        f.setVisible(true);
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    44
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    45
        Window w = new Window(f);
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    46
        w.setBounds(300,300,300,300);
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    47
        w.add(new TextField(20));
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    48
        w.setVisible(true);
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    49
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    50
        Robot robot = Util.createRobot();
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    51
        robot.setAutoDelay(1000);
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    52
        Util.waitForIdle(robot);
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    53
        robot.delay(1000);
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    54
        Util.clickOnTitle(f, robot);
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    55
        Util.waitForIdle(robot);
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    56
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    57
        f.dispose();
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    58
        System.out.println("Test passed!");
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    59
    }
af0989bd5a41 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
bagiras
parents:
diff changeset
    60
}