Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/java/awt/Focus/8044614/bug8044614.java
48255 views
/*1* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/*24* @test25* @bug 804461426* @summary Tests focus transfer between applets in different browser windows27* @author Dmitry Markov28* @library ../../regtesthelpers29* @build Sysout30* @run applet/manual=yesno bug8044614.html31*/3233import javax.swing.JApplet;3435import test.java.awt.regtesthelpers.Sysout;3637public class bug8044614 extends JApplet {38public void init() {39String[] instructions = {40"(1) Go to the test directory test/java/awt/Focus/8044614",41"(2) Compile source file: javac TestApplet.java",42"(3) Open the \"main.html\" file in the browser",43"(4) Click the \"Start First Applet\" link to open the first applet window",44"(5) Wait for the applet to start (press \"Run\" to any security alerts that appears)",45"(6) Enter \"Hello\" to the text field",46"(7) Click the \"Start Second Applet)\" link to open the second applet window",47"(8) Wait for the applet to start (press \"Run\" to any security alerts that appears)",48"(9) Enter \"World\" to the text field",49"(10) Go back to the first applet and make sure you can enter some text to the text field"50};5152Sysout.createDialogWithInstructions(instructions);53}54}55565758