author | prr |
Wed, 27 Feb 2019 14:30:08 -0800 | |
changeset 54230 | d9d9655bb077 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
26002
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
1 |
/* |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
2 |
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
4 |
* |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
8 |
* |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
13 |
* accompanied this code). |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
14 |
* |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
18 |
* |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
21 |
* questions. |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
22 |
*/ |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
23 |
|
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
24 |
/* |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
25 |
* @test |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
26 |
* @bug 8044614 |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
27 |
* @summary Tests focus transfer between applets in different browser windows |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
28 |
* @author Dmitry Markov |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
29 |
* @library ../../regtesthelpers |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
30 |
* @build Sysout |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
31 |
* @run applet/manual=yesno bug8044614.html |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
32 |
*/ |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
33 |
|
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
34 |
import javax.swing.JApplet; |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
35 |
|
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
36 |
import test.java.awt.regtesthelpers.Sysout; |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
37 |
|
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
38 |
public class bug8044614 extends JApplet { |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
39 |
public void init() { |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
40 |
String[] instructions = { |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
41 |
"(1) Go to the test directory test/java/awt/Focus/8044614", |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
42 |
"(2) Compile source file: javac TestApplet.java", |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
43 |
"(3) Open the \"main.html\" file in the browser", |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
44 |
"(4) Click the \"Start First Applet\" link to open the first applet window", |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
45 |
"(5) Wait for the applet to start (press \"Run\" to any security alerts that appears)", |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
46 |
"(6) Enter \"Hello\" to the text field", |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
47 |
"(7) Click the \"Start Second Applet)\" link to open the second applet window", |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
48 |
"(8) Wait for the applet to start (press \"Run\" to any security alerts that appears)", |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
49 |
"(9) Enter \"World\" to the text field", |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
50 |
"(10) Go back to the first applet and make sure you can enter some text to the text field" |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
51 |
}; |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
52 |
|
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
53 |
Sysout.createDialogWithInstructions(instructions); |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
54 |
} |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
55 |
} |
272da1566e9d
8044614: [macosx] Focus issue with 2 applets in firefox
dmarkov
parents:
diff
changeset
|
56 |