RFR: 8327478: Add System test to verify TextSelection issue for webkit-617.1 [v3]

Gopal Pattnaik duke at openjdk.org
Mon Mar 3 12:10:47 UTC 2025


On Fri, 28 Feb 2025 21:37:38 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Gopal Pattnaik has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Addressed Review comments
>>  - Addressed Review comments
>
> tests/system/src/test/java/test/robot/javafx/web/TextSelectionTest.java line 45:
> 
>> 43: import test.util.Util;
>> 44: 
>> 45: public class TextSelectionTest {
> 
> I wonder if we could extend RobotTestBase base class to simplify the code?

Done.

> tests/system/src/test/java/test/robot/javafx/web/TextSelectionTest.java line 47:
> 
>> 45: public class TextSelectionTest {
>> 46: 
>> 47:     private static final String html = "<html>" +
> 
> we could use new java text block here
> 
> 
> private static final String html =
>     """
>     <html>
>     <head></head>
>     <body>&nbsp&nbsp&nbsp&nbsp some text</body>
>     </html>
>     """;

Done.

> tests/system/src/test/java/test/robot/javafx/web/TextSelectionTest.java line 97:
> 
>> 95: 
>> 96:         int x = (int)(scene.getWindow().getX() + scene.getX() + 22);
>> 97:         int y = (int)(scene.getWindow().getY() + scene.getY() + 15);
> 
> can these offsets (22, 15) be measured instead of hard-coded?

We are not getting the text area from web view. This point is used to simulate the mouse click.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1719#discussion_r1977381755
PR Review Comment: https://git.openjdk.org/jfx/pull/1719#discussion_r1977380257
PR Review Comment: https://git.openjdk.org/jfx/pull/1719#discussion_r1977379556


More information about the openjfx-dev mailing list