< prev index next >

test/jdk/java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java

Print this page
rev 51542 : 8210039: move OSInfo to top level testlibrary
Reviewed-by: duke

*** 26,43 **** @key headful @bug 7154072 7161320 @summary Tests that key events with modifiers are not swallowed. @author anton.tarasov: area=awt.focus @library ../../../regtesthelpers ! @library ../../../../../lib/testlibrary @modules java.desktop/sun.awt ! @build jdk.testlibrary.OSInfo @build Util @run main SwallowKeyEvents */ ! import jdk.testlibrary.OSInfo; import java.awt.AWTException; import java.awt.Frame; import java.awt.Robot; import java.awt.TextField; import java.awt.event.KeyAdapter; --- 26,43 ---- @key headful @bug 7154072 7161320 @summary Tests that key events with modifiers are not swallowed. @author anton.tarasov: area=awt.focus @library ../../../regtesthelpers ! @library /test/lib @modules java.desktop/sun.awt ! @build jdk.test.lib.Platform @build Util @run main SwallowKeyEvents */ ! import jdk.test.lib.Platform; import java.awt.AWTException; import java.awt.Frame; import java.awt.Robot; import java.awt.TextField; import java.awt.event.KeyAdapter;
*** 52,62 **** static Frame f = new Frame("Frame"); static TextField t = new TextField("text"); static Robot r; public static void main(String[] args) { ! if (OSInfo.getOSType() == OSInfo.OSType.WINDOWS) { System.out.println("Skipped. Test not for MS Windows."); return; } f.add(t); --- 52,62 ---- static Frame f = new Frame("Frame"); static TextField t = new TextField("text"); static Robot r; public static void main(String[] args) { ! if (Platform.isWindows()) { System.out.println("Skipped. Test not for MS Windows."); return; } f.add(t);
< prev index next >