-
Bug
-
Resolution: Not an Issue
-
P4
-
6, 6u10, 7
-
generic, x86, sparc
-
generic, solaris_10, windows_xp, windows_vista
Here's a test case:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
/*
* @test %I% %E%
* @bug 4942216
* @summary Tests 4942216
* @library ../../../../javax/swing/regtesthelpers
* @build SwingTestHelper Test JRobot Assert
* @run main bug4942216
* @author Scott Violet
*/
public class bug4942216 extends SwingTestHelper {
private JTextField textField;
public static void main(String[] args) throws Throwable {
new bug4942216().run(args);
}
protected Component createContentPane() {
textField = new JTextField();
textField.setAutoscrolls(true);
return textField;
}
public void onEDT10() {
robot.moveMouseTo(textField);
robot.mousePress(InputEvent.BUTTON1_MASK);
waitForEvent(textField, MouseEvent.MOUSE_PRESSED);
}
public void onEDT20() {
Point loc = textField.getLocationOnScreen();
robot.mouseMove(loc.x + textField.getWidth() + 10,
loc.y + textField.getHeight() + 10);
waitForEvent(textField, MouseEvent.MOUSE_EXITED);
}
public void onEDT30() {
Point loc = textField.getLocationOnScreen();
textField.setVisible(false);
robot.mouseMove(loc.x + textField.getWidth() + 20,
loc.y + textField.getHeight() + 20);
waitForEvent(textField, MouseEvent.MOUSE_DRAGGED);
}
public void onEDT40() {
robot.mouseRelease(InputEvent.BUTTON1_MASK);
waitForEvent(textField, MouseEvent.MOUSE_RELEASED);
}
}
This relies on SwingTestHelper and other classes which can be found in test/javax/swing/regtesthelpers. On my solaris box running this test produces:
Exception in thread "Thread-1" sun.awt.SunToolkit$InfiniteLoop
> >>>> at sun.awt.SunToolkit.realSync(SunToolkit.java:1424)
> >>>> at SwingTestHelper.controlLoop(SwingTestHelper.java:513)
> >>>> at SwingTestHelper.access$600(SwingTestHelper.java:173)
> >>>> at SwingTestHelper$4.run(SwingTestHelper.java:470)
> >>>> at java.lang.Thread.run(Thread.java:619)
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
/*
* @test %I% %E%
* @bug 4942216
* @summary Tests 4942216
* @library ../../../../javax/swing/regtesthelpers
* @build SwingTestHelper Test JRobot Assert
* @run main bug4942216
* @author Scott Violet
*/
public class bug4942216 extends SwingTestHelper {
private JTextField textField;
public static void main(String[] args) throws Throwable {
new bug4942216().run(args);
}
protected Component createContentPane() {
textField = new JTextField();
textField.setAutoscrolls(true);
return textField;
}
public void onEDT10() {
robot.moveMouseTo(textField);
robot.mousePress(InputEvent.BUTTON1_MASK);
waitForEvent(textField, MouseEvent.MOUSE_PRESSED);
}
public void onEDT20() {
Point loc = textField.getLocationOnScreen();
robot.mouseMove(loc.x + textField.getWidth() + 10,
loc.y + textField.getHeight() + 10);
waitForEvent(textField, MouseEvent.MOUSE_EXITED);
}
public void onEDT30() {
Point loc = textField.getLocationOnScreen();
textField.setVisible(false);
robot.mouseMove(loc.x + textField.getWidth() + 20,
loc.y + textField.getHeight() + 20);
waitForEvent(textField, MouseEvent.MOUSE_DRAGGED);
}
public void onEDT40() {
robot.mouseRelease(InputEvent.BUTTON1_MASK);
waitForEvent(textField, MouseEvent.MOUSE_RELEASED);
}
}
This relies on SwingTestHelper and other classes which can be found in test/javax/swing/regtesthelpers. On my solaris box running this test produces:
Exception in thread "Thread-1" sun.awt.SunToolkit$InfiniteLoop
> >>>> at sun.awt.SunToolkit.realSync(SunToolkit.java:1424)
> >>>> at SwingTestHelper.controlLoop(SwingTestHelper.java:513)
> >>>> at SwingTestHelper.access$600(SwingTestHelper.java:173)
> >>>> at SwingTestHelper$4.run(SwingTestHelper.java:470)
> >>>> at java.lang.Thread.run(Thread.java:619)
- duplicates
-
JDK-6652154 java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogTest/EnqueueWithDialogTest.html fails
- Closed
-
JDK-6962738 Regtest javax/swing/system/6799345/TestShutdown.java fails on Solaris 10
- Closed
-
JDK-6438721 regression test java/awt/Toolkit/RealSync/Test.java fails in b87
- Closed
- relates to
-
JDK-7124239 [macosx] sun.awt.SunToolkit.InfiniteLoop exception in realSync called from SwingTestHelper
- Resolved