On Mon, 18 Mar 2024 17:27:43 GMT, Harshitha Onkar <[email protected]> wrote:

>> This test is converted to main using PassFailJFrame. It verifies wheel 
>> rotation value for high-res mouse on windows.
>> 
>> The test requires the updated PassFailJFrame's logArea() feature added in 
>> this PR https://github.com/openjdk/jdk/pull/18319
>
> Harshitha Onkar has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   minor changes

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/event/MouseEvent/AWTPanelSmoothWheel.java line 32:

> 30:  * @test
> 31:  * @bug 6730447
> 32:  * @summary [Win] To verify the support for high resolution mouse wheel 
> on Windows.

This could be applicable to other platforms too, even though 
[JDK-6730447](https://bugs.openjdk.org/browse/JDK-6730447) and 
[JDK-6524352](https://bugs.openjdk.org/browse/JDK-6524352) are reported against 
Windows only. It could be than support for high-resolution mouse wheel was 
implemented on macOS earlier than on Windows.

test/jdk/java/awt/event/MouseEvent/AWTPanelSmoothWheel.java line 42:

> 40: public class AWTPanelSmoothWheel {
> 41:     public static final String INSTRUCTIONS = """
> 42:             This test is relevant for windows platforms and mouses with 
> high-resolution wheel,

Suggestion:

            This test is relevant for windows platforms and mice with 
high-resolution wheel,

test/jdk/java/awt/event/MouseEvent/AWTPanelSmoothWheel.java line 49:

> 47:             below the instruction window.
> 48:             Please make sure that some of the messages have non-zero 
> 'wheelRotation' value,
> 49:             and also check if the test works OK if the mouse wheel is 
> rotated very slow.

Shall we increase the width of the instruction window so that less horizontal 
scrolling is needed?

The test can actually verify the condition without help from the user. The 
handler for `MouseWheelListener` could well look into the `MouseWheelEvent` and 
verify _automatically_ if `scrollType=WHEEL_UNIT_SCROLL` and there are any 
events with `wheelRotation=1` (or rather `wheelRotation!=0`).

You can even `forcePass` the test as soon as you detected few events which 
satisfy the condition.

If you don't see events with `scrollType=WHEEL_UNIT_SCROLL`, then the mouse 
doesn't support high-resolution scrolling.

test/jdk/java/awt/event/MouseEvent/AWTPanelSmoothWheel.java line 54:

> 52:             """;
> 53: 
> 54:     public static void main (String[] args) throws Exception {

Suggestion:

    public static void main(String[] args) throws Exception {

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

PR Review: https://git.openjdk.org/jdk/pull/18312#pullrequestreview-1946973667
PR Review Comment: https://git.openjdk.org/jdk/pull/18312#discussion_r1530851645
PR Review Comment: https://git.openjdk.org/jdk/pull/18312#discussion_r1530833558
PR Review Comment: https://git.openjdk.org/jdk/pull/18312#discussion_r1530845488
PR Review Comment: https://git.openjdk.org/jdk/pull/18312#discussion_r1530845747

Reply via email to