Skip to content
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

8327478: Add System test to verify TextSelection issue for webkit-617.1 #1719

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gopalora
Copy link

@Gopalora Gopalora commented Feb 21, 2025

There was no test included with the fix for JDK-8326989,

Hence we are adding a system test now.

Test is written as

  1. Load html content in web view.
  2. pick the color of mouse pointer.
  3. Perform double click.
  4. pick the color again.

expected bahaviour: colour picked in step 2 and 4 should not match.

Verification:
The test passes with latest webkit source
Also verified that test fails when the fix for JDK-8326989 is reverted.


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

Error

 ⚠️ OCA signatory status must be verified

Issue

  • JDK-8327478: Add System test to verify TextSelection issue for webkit-617.1 (Bug - P3)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1719

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1719.diff

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Feb 21, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Feb 21, 2025

Hi @Gopalora, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user Gopalora" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk
Copy link

openjdk bot commented Feb 21, 2025

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

@Gopalora
Copy link
Author

/covered

@bridgekeeper bridgekeeper bot added the oca-verify Needs verification of OCA signatory status label Feb 24, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Feb 24, 2025

Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@kevinrushforth
Copy link
Member

@Gopalora Please enable GHA tests on your repo.

I'll provide a few comments now, and formally review it once your OCA status is verified.

int y = (int)(scene.getWindow().getY() + scene.getY() + 15);

Util.runAndWait(() -> {
robot.mouseMove(1, 1);
Copy link
Member

Choose a reason for hiding this comment

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

Minor: use the utility method Util.parkCursor(robot); instead

Util.sleep(500);

Util.runAndWait(() -> {
robot.mouseMove(1, 1);
Copy link
Member

Choose a reason for hiding this comment

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

Minor: use the utility method Util.parkCursor(robot); instead

Comment on lines +106 to +110
robot.mousePress(MouseButton.PRIMARY);
robot.mouseRelease(MouseButton.PRIMARY);
Util.sleep(50);
robot.mousePress(MouseButton.PRIMARY);
robot.mouseRelease(MouseButton.PRIMARY);
Copy link
Member

Choose a reason for hiding this comment

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

Minor: You can call robot.mouseClick(MouseButton) instead of separate calls to press/release.

Not so minor: You shouldn't' sleep in the FX app thread. Instead, break this block into two separate lambdas passed into to separate calls to runAndWait with the sleep in between them running in the test thread. Like this:

        Util.runAndWait(() -> {
            ...
            robot.mouseClick(MouseButton.PRIMARY);
        });
        Util.sleep(50);
        Util.runAndWait(() -> {
            robot.mouseClick(MouseButton.PRIMARY);
        });

Suggestion: consider creating a doubleClick utility method in the test Util class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status
Development

Successfully merging this pull request may close these issues.

2 participants