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
447447java/awt/image/VolatileImage/CustomCompositeTest.java 8199002 windows-all,linux-all
448448java/awt/image/VolatileImage/GradientPaints.java 8199003 linux-all
449449java/awt/JAWT/JAWT.sh 8197798 windows-all,linux-all
450- java/awt/Debug/DumpOnKey/DumpOnKey.java 8202667 windows-all
451450java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.java 8339929 linux-all
452451java/awt/datatransfer/ConstructFlavoredObjectTest/ConstructFlavoredObjectTest.java 8202860 linux-all
453452java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java 8202882 linux-all
Original file line number Diff line number Diff line change 11/*
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.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2222 */
2323
2424import java .awt .AWTException ;
25+ import java .awt .EventQueue ;
2526import java .awt .Frame ;
2627import java .awt .Robot ;
2728import java .awt .Window ;
@@ -58,9 +59,11 @@ public void list(final PrintStream out, final int indent) {
5859 w .setSize (200 , 200 );
5960 w .setLocationRelativeTo (null );
6061 w .setVisible (true );
62+ w .toFront ();
63+ w .requestFocus ();
6164
6265 final Robot robot = new Robot ();
63- robot .setAutoDelay (50 );
66+ robot .setAutoDelay (100 );
6467 robot .setAutoWaitForIdle (true );
6568 robot .mouseMove (w .getX () + w .getWidth () / 2 ,
6669 w .getY () + w .getHeight () / 2 );
@@ -74,7 +77,14 @@ public void list(final PrintStream out, final int indent) {
7477 robot .keyRelease (KeyEvent .VK_SHIFT );
7578 robot .keyRelease (KeyEvent .VK_CONTROL );
7679
77- w .dispose ();
80+ try {
81+ EventQueue .invokeAndWait (() -> {
82+ w .dispose ();
83+ });
84+ } catch (Exception e ) {}
85+
86+ robot .delay (2000 );
87+
7888 if (dumped != dump ) {
7989 throw new RuntimeException ("Exp:" + dump + ", actual:" + dumped );
8090 }
You can’t perform that action at this time.
0 commit comments