On Sun, 13 Sep 2026 11:28:54 GMT, Prasanta Sadhukhan <[email protected]> wrote:
> Test shows a Frame and then an application-modal Dialog, clicks at middle of > the frame and samples a pixel at dialog's center. > The frame should remain blocked and behind the modal dialog so expected pixel > color should be DIalog's GREEN color but fails in macos owing to minor color > difference `java.awt.Color[r=3,g=255,b=0] ` > so added a tolerance fix > but then found it fails 2 out of 50 iterations citing > java.awt.Color[r=0,g=0,b=255] due to race > so added a CountDownLatch to make it deterministic so that it waits for the > dialog to become focused/active before doing the click which passes for 100 > iterations > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Marked as reviewed by azvegint (Reviewer). test/jdk/java/awt/Modal/ModalDialogOrderingTest/ModalDialogOrderingTest.java line 112: > 110: robot.mouseMove(clickX, clickY); > 111: robot.mousePress(InputEvent.BUTTON1_MASK); > 112: robot.mouseRelease(InputEvent.BUTTON1_MASK); Deprecated constants can be replaced with `InputEvent.BUTTON1_DOWN_MASK`, since you're already touching the file. ------------- PR Review: https://git.openjdk.org/jdk/pull/32854#pullrequestreview-5200724161 PR Review Comment: https://git.openjdk.org/jdk/pull/32854#discussion_r4007707955
