1 /*
2 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
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 4799136
27 @summary Tests that type-ahead for dialog works and doesn't block program
28 @author Dmitry.Cherepanov@SUN.COM area=awt.focus
29 @run main EnqueueWithDialogButtonTest
30 */
31
32 import java.awt.*;
33 import java.lang.reflect.InvocationTargetException;
34 import java.awt.event.*;
35 import java.util.concurrent.CountDownLatch;
36 import java.util.concurrent.TimeUnit;
37
38 /*
39 * Tests that type-ahead works correctly. That means
40 * that the key events are not delivered until a focus
41 * transfer is completed.
42 * There is another pretty similar test EnqueueWithDialogTest
43 * written in time before 6347235 resolution. We'll keep it
44 * to track quite unrelated suspicious waitForIdle behavior.
45 */
46
47 public class EnqueueWithDialogButtonTest
48 {
49 static Frame f;
50 static Button b;
|
1 /*
2 * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
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 * @key headful
27 * @bug 4799136
28 * @summary Tests that type-ahead for dialog works and doesn't block program
29 * @author Dmitry.Cherepanov@SUN.COM area=awt.focus
30 * @run main EnqueueWithDialogButtonTest
31 */
32
33 import java.awt.*;
34 import java.lang.reflect.InvocationTargetException;
35 import java.awt.event.*;
36 import java.util.concurrent.CountDownLatch;
37 import java.util.concurrent.TimeUnit;
38
39 /*
40 * Tests that type-ahead works correctly. That means
41 * that the key events are not delivered until a focus
42 * transfer is completed.
43 * There is another pretty similar test EnqueueWithDialogTest
44 * written in time before 6347235 resolution. We'll keep it
45 * to track quite unrelated suspicious waitForIdle behavior.
46 */
47
48 public class EnqueueWithDialogButtonTest
49 {
50 static Frame f;
51 static Button b;
|