Skip to content

Commit 2d27c94

Browse files
author
Amos Shi
committed
8315071: Modify TrayIconScalingTest.java, PrintLatinCJKTest.java to use new PassFailJFrame's builder pattern usage
Backport-of: 31e26814db5d5ad5018fb6ed2e8160e8a01938ab
1 parent c3438a5 commit 2d27c94

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

test/jdk/java/awt/TrayIcon/TrayIconScalingTest.java

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -85,8 +85,15 @@ public static void main(String[] args)
8585
System.out.println("SystemTray is not supported");
8686
return;
8787
}
88-
PassFailJFrame passFailJFrame = new PassFailJFrame("TrayIcon " +
89-
"Test Instructions", INSTRUCTIONS, 8, 25, 85);
88+
PassFailJFrame passFailJFrame = new PassFailJFrame.Builder()
89+
.title("TrayIcon Test Instructions")
90+
.instructions(INSTRUCTIONS)
91+
.testTimeOut(8)
92+
.rows(25)
93+
.columns(70)
94+
.screenCapture()
95+
.build();
96+
9097
createAndShowGUI();
9198
// does not have a test window,
9299
// hence only the instruction frame is positioned

test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -98,8 +98,13 @@ public int print(Graphics g, PageFormat pf, int pageIndex)
9898
}
9999

100100
public static void main(String[] args) throws InterruptedException, InvocationTargetException {
101-
PassFailJFrame passFailJFrame = new PassFailJFrame("Test Instruction" +
102-
"Frame", info, 10, 10, 45);
101+
PassFailJFrame passFailJFrame = new PassFailJFrame.Builder()
102+
.title("Test Instructions Frame")
103+
.instructions(info)
104+
.testTimeOut(10)
105+
.rows(10)
106+
.columns(45)
107+
.build();
103108
showFrame();
104109
passFailJFrame.awaitAndCheck();
105110
}

0 commit comments

Comments
 (0)