Skip to content

Commit 11639f7

Browse files
committed
8202790: DnD test DisposeFrameOnDragTest.java does not clean up
Backport-of: 102a305f73d52d8e378de46c3c0b170db0f2c8af
1 parent ef0fc3e commit 11639f7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

test/jdk/ProblemList.txt

-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,6 @@ java/awt/JAWT/JAWT.sh 8197798 windows-all,linux-all
464464
java/awt/Debug/DumpOnKey/DumpOnKey.java 8202667 windows-all
465465
java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.java 8202926 linux-all
466466
java/awt/datatransfer/ConstructFlavoredObjectTest/ConstructFlavoredObjectTest.java 8202860 linux-all
467-
java/awt/dnd/DisposeFrameOnDragCrash/DisposeFrameOnDragTest.java 8202790 macosx-all,linux-all
468467
java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java 8202882,8255898 linux-all,macosx-all
469468
java/awt/Choice/ChoicePopupLocation/ChoicePopupLocation.java 8202931 macosx-all,linux-all
470469
java/awt/Focus/NonFocusableBlockedOwnerTest/NonFocusableBlockedOwnerTest.java 7124275 macosx-all

test/jdk/java/awt/dnd/DisposeFrameOnDragCrash/DisposeFrameOnDragTest.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
public class DisposeFrameOnDragTest {
5050

5151
private static JTextArea textArea;
52+
private static JFrame background;
5253

5354
public static void main(String[] args) throws Throwable {
5455

@@ -72,14 +73,20 @@ public void run() {
7273
Util.drag(testRobot,
7374
new Point((int) loc.x + 3, (int) loc.y + 3),
7475
new Point((int) loc.x + 40, (int) loc.y + 40),
75-
InputEvent.BUTTON1_MASK);
76+
InputEvent.BUTTON1_DOWN_MASK);
7677

7778
Util.waitForIdle(testRobot);
7879

7980
testRobot.delay(200);
81+
background.dispose();
8082
}
8183

8284
private static void constructTestUI() {
85+
background = new JFrame("Background");
86+
background.setBounds(100, 100, 100, 100);
87+
background.setUndecorated(true);
88+
background.setVisible(true);
89+
8390
final JFrame frame = new JFrame("Test frame");
8491
textArea = new JTextArea("Drag Me!");
8592
try {

0 commit comments

Comments
 (0)