RFR: 8328482: Convert and Open source few manual applet test to main based [v4]

Harshitha Onkar honkar at openjdk.org
Thu Mar 28 01:16:33 UTC 2024


On Wed, 27 Mar 2024 03:33:57 GMT, Tejesh R <tr at openjdk.org> wrote:

>> Convert and open source these manual applet test to main based:
>> java/awt/Frame/MegaIconTest/MegaIconTest.html
>> java/awt/Frame/FrameMaximizedTest/FrameMaximizedTest.html
>> java/awt/Frame/FrameMinimizeTest/FrameMinimizeTest.html
>> java/awt/Frame/SizeMinimizedTest/SizeMinimizedTest.html
>
> Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fight.gif added

test/jdk/java/awt/Frame/SizeMinimizedTest.java line 48:

> 46:                         continuously be logged, so you can verify its changes)
> 47:                         1. When the test starts, two frame windows will appear.
> 48:                         Note the size of frame2.

Window listeners can be used to check the initial and subsequent frame size and positions. This avoids asking the user to keep note of these details.

It could be potentially be automated at this point, if it doesn't require much effort.



frame2.addWindowListener(new WindowAdapter() {
            @Override
            public void windowOpened(WindowEvent e) {
                PassFailJFrame.log("Initial Frame Size: " + frame2.getSize());
                PassFailJFrame.log("Initial Frame Location: " + frame2.getLocationOnScreen());
            }
        });
frame2.addWindowStateListener(new WindowAdapter() {
          @Override
          public void windowStateChanged(WindowEvent e) {
              if (e.getNewState() == Frame.NORMAL) {
                  PassFailJFrame.log("Frame Size: " + frame2.getSize());
                  PassFailJFrame.log("Frame Location: " + frame2.getLocationOnScreen());
              }
          }
 });

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18448#discussion_r1542198112


More information about the client-libs-dev mailing list