RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests [v2]
Alexey Ivanov
aivanov at openjdk.org
Thu Apr 24 15:13:57 UTC 2025
On Wed, 23 Apr 2025 23:18:06 GMT, Manukumar V S <mvs at openjdk.org> wrote:
>> Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass().
>> Affected tests:
>> 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java
>> 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java
>> 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java
>>
>> Testing:
>> All the changed tests are tested manually and found to be working fine.
>
> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:
>
> Update Copyright year
Changes requested by aivanov (Reviewer).
test/jdk/java/awt/Desktop/BrowseTest.java line 34:
> 32:
> 33: import jtreg.SkippedException;
> 34: import java.awt.Desktop;
It is more common to put `jtreg.SkippedException` after `javax.*` imports followed by a blank line.
https://github.com/openjdk/jdk/blob/0edd018a48c202a6da4afe80e245799b47000885/test/jdk/javax/swing/Popup/TaskbarPositionTest.java#L58-L60
https://github.com/openjdk/jdk/blob/0edd018a48c202a6da4afe80e245799b47000885/test/jdk/javax/swing/plaf/basic/BasicSliderUI/bug4419255.java#L26-L28
The most common order of imports in JDK source and tests:
- classes in `java.*` packages;
- (optional blank line)
- classes in `javax.*` packages;
- (blank line)
- other imports (`com.*`, `sun.*`; includes jtreg.* and `test.*`)
- (blank line)
- static imports
This comment applies to all the tests.
test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java line 52:
> 50: If you see any EXCEPTION messages in the output press FAIL.
> 51: """;
> 52: static Desktop desktop;
Suggestion:
""";
static Desktop desktop;
This two fields are unrelated, a blank line separates them.
-------------
PR Review: https://git.openjdk.org/jdk/pull/24820#pullrequestreview-2791570458
PR Review Comment: https://git.openjdk.org/jdk/pull/24820#discussion_r2058670906
PR Review Comment: https://git.openjdk.org/jdk/pull/24820#discussion_r2058675794
More information about the client-libs-dev
mailing list