RFR: JDK-8340077 : Open source few Checkbox tests - Set2 [v3]

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Sep 25 07:30:40 UTC 2024


On Wed, 25 Sep 2024 05:11:49 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

>> Following tests are updated in this PR:
>> 
>> 1. 	test/jdk/java/awt/Checkbox/CheckboxBoxSizeTest.java
>> 2. 	test/jdk/java/awt/Checkbox/CheckboxIndicatorSizeTest.java
>> 3. 	test/jdk/java/awt/Checkbox/CheckboxNullLabelTest.java
>> 4. 	test/jdk/java/awt/Checkbox/CheckboxPreferredSizeTest.java
>
> Harshitha Onkar has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
> 
>  - Merge master
>  - problemlist updated
>  - eof newline
>  - checkbox tests

test/jdk/ProblemList.txt line 797:

> 795: java/awt/Checkbox/CheckboxBoxSizeTest.java 8340870 windows-all
> 796: java/awt/Checkbox/CheckboxIndicatorSizeTest.java 8340870 windows-all
> 797: java/awt/Checkbox/CheckboxBoxSizeTest.java 8340870 windows-all

duplicate addition CheckboxBoxSizeTest

test/jdk/java/awt/Checkbox/CheckboxBoxSizeTest.java line 43:

> 41:     private static final String INSTRUCTIONS = """
> 42:             This test must be run at UI Scale of 100% OR 150% or greater.
> 43:             Compare the size of box to any of native apps on Windows

Maybe you can mention anyone of the native app for easy verification...
Also, it seems if tester tests with 100%, it might look same and tester can pass it...I guess the problem comes with hidpi scale of 150% or more, so maybe we can remove 100% from instruction OR mention 100% AND 150% to check for both...

test/jdk/java/awt/Checkbox/CheckboxIndicatorSizeTest.java line 65:

> 63:             Verify that all indicators of checkboxes has the same size.
> 64:             Verify that all indicators of radio buttons has the same size.
> 65:             Press PASS if the above conditions are true else Press FAIL.

I guess "Same size" is not correct here...I guess what we meant is the size should be proportionate to scaling or "size will change if font size is changed", it seems the size does not increase if we increase the scale..
but it still remains the "same", so some tester can consider it pass

test/jdk/java/awt/Checkbox/CheckboxIndicatorSizeTest.java line 167:

> 165:         testPanel.setFont(newFont);
> 166:         frame.invalidate();
> 167:         frame.validate();

DO we need to invalidate and then validate? guess we can remove these 2 lines or does it have any impact on testing?

test/jdk/java/awt/Checkbox/CheckboxPreferredSizeTest.java line 58:

> 56: 
> 57:      private static Frame createAndShowUI() {
> 58:          StrangeCheckbox cbox = new StrangeCheckbox();

I guess we can bring in the code in the StrangeCheckbox constructor and remove that class altogether as it's not doing anything particular rather than implicitly creating a Frame..

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21094#discussion_r1774671318
PR Review Comment: https://git.openjdk.org/jdk/pull/21094#discussion_r1774646697
PR Review Comment: https://git.openjdk.org/jdk/pull/21094#discussion_r1774653116
PR Review Comment: https://git.openjdk.org/jdk/pull/21094#discussion_r1774654287
PR Review Comment: https://git.openjdk.org/jdk/pull/21094#discussion_r1774680092


More information about the client-libs-dev mailing list