Skip to content

Commit

Permalink
Backport d1026720d323d0acd9bd8d85d5caba7185107863
Browse files Browse the repository at this point in the history
  • Loading branch information
GoeLin committed Nov 7, 2023
1 parent 59c5b84 commit a0a04ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public static void main(String[] args) throws InterruptedException,
"The test passes if the text shows through the rectangular image.\n";

PassFailJFrame passFailJFrame = new PassFailJFrame(instruction, 10);
PassFailJFrame.positionTestWindow(null, PassFailJFrame.Position.HORIZONTAL);
try {
PrinterJob pj = PrinterJob.getPrinterJob();
pj.setPrintable(new PrintARGBImage());
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/PrinterJob/PageRangesDlgTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public static void main(String[] args) throws Exception {
;

PassFailJFrame passFailJFrame = new PassFailJFrame(instruction, 10);
PassFailJFrame.positionTestWindow(null, PassFailJFrame.Position.HORIZONTAL);
showPrintDialogs();
passFailJFrame.awaitAndCheck();
}
Expand Down
14 changes: 6 additions & 8 deletions test/jdk/javax/swing/ProgressMonitor/ProgressTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,29 @@
*/

/* @test
* @bug 8054572
* @bug 6445283
* @library /java/awt/regtesthelpers
* @build PassFailJFrame
* @summary Tests if JComboBox displays correctly when editable/non-editable
* @summary Tests if ProgressMonitorInputStream reports progress accurately
* @run main/manual ProgressTest
*/

import java.io.InputStream;

import javax.swing.JFrame;
import javax.swing.ProgressMonitorInputStream;
import javax.swing.SwingUtilities;

public class ProgressTest {

private static final String instructionsText =
"A ProgressMonitor will be shown." +
" If it shows blank progressbar after 2048MB bytes read,"+
"A ProgressMonitor will be shown.\n" +
" If it shows blank progressbar after 2048MB bytes read,\n"+
" press Fail else press Pass";

private static JFrame frame;

public static void main(String[] args) throws Exception {

PassFailJFrame pfjFrame = new PassFailJFrame("JScrollPane "
+ "Test Instructions", instructionsText, 5);
PassFailJFrame.positionTestWindow(null, PassFailJFrame.Position.VERTICAL);

final long SIZE = (long) (Integer.MAX_VALUE * 1.5);

Expand Down Expand Up @@ -85,6 +82,7 @@ public void run() {
}
};
thread.start();

pfjFrame.awaitAndCheck();
}
}

0 comments on commit a0a04ff

Please sign in to comment.