--- old/test/java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java 2016-06-15 13:52:33.998315000 +0530 +++ new/test/java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java 2016-06-15 13:52:33.786208999 +0530 @@ -23,10 +23,12 @@ /* @test - @bug 8041928 + @bug 8041928 8158616 @summary Confirm that the Alt-Gr Modifier bit is set correctly. + @library ../../../../../lib/testlibrary @run main/manual AltGraphModifierTest */ + import java.awt.Button; import java.awt.Dialog; import java.awt.Frame; @@ -37,16 +39,13 @@ import java.awt.event.InputEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import jdk.testlibrary.OSInfo; public class AltGraphModifierTest { private static void init() throws Exception { String[] instructions = { "This test is for verifying Alt-Gr modifier of an event.", - "Windows :-", - "1. Click Pass.", - "2. Alt-Gr modifier is tested under Robot tests.", - " ", "Linux :-", "1. Please check if Alt-Gr key is present on keyboard.", "2. If present, press the Alt-Gr key and perform", @@ -63,7 +62,7 @@ "Mac :-", "1. Press Right Option key on the keyboard and mouse click", " on the TestWindow", - "3. Test will exit by itself with appropriate result.", + "2. Test will exit by itself with appropriate result.", }; Sysout.createDialog(); @@ -111,6 +110,10 @@ final private static int sleepTime = 300000; public static void main(String args[]) throws Exception { + if (OSInfo.getOSType() == OSInfo.OSType.WINDOWS) { + // For Windows: Alt-Gr modifier is tested under Robot tests. + return; + } mainThread = Thread.currentThread(); try { init(); @@ -209,7 +212,7 @@ public TestDialog(Frame frame, String name) { super(frame, name); int scrollBoth = TextArea.SCROLLBARS_BOTH; - instructionsText = new TextArea("", 15, maxStringLength, scrollBoth); + instructionsText = new TextArea("", 20, maxStringLength, scrollBoth); add("North", instructionsText); messageText = new TextArea("", 5, maxStringLength, scrollBoth);