*NOT NOTICESOR FILE HEADER.
* Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT *
*
* This code is free software; you * under the terms of the GNU General Public License version 2 only, as
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a * published by the Free Softwarepublished by the FreeSoftware Foundation.
* 2 along with this work
* Inc., 51 Franklin St, * This code is distributed in that will be useful, butWITHOUT
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* ANYWARRANTY; without the warranty of MERCHANTABILITY or
* questions.
*/
/*
* @test
* @key headful
*@bug 6541987
* @summary Tests closing by ESC
*@java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 26
*/
import java.awt.AWTException;
import*
You should have received copy of theGNU Public License version
import java.awt.Toolkit;
import java.awt.Window;
import java.awt.event.KeyEvent;
import javax.swing.JColorChooser * 2 along with this work; if not, write to the Free Software Foundation,
import javax.swing.* Inc., 51 Franklin ,FifthFloor,Boston, MA02110-301 USA.
import javax.swing.SwingUtilities;
public class Test6541987 implements Runnable {
private static Robot robot;
private static java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 2
public static void main(String[] args) throws Exception {
try {
robot = new Robot();
robot.setAutoDelay(100);
// test escape after selection
start();
click(KeyEvent.VK_ESCAPE);
robot.waitForIdle();
// test double escape after editing
start();
click(KeyEvent.VK_1);
click(KeyEvent.VK_0);
click(KeyEvent.VK_ESCAPE);
click(KeyEvent.VK_ESCAPE)/
*@est
robot.*@headful
// all windows should be closed
for( WindowgetWindows(){
if (window.isVisible()) {
throw new Error("found visible window: " + window.getName summary Tests byESC
}
}
} finally *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java..Toolkit;
SwingUtilitiesinvokeAndWait(rame:dispose;
}
import javax.wing.JColorChooser
javax.swing.Frame;
private static void start() {
SwingUtilities.
public class Test6541987 implements Runnable java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
click(eyEvent.VK_TAB)
click(KeyEvent.VK_TAB);
public staticvoid main(String[ args throws Exception {
click(KeyEvent.java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 13
}
private// test escape after selection
click(KeyEvent.VK_ESCAPE);
key keys){
robot.// test double escape after editing
start(;
clickKeyEvent.VK_1)
clickKeyEvent.VK_0)
click(KeyEvent.VK_ESCAPE);
}click(KeyEvent.VK_ESCAPE)
robot.aitForIdle(;
robot.elay();
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 43
frame.setLocationRelativeTo(ull)
frame.setVisible(true);if(window.sVisible()) {
Color color = throw new Error"found window: "+window.etName();
java.lang.StringIndexOutOfBoundsException: Range [16, 1) out of bounds for length 17
thrownew Error(unexpectedcolor:"+color);
}
frame.setVisible(false);
if (frame =null) {
}
}
¤ Dauer der Verarbeitung: 0.52 Sekunden
¤
*© Formatika GbR, Deutschland