On Tue, 23 Sep 2025 07:10:11 GMT, Prasanta Sadhukhan <[email protected]> wrote:
> Test frame is changed to Red for Mouse PRESSED and MOUSE_OVER state but it > seem time is too less before it is moved to Green when mouse press is > released so it retrieves Green instead of Red. > Also, the pixel color retrieval point is conflicting with mouse cursor > position, which gets picked up during `robot.createSceenCapture` execution so > retrieval point is moved slightly up instead of down. > > 100 iterations of the test passed in all platforms. Looks fine. However, I'd like to reduce the delay of 2 seconds to smaller value… test/jdk/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java line 92: > 90: robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); > 91: robot.waitForIdle(); > 92: robot.delay(2000); I wonder if syncing with `mousePressed` event handler on the button and adding a little delay after `mousePressed` is triggered would allow for smaller delay. Anyway, using an event handler will *guarantee*, the same handler is called in `ButtonUI`. We will still need a delay to allow the button UI delegate to handle the event and to repaint the button, yet that delay less than 2 seconds would be enough. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27444#pullrequestreview-3288320215 PR Review Comment: https://git.openjdk.org/jdk/pull/27444#discussion_r2394006008
