jdk/test/java/awt/Modal/ModalExclusionTests/ApplicationExcludeDialogPageSetupTest.java
author yan
Thu, 19 Jun 2014 12:44:41 +0400
changeset 25202 a617d3450e3e
child 40128 e635645d2a8a
permissions -rw-r--r--
8044429: move awt automated tests for AWT_Modality to OpenJDK repository Reviewed-by: pchelko Contributed-by: Alexander Stepanov <alexander.v.stepanov@oracle.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25202
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
     1
/*
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
     2
 * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
     4
 *
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
     7
 * published by the Free Software Foundation.
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
     8
 *
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    13
 * accompanied this code).
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    14
 *
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    18
 *
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    21
 * questions.
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    22
 */
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    23
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    24
import java.awt.Dialog;
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    25
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    26
/*
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    27
 * @test
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    28
 * @bug 7125054 8044429
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    29
 * @summary Check whether a pageDialog blocks an application modality excluded Dialog
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    30
 *          (it shouldn't). Checks also whether setting a parent dialog to be
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    31
 *          modality excluded excludes its children from being blocked too.
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    32
 *
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    33
 * @library ../helpers ../../../../lib/testlibrary/
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    34
 * @build ExtendedRobot
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    35
 * @build Flag
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    36
 * @build TestDialog
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    37
 * @build TestWindow
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    38
 * @run main ApplicationExcludeDialogPageSetupTest
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    39
 */
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    40
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    41
public class ApplicationExcludeDialogPageSetupTest {
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    42
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    43
    public static void main(String[] args) throws Exception {
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    44
        ExcludeDialogTest test = new ExcludeDialogTest(
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    45
                Dialog.ModalExclusionType.APPLICATION_EXCLUDE,
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    46
                ExcludeDialogTest.DialogToShow.PAGE_SETUP);
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    47
        test.doTest();
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    48
    }
a617d3450e3e 8044429: move awt automated tests for AWT_Modality to OpenJDK repository
yan
parents:
diff changeset
    49
}