test/jdk/java/awt/Modal/ModalBlockingTests/BlockingWindowsDocModal1Test.java
author shurailine
Tue, 13 Nov 2018 07:11:50 -0800
changeset 52739 7199c4da1a6f
parent 51840 dc15e45122b2
permissions -rw-r--r--
8186549: move ExtendedRobot closer to tests Reviewed-by: serb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25787
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
     1
/*
51840
dc15e45122b2 8210894: remove jdk/testlibrary/Asserts
iignatyev
parents: 47216
diff changeset
     2
 * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
25787
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
     4
 *
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
     7
 * published by the Free Software Foundation.
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
     8
 *
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    13
 * accompanied this code).
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    14
 *
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    18
 *
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    21
 * questions.
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    22
 */
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    23
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    24
import java.awt.Dialog;
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    25
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    26
/*
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    27
 * @test
40128
e635645d2a8a 8160974: [TESTBUG] Mark more headful tests with @key headful.
goetz
parents: 25787
diff changeset
    28
 * @key headful
25787
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    29
 * @bug 8049617
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    30
 * @summary Check whether a document modal Dialog created with a Frame
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    31
 *          constructor receives focus; whether its components receive focus
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    32
 *          and respond to key events, when there are other windows shown.
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    33
 *          Also check the correctness of blocking behavior for other windows shown.
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    34
 *
52739
7199c4da1a6f 8186549: move ExtendedRobot closer to tests
shurailine
parents: 51840
diff changeset
    35
 * @library ../helpers /lib/client/
51840
dc15e45122b2 8210894: remove jdk/testlibrary/Asserts
iignatyev
parents: 47216
diff changeset
    36
 * @library /test/lib
25787
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    37
 * @build ExtendedRobot
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    38
 * @build Flag
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    39
 * @build TestDialog
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    40
 * @build TestFrame
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    41
 * @build TestWindow
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    42
 * @run main BlockingWindowsDocModal1Test
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    43
 */
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    44
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    45
public class BlockingWindowsDocModal1Test {
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    46
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    47
    public static void main(String[] args) throws Exception {
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    48
        (new BlockingWindowsDocModalTest(
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    49
                BlockingWindowsDocModalTest.Parent.FRAME)).doTest();
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    50
    }
f1c606e8b3f8 8049617: move awt automated tests from AWT_Modality to OpenJDK repository - part 3
avstepan
parents:
diff changeset
    51
}