8315071: Modify TrayIconScalingTest.java, PrintLatinCJKTest.java to use new PassFailJFrame's builder pattern usage

Reviewed-by: honkar, aivanov
This commit is contained in:
lawrence.andrews 2023-08-28 20:31:02 +00:00 committed by Alexey Ivanov
parent 21916f32c0
commit 31e26814db
2 changed files with 18 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -85,8 +85,15 @@ public class TrayIconScalingTest {
System.out.println("SystemTray is not supported");
return;
}
PassFailJFrame passFailJFrame = new PassFailJFrame("TrayIcon " +
"Test Instructions", INSTRUCTIONS, 8, 25, 85);
PassFailJFrame passFailJFrame = new PassFailJFrame.Builder()
.title("TrayIcon Test Instructions")
.instructions(INSTRUCTIONS)
.testTimeOut(8)
.rows(25)
.columns(70)
.screenCapture()
.build();
createAndShowGUI();
// does not have a test window,
// hence only the instruction frame is positioned

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -98,8 +98,13 @@ public class PrintLatinCJKTest implements Printable {
}
public static void main(String[] args) throws InterruptedException, InvocationTargetException {
PassFailJFrame passFailJFrame = new PassFailJFrame("Test Instruction" +
"Frame", info, 10, 10, 45);
PassFailJFrame passFailJFrame = new PassFailJFrame.Builder()
.title("Test Instructions Frame")
.instructions(info)
.testTimeOut(10)
.rows(10)
.columns(45)
.build();
showFrame();
passFailJFrame.awaitAndCheck();
}