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