author | goetz |
Tue, 14 Jun 2016 10:44:59 +0200 | |
changeset 39056 | d99e63b6d962 |
parent 25759 | 625be49758c1 |
permissions | -rw-r--r-- |
25759
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
1 |
/* |
39056
d99e63b6d962
8159690: [TESTBUG] Mark headful tests with @key headful.
goetz
parents:
25759
diff
changeset
|
2 |
* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. |
25759
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.*; |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
25 |
import static jdk.testlibrary.Asserts.*; |
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 |
/* |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
28 |
* @test |
39056
d99e63b6d962
8159690: [TESTBUG] Mark headful tests with @key headful.
goetz
parents:
25759
diff
changeset
|
29 |
* @key headful |
25759
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
30 |
* @bug 8047367 |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
31 |
* @summary Check modality settings for Window and Dialog. |
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 ../../../../lib/testlibrary/ |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
34 |
* @run main ModalitySettingsTest |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
35 |
*/ |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
36 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
37 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
38 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
39 |
public class ModalitySettingsTest { |
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 |
private void doTest() throws Exception { |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
42 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
43 |
Window w = new Window(new Frame()); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
44 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
45 |
boolean unexpectedExc = false; |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
46 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
47 |
try { |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
48 |
Dialog d = new Dialog(w); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
49 |
} catch (IllegalArgumentException iae) { |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
50 |
} catch (Exception e) { |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
51 |
unexpectedExc = true; |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
52 |
} |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
53 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
54 |
assertFalse(unexpectedExc, "unexpected exception occured when a " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
55 |
"Window instance was passed to Dialog constructor"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
56 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
57 |
Dialog d = new Dialog((Frame) null); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
58 |
assertTrue(d.getModalityType() == Dialog.ModalityType.MODELESS, |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
59 |
"the default modality type returned by Dialog " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
60 |
"differs from Dialog.ModalityType.MODELESS"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
61 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
62 |
Frame f = new Frame(); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
63 |
assertTrue(f.getModalExclusionType() == Dialog.ModalExclusionType.NO_EXCLUDE, |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
64 |
"the default modality exclusion type returned by Frame" + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
65 |
"differs from Dialog.ModalExclusionType.NO_EXCLUDE"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
66 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
67 |
w = new Window((Frame) null); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
68 |
assertTrue(w.getModalExclusionType() == Dialog.ModalExclusionType.NO_EXCLUDE, |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
69 |
"the default modality exclusion type returned by Window " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
70 |
"differs from Dialog.ModalExclusionType.NO_EXCLUDE"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
71 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
72 |
d = new Dialog((Frame) null); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
73 |
assertTrue(d.getModalExclusionType() == Dialog.ModalExclusionType.NO_EXCLUDE, |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
74 |
"the default modality exclusion type returned by Dialog " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
75 |
"differs from Dialog.ModalExclusionType.NO_EXCLUDE"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
76 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
77 |
d.setModalityType(Dialog.ModalityType.TOOLKIT_MODAL); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
78 |
assertTrue(d.getModalityType() == Dialog.ModalityType.TOOLKIT_MODAL, |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
79 |
"the modality type returned by Dialog " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
80 |
"differs from Dialog.ModalityType.TOOLKIT_MODAL " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
81 |
"after setting the modality type to that value"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
82 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
83 |
d.setModal(false); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
84 |
assertTrue(d.getModalityType() == Dialog.ModalityType.MODELESS, |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
85 |
"the modality type returned by Dialog differs from " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
86 |
"Dialog.ModalityType.MODELESS after calling setModal(false)"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
87 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
88 |
d.setModal(true); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
89 |
assertTrue(d.getModalityType() == Dialog.ModalityType.APPLICATION_MODAL, |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
90 |
"the modality type returned by Dialog differs from " |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
91 |
+ "Dialog.ModalityType.APPLICATION_MODAL after calling setModal(true)"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
92 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
93 |
w.setModalExclusionType(Dialog.ModalExclusionType.APPLICATION_EXCLUDE); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
94 |
assertTrue(w.getModalExclusionType() == |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
95 |
Dialog.ModalExclusionType.APPLICATION_EXCLUDE, |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
96 |
"getModalExclusionType method for Window did not return " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
97 |
"Dialog.ModalExclusionType.APPLICATION_EXCLUDE after " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
98 |
"setting it to that value"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
99 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
100 |
d = new Dialog((Frame) null); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
101 |
d.setModalityType(Dialog.ModalityType.TOOLKIT_MODAL); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
102 |
assertTrue(d.isModal(), "method isModal for Dialog " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
103 |
"returned false when the Dialog is toolkit modal"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
104 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
105 |
d.setModalityType(Dialog.ModalityType.MODELESS); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
106 |
assertFalse(d.isModal(), "method isModal for Dialog " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
107 |
"returned true when the Dialog is MODELESS"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
108 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
109 |
d = new Dialog((Frame) null, (Dialog.ModalityType) null); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
110 |
assertTrue(d.getModalityType() == Dialog.ModalityType.MODELESS, |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
111 |
"The modality type returned for a Dialog constructed " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
112 |
"with null modality type differs from MODELESS"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
113 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
114 |
d = new Dialog((Frame) null); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
115 |
d.setModalityType(null); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
116 |
assertTrue(d.getModalityType() == Dialog.ModalityType.MODELESS, |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
117 |
"the modality type returned for a Dialog set with null " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
118 |
"modality type differs from MODELESS"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
119 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
120 |
d.setModalExclusionType(null); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
121 |
assertTrue(d.getModalExclusionType() == Dialog.ModalExclusionType.NO_EXCLUDE, |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
122 |
"The exlcusion type returned for a Dialog set with null " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
123 |
"exclusion type differs from NO_EXCLUDE"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
124 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
125 |
try { |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
126 |
Dialog.ModalityType.valueOf("invalid"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
127 |
} catch (IllegalArgumentException iae) { |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
128 |
} catch (Exception e) { |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
129 |
unexpectedExc = true; |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
130 |
} |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
131 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
132 |
assertFalse(unexpectedExc, "unexpected exception occured when an " + |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
133 |
"invalid value was passed to ModalityType.valueOf method"); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
134 |
} |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
135 |
|
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
136 |
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
|
137 |
ModalitySettingsTest test = new ModalitySettingsTest(); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
138 |
test.doTest(); |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
139 |
} |
625be49758c1
8047367: move awt automated tests from AWT_Modality to OpenJDK repository - part 2
avstepan
parents:
diff
changeset
|
140 |
} |