On Tue, 19 Apr 2022 20:03:57 GMT, Alexander Zvegintsev <azveg...@openjdk.org> 
wrote:

> Test was written based on assumption that we will receive only one 
> `mouseWheelMoved` event with `getWheelRotation() == 20` after 
> `robot.mouseWheel(20)` call, but we can receive 20  events with 
> `getWheelRotation == 1` instead.
> 
> So the test is modified to accumulate wheel rotation values before checking.
> 
> Testing is green on all platforms.

test/jdk/java/awt/Robot/RobotWheelTest/RobotWheelTest.java line 47:

> 45: 
> 46:     private static AtomicInteger wheelRotation = new AtomicInteger();
> 47:     private static int wheelSign = Platform.isOSX() ? -1 : 1;

Is this the scroll rotation direction?
If it is, then as you can see in  JDK-8282716 review comments, this direction 
can be configured so we cannot rely on this it will always be -1 for macos...
Maybe you can do the same as it is done there to check at runtime what is the 
scroll direction configured?

-------------

PR: https://git.openjdk.java.net/jdk/pull/8305

Reply via email to