6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @bug 6358034 6568560 8198613
27 * @key headful
28 * @summary Tests that no exception is thrown when display mode is changed
29 * externally
30 * @compile UninitializedDisplayModeChangeTest.java DisplayModeChanger.java
31 * @run main/othervm UninitializedDisplayModeChangeTest
32 */
33
34 import java.awt.EventQueue;
35 import java.awt.Toolkit;
36 import java.io.BufferedReader;
37 import java.io.File;
38 import java.io.IOException;
39 import java.io.InputStream;
40 import java.io.InputStreamReader;
41 import java.lang.reflect.InvocationTargetException;
42
43 public class UninitializedDisplayModeChangeTest {
44 public static volatile boolean failed = false;
45 public static void main(String[] args) {
46 Toolkit.getDefaultToolkit();
47 try {
48 EventQueue.invokeAndWait(new Runnable() {
49 public void run() {
50 Thread.currentThread().setDefaultUncaughtExceptionHandler(
51 new Thread.UncaughtExceptionHandler() {
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @bug 6358034 6568560 8198613 8198335
27 * @key headful
28 * @summary Tests that no exception is thrown when display mode is changed
29 * externally
30 * @compile UninitializedDisplayModeChangeTest.java DisplayModeChanger.java
31 * @run main/othervm UninitializedDisplayModeChangeTest
32 * @run main/othervm -Djava.awt.headless=true UninitializedDisplayModeChangeTest
33 */
34
35 import java.awt.EventQueue;
36 import java.awt.Toolkit;
37 import java.io.BufferedReader;
38 import java.io.File;
39 import java.io.IOException;
40 import java.io.InputStream;
41 import java.io.InputStreamReader;
42 import java.lang.reflect.InvocationTargetException;
43
44 public class UninitializedDisplayModeChangeTest {
45 public static volatile boolean failed = false;
46 public static void main(String[] args) {
47 Toolkit.getDefaultToolkit();
48 try {
49 EventQueue.invokeAndWait(new Runnable() {
50 public void run() {
51 Thread.currentThread().setDefaultUncaughtExceptionHandler(
52 new Thread.UncaughtExceptionHandler() {
|