On Wed, 13 Aug 2025 20:32:10 GMT, Damon Nguyen <dngu...@openjdk.org> wrote:

>> When testing jtreg manual tests, some tests had unclear instructions. This 
>> PR is an attempt at updating these tests for clarity. 
>> 
>> `MouseDraggedOriginatedByScrollBarTest.java` works as expected when compared 
>> to native apps and outputs drag events even when the mouse pointer is 
>> dragged off of the scrollbar and window altogether. Events should still 
>> fire, but the previous instructions may make this confusing since it reads 
>> as if no events should be output to the textarea at all.
>> 
>> `TextAreaAppendScrollTest2.java` seems to not work when testing with the 
>> previous implementation of programmatically appending strings to the 
>> textarea. When I scroll down using the down arrow key, none of the text 
>> below would be visible when the textarea is scrolled down. However, it would 
>> show if I pressed `ENTER` to create a new line or manually modify the text 
>> in the textarea first. So instead, I have implemented the original reported 
>> approach to the test of adding a button to append a string to the textarea 
>> to test for automatic scrolling when the word is wrapped to a new line.
>
> Damon Nguyen has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Fix correcting character limit to undo all changes and leave file 
> untouched.
>  - Convert test to auto. Revert TextArea test changes

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/List/MouseDraggedOriginatedByScrollBarTest.java line 58:

> 56:             System.out.println("The test is XAWT-only.");
> 57:             return;
> 58:         }

Use `@requires os.family == "linux"` to avoid starting the test on other OS.

This check can then be removed.

test/jdk/java/awt/List/MouseDraggedOriginatedByScrollBarTest.java line 66:

> 64:             if (frame != null) {
> 65:                 EventQueue.invokeAndWait(() -> frame.dispose());
> 66:             }

Let's be consistent:
Suggestion:

            EventQueue.invokeAndWait(() -> {
                if (frame != null) {
                    frame.dispose();
                }
            });

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

PR Review: https://git.openjdk.org/jdk/pull/26636#pullrequestreview-3150800271
PR Review Comment: https://git.openjdk.org/jdk/pull/26636#discussion_r2297707365
PR Review Comment: https://git.openjdk.org/jdk/pull/26636#discussion_r2297715628

Reply via email to