< prev index next >
test/javax/swing/plaf/windows/6921687/bug6921687.java
Print this page
rev 17561 : 8185500: [TESTBUG] Add keywords headful/printer in java/awt and javax tests.
Summary: Add new keyword 'printer'. Some minor test fixes to show headless exception. Add some @requires windows.
*** 19,40 ****
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! /*
* @test
* @bug 6921687 8079428
* @summary Mnemonic disappears after repeated attempts to open menu items using
* mnemonics
* @author Semyon Sadetsky
* @library /test/lib
* @build jdk.test.lib.Platform
* @requires (os.family == "windows")
* @modules java.desktop/com.sun.java.swing.plaf.windows
* @run main bug6921687
*/
import java.awt.Robot;
import java.awt.event.KeyEvent;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
--- 19,42 ----
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! /**
* @test
+ * @key headful
* @bug 6921687 8079428
* @summary Mnemonic disappears after repeated attempts to open menu items using
* mnemonics
* @author Semyon Sadetsky
* @library /test/lib
* @build jdk.test.lib.Platform
* @requires (os.family == "windows")
* @modules java.desktop/com.sun.java.swing.plaf.windows
* @run main bug6921687
*/
+
import java.awt.Robot;
import java.awt.event.KeyEvent;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
*** 81,91 ****
robot.keyRelease(KeyEvent.VK_ALT);
robot.waitForIdle();
checkMnemonics();
System.out.println("ok");
} finally {
! frame.dispose();
}
}
private static void checkMnemonics() throws Exception {
--- 83,93 ----
robot.keyRelease(KeyEvent.VK_ALT);
robot.waitForIdle();
checkMnemonics();
System.out.println("ok");
} finally {
! if (frame != null) { frame.dispose(); }
}
}
private static void checkMnemonics() throws Exception {
< prev index next >