RFR: 8332901: Choice/SelectCurrentItemTest/SelectCurrentItemTest.java doesn't open popup on macOS [v3]
Alexey Ivanov
aivanov at openjdk.org
Tue Aug 20 13:51:26 UTC 2024
> I looked at `java/awt/Choice/SelectCurrentItemTest/SelectCurrentItemTest.java`, ran it and noticed that the test does not open the popup of the `Choice` component on macOS 14.x.
>
> If the popup does not open, the test does not verify anything — it always passes.
>
> I refactored the test and added a mouse listener to the `Choice` component. If mouse click isn't registered, the test fails.
>
> The updated test fails for me locally on macOS Sonoma 14.5. This is likely the result of [JDK-8322653](https://bugs.openjdk.org/browse/JDK-8322653): _[macos14] : Mouse clicks are not received within 3 pixels of the window boundary_.
>
> The updated test passes on CI.
Alexey Ivanov has updated the pull request incrementally with four additional commits since the last revision:
- Remove SelectNewItemTest from ProblemList.txt
- Refactor Select{New,Current}ItemTest
Encapsulate the common logic in SelectCurrentItemTest.
Provide overridable checkXXX() methods to modify
conditions.
Provide an overridable method which defines where
to click in the choice popup to select an item.
- Move *CurrentItem*.java and *NewItem*.java to Choice/SelectItem/
- Refactor SelectNewItemTest similar to SelectCurrentItemTest
Use latches to control test flow instead of delays
and volatile variables.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20601/files
- new: https://git.openjdk.org/jdk/pull/20601/files/c288ab68..e6d0481b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20601&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20601&range=01-02
Stats: 618 lines in 5 files changed: 276 ins; 342 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/20601.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20601/head:pull/20601
PR: https://git.openjdk.org/jdk/pull/20601
More information about the client-libs-dev
mailing list