Hi All, Kindly review the fix for JDK9. Bug: https://bugs.openjdk.java.net/browse/JDK-7087869 <https://bugs.openjdk.java.net/browse/JDK-7087869>
Webrev: http://cr.openjdk.java.net/~arapte/manajit/7087869/webrev.00/ <http://cr.openjdk.java.net/~arapte/manajit/7087869/webrev.00/> Issue: [TEST_BUG] [macosx] No mac os x support in test java/awt/Mouse/ExtraMouseClick/ExtraMouseClick. Cause and Fix: There were 2 problems on MacOS X: First problem: ----------System.err:(6/527)---------- java.lang.RuntimeException: Test failed. Clicked event follows by Dragged. Dragged = true. Clicked = true : distance = 2 at ExtraMouseClick.oneDrag(ExtraMouseClick.java:177) at ExtraMouseClick.start(ExtraMouseClick.java:119) at com.sun.javatest.regtest.agent.AppletWrapper$AppletRunnable.run(AppletWrapper.java:158) at java.lang.Thread.run(Thread.java:747) STATUS:Failed.Applet thread threw exception: java.lang.RuntimeException: Test failed. Clicked event follows by Dragged. Dragged = true. Clicked = true : distance = 2 Fix explaination: Fixed by adding a waitForIdle() to wait for the mouse move event to be processed completely so that mouse clicked event doesn’t get generated. Second Problem: ----------System.err:(6/539)---------- java.lang.RuntimeException: Test failed. Dragged event (by the X-axis) occured in SMUDGE area. Dragged = true. Clicked = true at ExtraMouseClick.smallDrag(ExtraMouseClick.java:194) at ExtraMouseClick.start(ExtraMouseClick.java:161) at com.sun.javatest.regtest.agent.AppletWrapper$AppletRunnable.run(AppletWrapper.java:158) at java.lang.Thread.run(Thread.java:747) STATUS:Failed.Applet thread threw exception: java.lang.RuntimeException: Test failed. Dragged event (by the X-axis) occured in SMUDGE area. Dragged = true. Clicked = true Fix explaination: On MacOS X every mouse move event is considered as MOUSE_DRAGGED event. So on every mouse move event, Native side propagates MOUSE_DRAGGED event to Java side. The native method CRobot::mouseEvent() is called with parameter isMouseMove set to true for Robot.mouseMove(). In turn CRobot::Java_sun_lwawt_macosx_CRobot_mouseEvent() posts a mouse Drag event back to java side by calling PostMouseEvent(). Therefore the test has to be skipped for Mac. Regards, Manajit
