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