RFR: 8340790: Open source several AWT Dialog tests - Batch 4 [v2]
Tejesh R
tr at openjdk.org
Wed Oct 9 09:28:41 UTC 2024
On Tue, 8 Oct 2024 16:44:15 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Updated review comments
>
> test/jdk/java/awt/Dialog/ChoiceModalDialogTest.java line 100:
>
>> 98: EventQueue.invokeAndWait(() -> {
>> 99: r.mouseMove(tf.getLocationOnScreen().x + tf.getSize().width / 2,
>> 100: tf.getLocationOnScreen().y + tf.getSize().height / 2);
>
> Indentation here and at other locations
> Suggestion:
>
> r.mouseMove(tf.getLocationOnScreen().x + tf.getSize().width / 2,
> tf.getLocationOnScreen().y + tf.getSize().height / 2);
Updated.
> test/jdk/java/awt/Dialog/ChoiceModalDialogTest.java line 105:
>
>> 103: r.waitForIdle();
>> 104: EventQueue.invokeAndWait(() -> {
>> 105:
>
> Empty line
Updated.
> test/jdk/java/awt/Dialog/DialogBackgroundTest.java line 85:
>
>> 83: public TreeCopy(int windowNum, Window myParent) {
>> 84: super();
>> 85: setTitle("TreeCopy Frame #" + Integer.toString(windowNum));
>
> Suggestion:
>
> setTitle("TreeCopy Frame #" + windowNum);
Updated.
> test/jdk/java/awt/Dialog/EnabledResetTest.java line 56:
>
>> 54: If all the verifications are done, then test is
>> 55: PASSED, else test fails.
>> 56: """;
>
> Closing quotes placement here and at other places
> Suggestion:
>
> If all the verifications are done, then test is
> PASSED, else test fails.
> """;
Updated.
> test/jdk/java/awt/Dialog/FileDialogGetFileTest.java line 47:
>
>> 45: 3. If FileDialog.getFile return null then test PASSES,
>> 46: else test FAILS automatically.
>> 47: """;
>
> Closing quote indentation.
Updated.
> test/jdk/java/awt/Dialog/FileDialogGetFileTest.java line 61:
>
>> 59:
>> 60: public static Frame initialize() {
>> 61: frame = new Frame();
>
> Frame title missing
Added.
> test/jdk/java/awt/Dialog/FileDialogGetFileTest.java line 74:
>
>> 72: } else {
>> 73: PassFailJFrame.forcePass();
>> 74: }
>
> For pass case instead of forcePass() the msg can be logged in logArea as it allows the user to see the msg.
>
> Suggestion:
>
> if (fd.getFile() != null) {
> PassFailJFrame.forceFail("Test failed: FileDialog returned non-null value");
> } else {
> PassFailJFrame.log("Test passed: FileDialog returned null value as expected");
> }
Updated with `Test Passed`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21404#discussion_r1793181070
PR Review Comment: https://git.openjdk.org/jdk/pull/21404#discussion_r1793181174
PR Review Comment: https://git.openjdk.org/jdk/pull/21404#discussion_r1793181394
PR Review Comment: https://git.openjdk.org/jdk/pull/21404#discussion_r1793181580
PR Review Comment: https://git.openjdk.org/jdk/pull/21404#discussion_r1793181749
PR Review Comment: https://git.openjdk.org/jdk/pull/21404#discussion_r1793182566
PR Review Comment: https://git.openjdk.org/jdk/pull/21404#discussion_r1793182425
More information about the client-libs-dev
mailing list