Skip to content

8364363: Modify some manual test instructions #26636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

DamonGuy
Copy link
Contributor

@DamonGuy DamonGuy commented Aug 5, 2025

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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8364363: Modify some manual test instructions (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26636/head:pull/26636
$ git checkout pull/26636

Update a local copy of the PR:
$ git checkout pull/26636
$ git pull https://git.openjdk.org/jdk.git pull/26636/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26636

View PR using the GUI difftool:
$ git pr show -t 26636

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26636.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 5, 2025

👋 Welcome back dnguyen! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Aug 5, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 5, 2025
@openjdk
Copy link

openjdk bot commented Aug 5, 2025

@DamonGuy The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@mlbridge
Copy link

mlbridge bot commented Aug 5, 2025

Webrevs

Comment on lines 46 to 48
3) The test fails if you see messages about drag
events for anything other than list0.
The test passes if you don't.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to automate this part? I mean, automatically flag the test as failed (after displaying a message to the tester after dragging is complete).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have gone ahead and updated the test to be automated. I tested this on macOS (where the test skips since the test only works for XToolkit) and on Ubuntu on Xorg (where the test is automated and passes with no outputted events).

Comment on lines 61 to 71
Button btn = new Button("Append \'cool\'");
btn.addActionListener(e -> area.append("cool "));
add("South", btn);
area = new TextArea("AWT is cool ", 3, 3, TextArea.SCROLLBARS_NONE);
add("Center", area);
setSize(200, 200);
StringBuilder coolStr = new StringBuilder("");
// I count 15 lines with 12 cools per line
for (int i = 0; i < 12 * 15; i++) {
coolStr.append("cool ");
}
coolStr.append("!!!!!!!");
area.append(coolStr.toString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is adding 12 * 15 cools not enough?

The original instructions are pretty clear: if you see the exclamation marks, then auto-scrolling works correctly; otherwise, it auto-scrolling doesn't work as expected and the tester has to click Fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was testing this on different OS's and on macOS the text is cut off and none of the text renders after a certain point.

This is what it looks like when I manually move the text cursor down to scroll the text area down a bit:
Screenshot 2025-08-13 at 11 17 56 AM

I suppose this is a macOS bug. On linux (X11 and Wayland), this works fine, but the test does not start with the textarea showing the exclamation marks. Instead, it starts at the top. But, all of the text renders correctly when scrolled down. When I manually append another cool to the text area, the auto scroll and rendering of all the text works fine for all OS's.
Screenshot 2025-08-13 at 11 23 48 AM

What I think I understand now is, there is most likely a macOS bug here and the test fails on linux. I'll revert the changes to this test. I think this also means I should ProblemList this test. I will, however, try fiddling with this test to see if I can get the programmatic appending to render on macOS and figure out the source of the issue. Maybe it will work with an added delay in the beginning or something of the sort.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aivanov-jdk Is problem-listing this test the ideal solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

3 participants