On Mon, 25 Sep 2023 16:43:57 GMT, Alexey Ivanov <[email protected]> wrote:

>> Alexander Zvegintsev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   review comments
>
> test/jdk/javax/swing/JFrame/DefaultCloseOperation.java line 1:
> 
>> 1: /*
> 
> I wonder if this test can be automated… On Windows, one could use `Alt+F4` or 
> close the window using robot. On macOS, the close button is also available 
> but it's on the left of the window. On Linux, it's close to impossible 
> because of different window managers.

I have already tried this using keyboard shortcuts.

Alt+F4 works fine on Window and Linux (many popular DEs close windows by Alt+F4 
by default, e.g. Gnome shell, Plasma).

For macos we don't have a system handler for Cmd + W

But I haven't tried to use mouse on the close button.

I think something could come out of this, Alt+F4 for Windows/Linux, mouse click 
on close button for macos.
But this will probably be a task for one of the next test sprints.

> test/jdk/javax/swing/JFrame/DefaultCloseOperation.java line 48:
> 
>> 46: public class DefaultCloseOperation extends JPanel {
>> 47:     private static final String INSTRUCTIONS = """
>> 48:         This is a manual test (requires user interaction) which tests the
> 
> I guess the instructions should be amended so that it is clear what is 
> required from the tester.
> 
> “To run this test, do the following steps…” could be replaced with “Do 
> (Perform) the following steps…”.
> 
> jtreg automatically handles exceptions, it will fail there's an unhandled 
> exception in the test.

Cleaned up.

> test/jdk/javax/swing/JFrame/DefaultCloseOperation.java line 78:
> 
>> 76:          -  Select "Dispose" from the "JDialog Default Close Operation" 
>> ComboBox
>> 77:          -  On the TestDialog, select "Close" from the system menu (the 
>> window should go away)
>> 78:         """;
> 
> I guess this test should disable Pass and Fail buttons. The Fail button 
> should remain disabled: the test will fail automatically. Yet the Pass button 
> may always be enabled, or it could be enabled only after the tester cycles 
> through all the scenarios.

I think it's fine the way it is now. Just in case the user sees some unusual 
failure.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336349131
PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336349339
PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336352531

Reply via email to