RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v4]

Sergey Bylokhov serb at openjdk.java.net
Wed Nov 24 06:11:07 UTC 2021


On Fri, 19 Nov 2021 21:36:57 GMT, Alisen Chung <achung at openjdk.org> wrote:

>> test/jdk/java/awt/Scrollbar/AquaLFScrollbarTest/ScrollBarBorderTest.java line 114:
>> 
>>> 112:                 = "\nINSTRUCTIONS:\n"
>>> 113:                 + "\n   Try to drag the thumb of the scrollbar into the red zone."
>>> 114:                 + "\n   If the thumb is able to go into the red zone, click fail."
>> 
>> If you place the thumb to the red zone by the code, will it be possible to check that by pixel color?
>
> Just updated the automation. I added a robot to try to move the thumb into the red zone, then had the robot click again to see if the thumb is under the cursor. If the behavior is correct, the thumb should have stopped before entering the red zone and scrollbar mouseListener should only detect 1 click. Otherwise it will detect 2 clicks (thumb is under cursor) and test fails. Is my logic correct?

But it is not necessary to use the robot at all? Can you try to set the scollbar thumb position/move it programmatically w/o a robot? If it is possible then it will be rendered on top of the red area -> it will be possible to render it to the buffered image and just check the pixel in the right position(is it red or not).

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

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



More information about the client-libs-dev mailing list