File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -447,7 +447,6 @@ java/awt/font/TextLayout/LigatureCaretTest.java 8266312 generic-all
447
447
java/awt/image/VolatileImage/CustomCompositeTest.java 8199002 windows-all,linux-all
448
448
java/awt/image/VolatileImage/GradientPaints.java 8199003 linux-all
449
449
java/awt/JAWT/JAWT.sh 8197798 windows-all,linux-all
450
- java/awt/Debug/DumpOnKey/DumpOnKey.java 8202667 windows-all
451
450
java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.java 8339929 linux-all
452
451
java/awt/datatransfer/ConstructFlavoredObjectTest/ConstructFlavoredObjectTest.java 8202860 linux-all
453
452
java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java 8202882 linux-all
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
22
22
*/
23
23
24
24
import java .awt .AWTException ;
25
+ import java .awt .EventQueue ;
25
26
import java .awt .Frame ;
26
27
import java .awt .Robot ;
27
28
import java .awt .Window ;
@@ -58,9 +59,11 @@ public void list(final PrintStream out, final int indent) {
58
59
w .setSize (200 , 200 );
59
60
w .setLocationRelativeTo (null );
60
61
w .setVisible (true );
62
+ w .toFront ();
63
+ w .requestFocus ();
61
64
62
65
final Robot robot = new Robot ();
63
- robot .setAutoDelay (50 );
66
+ robot .setAutoDelay (100 );
64
67
robot .setAutoWaitForIdle (true );
65
68
robot .mouseMove (w .getX () + w .getWidth () / 2 ,
66
69
w .getY () + w .getHeight () / 2 );
@@ -74,7 +77,14 @@ public void list(final PrintStream out, final int indent) {
74
77
robot .keyRelease (KeyEvent .VK_SHIFT );
75
78
robot .keyRelease (KeyEvent .VK_CONTROL );
76
79
77
- w .dispose ();
80
+ try {
81
+ EventQueue .invokeAndWait (() -> {
82
+ w .dispose ();
83
+ });
84
+ } catch (Exception e ) {}
85
+
86
+ robot .delay (2000 );
87
+
78
88
if (dumped != dump ) {
79
89
throw new RuntimeException ("Exp:" + dump + ", actual:" + dumped );
80
90
}
You can’t perform that action at this time.
0 commit comments