author | hseigel |
Wed, 01 Mar 2017 08:00:02 -0500 | |
changeset 46194 | 5596e6f63072 |
parent 30469 | bac0a7ff7e1e |
permissions | -rw-r--r-- |
25203
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
1 |
/* |
30469 | 2 |
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. |
25203
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
4 |
* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
8 |
* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
13 |
* accompanied this code). |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
14 |
* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
18 |
* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
21 |
* questions. |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
22 |
*/ |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
23 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
24 |
import javax.swing.*; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
25 |
import java.awt.*; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
26 |
import java.util.Locale; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
27 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
28 |
/* |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
29 |
* @test |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
30 |
* @summary Check that JComboBox constructor and methods do not throw unexpected |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
31 |
* exceptions in headless mode |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
32 |
* @run main/othervm -Djava.awt.headless=true HeadlessJComboBox |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
33 |
*/ |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
34 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
35 |
public class HeadlessJComboBox { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
36 |
public static void main(String args[]) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
37 |
JComboBox ch; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
38 |
ch = new JComboBox(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
39 |
ch.getAccessibleContext(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
40 |
ch.isFocusTraversable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
41 |
ch.setEnabled(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
42 |
ch.setEnabled(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
43 |
ch.requestFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
44 |
ch.requestFocusInWindow(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
45 |
ch.getPreferredSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
46 |
ch.getMaximumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
47 |
ch.getMinimumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
48 |
ch.contains(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
49 |
Component c1 = ch.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
50 |
Component c2 = ch.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
51 |
Component c3 = ch.add(new Component(){}); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
52 |
Insets ins = ch.getInsets(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
53 |
ch.getAlignmentY(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
54 |
ch.getAlignmentX(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
55 |
ch.getGraphics(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
56 |
ch.setVisible(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
57 |
ch.setVisible(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
58 |
ch.setForeground(Color.red); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
59 |
ch.setBackground(Color.red); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
60 |
for (String font : Toolkit.getDefaultToolkit().getFontList()) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
61 |
for (int j = 8; j < 17; j++) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
62 |
Font f1 = new Font(font, Font.PLAIN, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
63 |
Font f2 = new Font(font, Font.BOLD, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
64 |
Font f3 = new Font(font, Font.ITALIC, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
65 |
Font f4 = new Font(font, Font.BOLD | Font.ITALIC, j); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
66 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
67 |
ch.setFont(f1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
68 |
ch.setFont(f2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
69 |
ch.setFont(f3); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
70 |
ch.setFont(f4); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
71 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
72 |
ch.getFontMetrics(f1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
73 |
ch.getFontMetrics(f2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
74 |
ch.getFontMetrics(f3); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
75 |
ch.getFontMetrics(f4); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
76 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
77 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
78 |
ch.enable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
79 |
ch.disable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
80 |
ch.reshape(10, 10, 10, 10); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
81 |
ch.getBounds(new Rectangle(1, 1, 1, 1)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
82 |
ch.getSize(new Dimension(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
83 |
ch.getLocation(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
84 |
ch.getX(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
85 |
ch.getY(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
86 |
ch.getWidth(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
87 |
ch.getHeight(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
88 |
ch.isOpaque(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
89 |
ch.isValidateRoot(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
90 |
ch.isOptimizedDrawingEnabled(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
91 |
ch.isDoubleBuffered(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
92 |
ch.getComponentCount(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
93 |
ch.countComponents(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
94 |
ch.getComponent(1); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
95 |
ch.getComponent(2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
96 |
Component[] cs = ch.getComponents(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
97 |
ch.getLayout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
98 |
ch.setLayout(new FlowLayout()); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
99 |
ch.doLayout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
100 |
ch.layout(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
101 |
ch.invalidate(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
102 |
ch.validate(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
103 |
ch.remove(0); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
104 |
ch.remove(c2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
105 |
ch.removeAll(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
106 |
ch.preferredSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
107 |
ch.minimumSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
108 |
ch.getComponentAt(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
109 |
ch.locate(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
110 |
ch.getComponentAt(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
111 |
ch.isFocusCycleRoot(new Container()); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
112 |
ch.transferFocusBackward(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
113 |
ch.setName("goober"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
114 |
ch.getName(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
115 |
ch.getParent(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
116 |
ch.getGraphicsConfiguration(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
117 |
ch.getTreeLock(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
118 |
ch.getToolkit(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
119 |
ch.isValid(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
120 |
ch.isDisplayable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
121 |
ch.isVisible(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
122 |
ch.isShowing(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
123 |
ch.isEnabled(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
124 |
ch.enable(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
125 |
ch.enable(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
126 |
ch.enableInputMethods(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
127 |
ch.enableInputMethods(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
128 |
ch.show(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
129 |
ch.show(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
130 |
ch.show(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
131 |
ch.hide(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
132 |
ch.getForeground(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
133 |
ch.isForegroundSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
134 |
ch.getBackground(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
135 |
ch.isBackgroundSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
136 |
ch.getFont(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
137 |
ch.isFontSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
138 |
Container c = new Container(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
139 |
c.add(ch); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
140 |
ch.getLocale(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
141 |
for (Locale locale : Locale.getAvailableLocales()) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
142 |
ch.setLocale(locale); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
143 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
144 |
ch.getColorModel(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
145 |
ch.getLocation(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
146 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
147 |
boolean exceptions = false; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
148 |
try { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
149 |
ch.getLocationOnScreen(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
150 |
} catch (IllegalComponentStateException e) { |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
151 |
exceptions = true; |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
152 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
153 |
if (!exceptions) |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
154 |
throw new RuntimeException("IllegalComponentStateException did not occur when expected"); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
155 |
|
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
156 |
ch.location(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
157 |
ch.setLocation(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
158 |
ch.move(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
159 |
ch.setLocation(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
160 |
ch.getSize(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
161 |
ch.size(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
162 |
ch.setSize(1, 32); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
163 |
ch.resize(1, 32); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
164 |
ch.setSize(new Dimension(1, 32)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
165 |
ch.resize(new Dimension(1, 32)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
166 |
ch.getBounds(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
167 |
ch.bounds(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
168 |
ch.setBounds(10, 10, 10, 10); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
169 |
ch.setBounds(new Rectangle(10, 10, 10, 10)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
170 |
ch.isLightweight(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
171 |
ch.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
172 |
ch.getCursor(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
173 |
ch.isCursorSet(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
174 |
ch.inside(1, 2); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
175 |
ch.contains(new Point(1, 2)); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
176 |
ch.isFocusable(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
177 |
ch.setFocusable(true); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
178 |
ch.setFocusable(false); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
179 |
ch.transferFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
180 |
ch.getFocusCycleRootAncestor(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
181 |
ch.nextFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
182 |
ch.transferFocusUpCycle(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
183 |
ch.hasFocus(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
184 |
ch.isFocusOwner(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
185 |
ch.toString(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
186 |
ch.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
187 |
ch.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
188 |
ch.setComponentOrientation(ComponentOrientation.UNKNOWN); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
189 |
ch.getComponentOrientation(); |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
190 |
} |
ea684628f900
8047180: Move functional tests AWT_Headless/Automated to OpenJDK repository
yan
parents:
diff
changeset
|
191 |
} |