RFR: 8288444: Remove the workaround for frame.pack() in ModalDialogTest

Harshitha Onkar honkar at openjdk.org
Fri Jun 24 22:22:35 UTC 2022


Previously frame.pack() was called twice as a workaround  AWT frame sizing issue in this particular test case on Windows. This issue was fixed **[JDK-8265586](https://bugs.openjdk.org/browse/JDK-8265586)** and hence the workaround is being removed from this test.

PassFailJFrame is being used as the test framework. Since only the root frame of this test is being added to PassFailJFrame, no additional changes are required on PassFailJFrame.java

**Proposed change related to PassFailJFrame Test framework**

Instead of creating new methods to handle AWT Windows as well as Frames, method signatures - [**PassFailJFrame .positionTestFrame()**](https://urldefense.com/v3/__https://github.com/openjdk/jdk/blob/53b37fe1535388eb14e04c620a6b0118ed8884a0/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java*L271__;Iw!!ACWV5N9M2RV99hQ!N9BsFaF3cRzz4adDsuCirNEsZjEpgcd-LeT6g6zJAgoWcLRTdYwRMpSLfc9EYL2BLffozASWdQPdKcP8VRkb2p3_$ ) and [**PassFailJFrame .addTestFrame()**](https://urldefense.com/v3/__https://github.com/openjdk/jdk/blob/53b37fe1535388eb14e04c620a6b0118ed8884a0/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java*L294__;Iw!!ACWV5N9M2RV99hQ!N9BsFaF3cRzz4adDsuCirNEsZjEpgcd-LeT6g6zJAgoWcLRTdYwRMpSLfc9EYL2BLffozASWdQPdKcP8VamKQnE9$ ) can be changed to take in Window instead of Frame, since Window is a superclass and this would allow the test frame to be a Window/Frame/Dialog and not be restricted to a Frame.

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

Commit messages:
 - ModalDialogTest changes

Changes: https://git.openjdk.org/jdk/pull/9286/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9286&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8288444
  Stats: 355 lines in 1 file changed: 355 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/9286.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9286/head:pull/9286

PR: https://git.openjdk.org/jdk/pull/9286



More information about the client-libs-dev mailing list