jdk/test/java/awt/Modal/ToFront/FrameToFrontTKModal5Test.java
author avstepan
Tue, 29 Jul 2014 15:03:05 +0400
changeset 26014 e50160ba221c
child 40128 e635645d2a8a
permissions -rw-r--r--
8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4 Reviewed-by: pchelko
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26014
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
     1
/*
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
     2
 * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
     4
 *
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
     7
 * published by the Free Software Foundation.
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
     8
 *
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    13
 * accompanied this code).
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    14
 *
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    18
 *
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    21
 * questions.
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    22
 */
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    23
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    24
import java.awt.Dialog;
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    25
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    26
/*
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    27
 * @test
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    28
 * @bug 8050885
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    29
 * @summary Check that calling toFront method for a frame in presence of
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    30
 *          blocking toolkit modal dialog having a visible Frame parent
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    31
 *          does not bring the frame to the top of the modal dialog.
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    32
 *
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    33
 * @library ../helpers ../../../../lib/testlibrary/
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    34
 * @build ExtendedRobot
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    35
 * @build Flag
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    36
 * @build TestDialog
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    37
 * @build TestFrame
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    38
 * @run main FrameToFrontTKModal5Test
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    39
 */
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    40
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    41
public class FrameToFrontTKModal5Test {
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    42
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    43
    public static void main(String[] args) throws Exception {
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    44
        (new FrameToFrontModalBlockedTest(
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    45
             Dialog.ModalityType.TOOLKIT_MODAL,
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    46
             FrameToFrontModalBlockedTest.DialogOwner.FRAME)).doTest();
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    47
    }
e50160ba221c 8050885: move awt automated tests from AWT_Modality to OpenJDK repository - part 4
avstepan
parents:
diff changeset
    48
}