On Tue, 28 Jun 2022 00:58:42 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:
> Currently PassFailJFrame.positionTestFrame() and > PassFailJFrame.addTestFrame() take Frame as input parameter, this has been > changed to Window. > > Refactored the above method names to reflect the functionality & input > parameter type - > addTestWindow(), positionTestWindow() > > Additionally added test fail reason to `forceFail()` to avoid NPE. > > Benefits of the change - > > - Since Window is a parent class, this would allow the test frame to be a > Window/Frame/Dialog and not be restricted to a Frame. > - Code reusability - no need to have separate methods to manage Frame and > Window > - Additionally it would allow proper clean-up of window and its container > subclasses which are added to the PassFailJFrame. Marked as reviewed by azvegint (Reviewer). test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 219: > 217: /** > 218: * Dispose all the windows(s) i,e both the test instruction frame and > 219: * the testWindow that is added via addTestWindow(Window testWindow) Shouldn't it be `windows` instead of `testWindow`, because we can add plenty of them with `addTestWindow()`? Otherwise looks good. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 263: > 261: * window) by the specified position > 262: * Note: This method should be invoked from the method that creates > 263: * testWindow It looks like you accidentally removed the empty line that served as the visual delimiter. ------------- PR: https://git.openjdk.org/jdk/pull/9300