On Mon, 14 Apr 2025 13:10:05 GMT, Gopal Pattnaik <[email protected]> wrote:
>> There was a Assertion fail issue in mouse location test case JDK-8296554,
>> Reason: We felt the one mili second delay time for the Robot test may be
>> insufficient in few OS.
>> Solution: We Changed the delay time to three mili second.
>>
>> Verification:
>> Tested in Windows 11, and the Assert fail issue is not found.
>
> Gopal Pattnaik has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Addressed Review comments
tests/system/src/test/java/test/robot/javafx/scene/MouseLocationOnScreenTest.java
line 123:
> 121: try {
> 122: Util.sleep(DELAY_TIME);
> 123: Assertions.assertEquals(x, (int) robot.getMouseX());
this works also, though I'd simply use `if`.
A bigger question is why are we using `int` coordinates? Wouldn't it make the
test depend on the scale (and also on the screen resolution and window
position)?
Should we instead use the double coordinates and `Assertions.equals(double,
double, double)` ?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1772#discussion_r2042526271