mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-21 21:33:07 +00:00
8233634: [TESTBUG] Swing text test bug4278839.java fails on macos
Reviewed-by: serb
This commit is contained in:
parent
4a5b745acc
commit
456fd9003e
@ -842,7 +842,6 @@ javax/swing/text/StyledEditorKit/4506788/bug4506788.java 8233561 macosx-all
|
||||
javax/swing/text/JTextComponent/6361367/bug6361367.java 8233569 macosx-all
|
||||
javax/swing/text/html/HTMLEditorKit/5043626/bug5043626.java 233570 macosx-all
|
||||
javax/swing/text/GlyphPainter2/6427244/bug6427244.java 8208566 macosx-all
|
||||
javax/swing/text/DefaultEditorKit/4278839/bug4278839.java 8233634 macosx-all
|
||||
javax/swing/ProgressMonitor/ProgressMonitorEscapeKeyPress.java 8233635 macosx-all
|
||||
javax/swing/plaf/nimbus/TestNimbusOverride.java 8233559 macosx-all
|
||||
javax/swing/JTree/4927934/bug4927934.java 8233550 macosx-all
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 4278839
|
||||
* @bug 4278839 8233634
|
||||
* @summary Incorrect cursor movement between words at the end of line
|
||||
* @author Anton Nashatyrev
|
||||
* @library ../../../regtesthelpers
|
||||
@ -41,12 +41,13 @@ public class bug4278839 extends JFrame {
|
||||
private static boolean passed = true;
|
||||
private static JTextArea area;
|
||||
private static Robot robo;
|
||||
private static JFrame frame;
|
||||
|
||||
public static void main(String[] args) {
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
|
||||
robo = new Robot();
|
||||
robo.setAutoDelay(100);
|
||||
robo.setAutoDelay(200);
|
||||
|
||||
SwingUtilities.invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
@ -60,6 +61,7 @@ public class bug4278839 extends JFrame {
|
||||
clickMouse();
|
||||
robo.waitForIdle();
|
||||
|
||||
area.setCaretPosition(0);
|
||||
|
||||
if ("Aqua".equals(UIManager.getLookAndFeel().getID())) {
|
||||
Util.hitKeys(robo, KeyEvent.VK_HOME);
|
||||
@ -86,6 +88,10 @@ public class bug4278839 extends JFrame {
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Test failed because of an exception:",
|
||||
e);
|
||||
} finally {
|
||||
if (frame != null) {
|
||||
SwingUtilities.invokeAndWait(() -> frame.dispose());
|
||||
}
|
||||
}
|
||||
|
||||
if (!passed) {
|
||||
@ -143,7 +149,7 @@ public class bug4278839 extends JFrame {
|
||||
}
|
||||
|
||||
private static void createAndShowGUI() {
|
||||
JFrame frame = new JFrame();
|
||||
frame = new JFrame();
|
||||
frame.setTitle("Bug# 4278839");
|
||||
frame.setSize(200, 200);
|
||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user