< prev index next >
test/jdk/com/sun/java/swing/plaf/windows/AltFocusIssueTest.java
Print this page
rev 53773 : 8219095: [testbug] Add @key headful to com/sun/java/swing/plaf/windows/AltFocusIssueTest.java
*** 1,7 ****
/*
! * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 19,35 ****
* 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 8211987
! @requires (os.family == "windows")
! @summary Verify if Menu bar gets input focus even if Alt-released event is consumed.
! @modules java.desktop/com.sun.java.swing.plaf.windows
! @run main AltFocusIssueTest
! */
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.lang.reflect.InvocationTargetException;
import java.awt.Robot;
--- 19,37 ----
* 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 8211987
! * @key headful
! * @requires (os.family == "windows")
! * @summary Verify if Menu bar gets input focus even if Alt-released event is consumed.
! * @modules java.desktop/com.sun.java.swing.plaf.windows
! * @run main AltFocusIssueTest
! */
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.lang.reflect.InvocationTargetException;
import java.awt.Robot;
*** 143,151 ****
--- 145,155 ----
public static void main(String[] args) throws Exception {
try {
testAltEvents();
} finally {
+ if (frame != null) {
SwingUtilities.invokeAndWait(() -> frame.dispose());
}
}
+ }
}
< prev index next >