8320608: Many jtreg printing tests are missing the @printer keyword

Reviewed-by: aivanov, serb
This commit is contained in:
Phil Race 2023-11-30 22:59:37 +00:00
parent c4732c2baa
commit 76fea80707
139 changed files with 224 additions and 107 deletions
test/jdk
TEST.ROOT
java/awt
Paint/PaintSetEnabledDeadlock
PrintJob
print
Dialog
Headless
MissedFontFamilyName
PageFormat
PathPrecisionScaleFactor
PrinterJob

@ -9,17 +9,41 @@
# should be taken to handle test failures of intermittent or # should be taken to handle test failures of intermittent or
# randomness tests. # randomness tests.
# #
# A "headful" test requires a graphical environment to meaningfully # A test flagged with cgroups uses cgroups.
# run. Tests that are not headful are "headless". #
# A test flagged with key sound needs audio devices on the system, this # Notes on "client" keywords : headful sound printer multimon
# may be accompanied by the headful keyword since audio device access # ===========================================================
#
# These keywords are there to help with test selection so that
# tests that need a particular resource can be selected to run on a system
# with that resource. Conversely "!somekeyword" can be used to exclude tests
# on a system without such a resource.
# Caution: If you are always excluding tests using any of these keywords then you
# are likely missing many important tests.
#
# "headful". A "headful" test requires a graphical environment to meaningfully run.
# This does not have to mean a physical host, since a VM can be configured as headful.
# Tests that are not headful are "headless".
# Note: all manual tests are assumed to be headful and do not need the keyword.
#
# "printer". Not all tests of printing APIs require a printer, but many do.
# So a "printer" test requires a printer to be installed to do anything meaningful.
# Tests may not fail if there is none, instead just silently return.
# But they also may legitimately throw an Exception depending on the test.
# Also printer tests are not necessarily headful, but some are, and some are automated.
#
# "sound". Similarly, not all sound tests require audio devices, but many do.
# A test flagged with key "sound" needs audio devices on the system.
# Also they are not necessarily "headful", since they don't require a display etc.
# But sometimes they may be accompanied by the headful keyword, since sound
# is often linked to access to desktop resources and headful systems are # is often linked to access to desktop resources and headful systems are
# also more likely to have audio devices (ie meaning both input and output) # also more likely to have audio devices (ie meaning both input and output)
# A test flagged with key "printer" requires a printer to succeed, else #
# throws a PrinterException or the like. # "multimon" should be used in conjunction with headful and is used to identify
# A test flagged with cgroups uses cgroups. # tests which require two displays connected.
keys=2d dnd headful sound i18n intermittent printer randomness jfr cgroups keys=headful sound printer multimon \
i18n intermittent randomness jfr cgroups
# Tests that must run in othervm mode # Tests that must run in othervm mode
othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/swing javax/print \ othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/swing javax/print \

@ -24,6 +24,7 @@
/* /*
@test @test
@bug 4116029 4300383 @bug 4116029 4300383
@key printer
@summary verify that child components can draw only inside their @summary verify that child components can draw only inside their
visible bounds visible bounds
@library /test/lib @library /test/lib

@ -24,9 +24,9 @@
/** /**
* @test * @test
* @bug 4092755 * @bug 4092755
* @key printer
* @summary Verifies that (0, 0) is the upper-left corner of the page, not * @summary Verifies that (0, 0) is the upper-left corner of the page, not
* the upper-left corner adjusted for the margins. * the upper-left corner adjusted for the margins.
* @author dpm
* @run main/manual EdgeTest * @run main/manual EdgeTest
*/ */

@ -26,7 +26,7 @@
@test @test
@bug 4227128 8066139 @bug 4227128 8066139
@summary Test printing at resolutions > 72dpi @summary Test printing at resolutions > 72dpi
@author dpm: area=awt.print @key printer
@run main/manual HighResTest @run main/manual HighResTest
*/ */
import java.awt.Button; import java.awt.Button;

@ -23,6 +23,7 @@
/* /*
* @test * @test
* @bug 6357905 * @bug 6357905
* @key printer
* @summary JobAttributes.getFromPage() and getToPage() always returns 1 * @summary JobAttributes.getFromPage() and getToPage() always returns 1
* @run main/manual JobAttrUpdateTest * @run main/manual JobAttrUpdateTest
*/ */

@ -23,7 +23,7 @@
/** /**
* @test * @test
* @key headful * @key headful printer
* @bug 4112758 * @bug 4112758
* @summary Checks that a second invocation of PrintJob.end() does not cause * @summary Checks that a second invocation of PrintJob.end() does not cause
* an exception or segmentation violation. * an exception or segmentation violation.

@ -25,7 +25,7 @@
@test @test
@bug 4507585 @bug 4507585
@summary Native modal dialog shouldn't block event dispatching when called on EventDispatchThread. @summary Native modal dialog shouldn't block event dispatching when called on EventDispatchThread.
@author tav@sparc.spb.su: area=awt.PrintJob @key printer
@run main/manual=yesno PageSetupDlgBlockingTest @run main/manual=yesno PageSetupDlgBlockingTest
*/ */

@ -23,10 +23,9 @@
/* /*
* @test * @test
* @key headful * @key headful printer
* @bug 4105609 * @bug 4105609
* @summary Test printing of drawArc preceded by drawString * @summary Test printing of drawArc preceded by drawString
* @author robi.khan
*/ */
import java.awt.*; import java.awt.*;

@ -26,7 +26,7 @@
@bug 5045936 5055171 @bug 5045936 5055171
@summary Tests that there is no ClassCastException thrown in printing @summary Tests that there is no ClassCastException thrown in printing
checkbox and scrollbar with XAWT checkbox and scrollbar with XAWT
@author art@sparc.spb.su @key printer
@run applet/manual=yesno PrintCheckboxManualTest.html @run applet/manual=yesno PrintCheckboxManualTest.html
*/ */

@ -23,11 +23,10 @@
/** /**
* @test * @test
* @key headful * @key headful printer
* @bug 4040668 * @bug 4040668
* @summary Checks that banner titles which contain double quotation marks * @summary Checks that banner titles which contain double quotation marks
* or backslashes still print correctly. * or backslashes still print correctly.
* @author dpm
*/ */
import java.awt.*; import java.awt.*;

@ -23,10 +23,9 @@
/** /**
* @test * @test
* @key headful * @key headful printer
* @bug 4061440 * @bug 4061440
* @summary Checks that rounded rectangles print correctly. * @summary Checks that rounded rectangles print correctly.
* @author dpm
*/ */
import java.awt.*; import java.awt.*;

@ -24,6 +24,7 @@
/* /*
* @test * @test
* @bug 4851363 8025988 8025990 * @bug 4851363 8025988 8025990
* @key printer
* @summary Tests the save to file dialog has a title. * @summary Tests the save to file dialog has a title.
* @run main/manual=yesno/othervm SaveDialogTitleTest * @run main/manual=yesno/othervm SaveDialogTitleTest
*/ */

@ -23,7 +23,7 @@
/** /**
* @test * @test
* @key headful * @key headful printer
* @bug 6195901 6195923 6195928 6195933 6491273 6888734 * @bug 6195901 6195923 6195928 6195933 6491273 6888734
* @summary No SecurityException should be thrown when printing to a file * @summary No SecurityException should be thrown when printing to a file
using the given policy. using the given policy.

@ -23,6 +23,7 @@
/* /*
* @test * @test
* @bug 8154218 * @bug 8154218
* @key printer
* @summary Verifies if owner Frame is associated with print dialog * @summary Verifies if owner Frame is associated with print dialog
* @run main/manual TestPrintJobFrameAssociation * @run main/manual TestPrintJobFrameAssociation
*/ */

@ -23,6 +23,7 @@
# #
# @test # @test
# @bug 4692562 # @bug 4692562
# @key printer
# @summary Requirement: Windows with printer installed. It should print with text "Hello World". # @summary Requirement: Windows with printer installed. It should print with text "Hello World".
# @compile StringWidth.java # @compile StringWidth.java
# @run shell/manual stringwidth.sh # @run shell/manual stringwidth.sh

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 4846344 4851365 4851321 4851316 4863656 5046198 6293139 * @bug 4846344 4851365 4851321 4851316 4863656 5046198 6293139
* @key printer
* @summary Confirm that cancelling the dialog will not prompt for file. * @summary Confirm that cancelling the dialog will not prompt for file.
* @run main/manual DestinationTest * @run main/manual DestinationTest
*/ */

@ -24,6 +24,7 @@
/* /*
* @test * @test
* @bug 6357858 * @bug 6357858
* @key printer
* @summary Job must reports the number of copies set in the dialog. * @summary Job must reports the number of copies set in the dialog.
* @run main/manual DialogCopies * @run main/manual DialogCopies
*/ */

@ -24,6 +24,7 @@
/* /*
@test @test
@bug 6594374 @bug 6594374
@key printer
@summary Confirm that the orientation is as specified. @summary Confirm that the orientation is as specified.
@run main/manual DialogOrient @run main/manual DialogOrient
*/ */

@ -23,6 +23,7 @@
/* @test /* @test
@bug 8203796 @bug 8203796
@key printer
@run main/manual DialogOwnerTest @run main/manual DialogOwnerTest
@summary Test DialogOwner API @summary Test DialogOwner API
*/ */

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 6568874 * @bug 6568874
* @key printer
* @summary Verify the native dialog works with attribute sets. * @summary Verify the native dialog works with attribute sets.
* @run main/manual=yesno DialogType * @run main/manual=yesno DialogType
*/ */

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 4869575 6361766 * @bug 4869575 6361766
* @key printer
* @summary Setting orientation in the page format does not have any effect on the printout. To test 6361766, the application must exit. * @summary Setting orientation in the page format does not have any effect on the printout. To test 6361766, the application must exit.
* @run main/manual MediaInPrintable * @run main/manual MediaInPrintable
*/ */

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 6360339 * @bug 6360339
* @key printer
* @summary Test for fp error in paper size calculations. * @summary Test for fp error in paper size calculations.
* @run main/manual PaperSizeError * @run main/manual PaperSizeError
*/ */

@ -24,6 +24,7 @@
/* /*
@test @test
@bug 5024549 @bug 5024549
@key printer
@summary Pass if dialogs are modal. @summary Pass if dialogs are modal.
@run applet/manual PrintApplet.html @run applet/manual PrintApplet.html
*/ */

@ -24,6 +24,7 @@
/* /*
@test @test
@bug 6342748 @bug 6342748
@key printer
@summary Pass if dialogs display correctly @summary Pass if dialogs display correctly
@run main/manual PrintDialog @run main/manual PrintDialog
*/ */

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 4869502 4869539 * @bug 4869502 4869539
* @key printer
* @summary Confirm that ToPage is populated for argument =2. Range is disabled for argument = 0. * @summary Confirm that ToPage is populated for argument =2. Range is disabled for argument = 0.
* @run main/manual PrintDlgPageable * @run main/manual PrintDlgPageable
*/ */

@ -24,6 +24,7 @@
/* /*
* @test * @test
* @bug 6365992 6379599 8137137 * @bug 6365992 6379599 8137137
* @key printer
* @summary REG: Showing and disposing a native print dialog makes the main * @summary REG: Showing and disposing a native print dialog makes the main
* frame inactive, Win32 * frame inactive, Win32
* @run main/manual RestoreActiveWindowTest * @run main/manual RestoreActiveWindowTest

@ -31,6 +31,7 @@ import java.awt.print.*;
/* /*
* @test * @test
* @key printer
* @summary Check that PrinterJob constructor and methods do not throw unexpected * @summary Check that PrinterJob constructor and methods do not throw unexpected
* exceptions in headless mode * exceptions in headless mode
* @run main/othervm -Djava.awt.headless=true HeadlessPrinterJob * @run main/othervm -Djava.awt.headless=true HeadlessPrinterJob

@ -25,6 +25,7 @@
/** /**
* @test * @test
* @bug 8265761 * @bug 8265761
* @key printer
* @requires (os.family == "windows") * @requires (os.family == "windows")
* @summary Font with missed font family name is not properly printed on Windows * @summary Font with missed font family name is not properly printed on Windows
* @run main/othervm/manual PrintFontWithMissedFontFamilyTest * @run main/othervm/manual PrintFontWithMissedFontFamilyTest

@ -25,7 +25,7 @@
* @test * @test
* @bug 4355514 * @bug 4355514
* @bug 4385157 * @bug 4385157
* @author Jennifer Godinez * @key printer
* @summary Prints a rectangle to show the imageable area of a * @summary Prints a rectangle to show the imageable area of a
* 12in x 14in custom paper size. * 12in x 14in custom paper size.
* @run main/manual CustomPaper * @run main/manual CustomPaper

@ -47,7 +47,7 @@ import javax.swing.table.TableModel;
* @test * @test
* @bug 8044444 8081491 * @bug 8044444 8081491
* @summary The output's 'Page-n' footer does not show completely * @summary The output's 'Page-n' footer does not show completely
* @author Alexandr Scherbatiy * @key printer
* @run main/manual ImageableAreaTest * @run main/manual ImageableAreaTest
*/ */
public class ImageableAreaTest { public class ImageableAreaTest {

@ -23,13 +23,11 @@
/* /*
@test @test
@key headful
@bug 4199506 @bug 4199506
@summary java.awt.print.PageFormat.setpaper(Paper paper) @summary java.awt.print.PageFormat.setpaper(Paper paper)
assertion test fails by not throwing assertion test fails by not throwing
NullPointerException when a null paper instance is NullPointerException when a null paper instance is
passed as argument and this is specified in the doc. passed as argument and this is specified in the doc.
@author rbi: area=PageFormat
@run main NullPaper @run main NullPaper
*/ */
@ -46,9 +44,6 @@
*/ */
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.print.*; import java.awt.print.*;
// This test is a "main" test as applets would need Runtime permission // This test is a "main" test as applets would need Runtime permission
@ -154,7 +149,6 @@ public class NullPaper {
public static synchronized void pass() public static synchronized void pass()
{ {
System.out.println( "The test passed." ); System.out.println( "The test passed." );
System.out.println( "The test is over, hit Ctl-C to stop Java VM" );
//first check if this is executing in main thread //first check if this is executing in main thread
if ( mainThread == Thread.currentThread() ) if ( mainThread == Thread.currentThread() )
{ {
@ -180,7 +174,6 @@ public class NullPaper {
public static synchronized void fail( String whyFailed ) public static synchronized void fail( String whyFailed )
{ {
System.out.println( "The test failed: " + whyFailed ); System.out.println( "The test failed: " + whyFailed );
System.out.println( "The test is over, hit Ctl-C to stop Java VM" );
//check if this called from main thread //check if this called from main thread
if ( mainThread == Thread.currentThread() ) if ( mainThread == Thread.currentThread() )
{ {

@ -27,7 +27,7 @@
@summary Confirm that the you get three pages of output, one @summary Confirm that the you get three pages of output, one
each in portrait, landscape, and reverse landscape each in portrait, landscape, and reverse landscape
orientations. orientations.
@author rbi: area=PageFormat @key printer
@run main/manual Orient @run main/manual Orient
*/ */

@ -25,6 +25,7 @@
* @test * @test
* @bug 4500750 6848799 8028584 * @bug 4500750 6848799 8028584
* @summary Tests creating page format from attributes * @summary Tests creating page format from attributes
* @key printer
* @run main PageFormatFromAttributes * @run main PageFormatFromAttributes
*/ */
import java.awt.print.*; import java.awt.print.*;

@ -28,7 +28,7 @@
* @bug 6358747 * @bug 6358747
* @bug 6574633 * @bug 6574633
* @summary Page setup dialog settings * @summary Page setup dialog settings
* @author prr * @key printer
* @run main/manual PageSetupDialog * @run main/manual PageSetupDialog
*/ */

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @key printer
* @bug 8295737 * @bug 8295737
* @summary macOS: Print content cut off when width > height with portrait orientation * @summary macOS: Print content cut off when width > height with portrait orientation
* @run main/othervm/manual PrintContentCutOffTest * @run main/othervm/manual PrintContentCutOffTest

@ -23,7 +23,7 @@
/* /*
* @test * @test
* @key headful * @key headful printer
* @bug 4254954 * @bug 4254954
* @summary PageFormat would fail on solaris when setting orientation * @summary PageFormat would fail on solaris when setting orientation
*/ */

@ -27,6 +27,7 @@
@bug 4186119 @bug 4186119
@summary Confirm that the clip and transform of the Graphics2D is @summary Confirm that the clip and transform of the Graphics2D is
affected by the landscape orientation of the PageFormat. affected by the landscape orientation of the PageFormat.
@key printer
@run applet/manual=yesno SetOrient.html @run applet/manual=yesno SetOrient.html
--> -->
<html> <html>

@ -21,43 +21,56 @@
* questions. * questions.
*/ */
import java.awt.*; import java.awt.Graphics;
import java.awt.print.*; import java.awt.print.PageFormat;
import java.awt.print.Paper;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
public class SmallPaperPrinting /*
{ * @test
public static void main(String args[]) * @key printer
{ * @run main/othervm SmallPaperPrinting
System.out.println("----------------- Instructions --------------------"); * @run main/othervm SmallPaperPrinting 1
System.out.println("Arguments: (none) - paper width=1, height=.0001"); * @run main/othervm SmallPaperPrinting 2
System.out.println(" 1 - paper width=.0001, height=1"); */
System.out.println(" 2 - paper width=-1, height=1");
System.out.println("A passing test should catch a PrinterException");
System.out.println("and should display \"Print error: (exception msg)\".");
System.out.println("---------------------------------------------------\n");
PrinterJob job = PrinterJob.getPrinterJob();
PageFormat format = job.defaultPage();
Paper paper = format.getPaper();
double w = 1, h = .0001; // Generates ArithmeticException: / by zero. public class SmallPaperPrinting
if(args.length > 0 && args[0].equals("1")) { {
w = .0001; h = 1; } // Generates IllegalArgumentException. public static void main(String args[]) {
else if(args.length > 0 && args[0].equals("2")) { System.out.println("----------------- Instructions --------------------");
w = -1; h = 1; } // Generates NegativeArraySizeException. System.out.println("Arguments: (none) - paper width=1, height=.0001");
paper.setSize(w, h); System.out.println(" 1 - paper width=.0001, height=1");
paper.setImageableArea(0, 0, w, h); System.out.println(" 2 - paper width=-1, height=1");
format.setPaper(paper); System.out.println("A passing test should catch a PrinterException");
job.setPrintable( System.out.println("and should display \"Print error: (exception msg)\".");
new Printable() { System.out.println("---------------------------------------------------\n");
public int print(Graphics g, PageFormat page_format, int page) { PrinterJob job = PrinterJob.getPrinterJob();
return NO_SUCH_PAGE; PageFormat format = job.defaultPage();
} Paper paper = format.getPaper();
}, format);
try { double w = 1, h = .0001; // Generates ArithmeticException: / by zero.
job.print(); } if (args.length > 0 && args[0].equals("1")) {
catch(PrinterException e) { w = .0001; h = 1;
System.err.println("Print error:\n" + e.getMessage()); // Passing test! } // Generates IllegalArgumentException.
} else if (args.length > 0 && args[0].equals("2")) {
w = -1; h = 1;
} // Generates NegativeArraySizeException.
paper.setSize(w, h);
paper.setImageableArea(0, 0, w, h);
format.setPaper(paper);
job.setPrintable(
new Printable() {
public int print(Graphics g, PageFormat page_format, int page) {
return NO_SUCH_PAGE;
}
}, format);
try {
job.print();
} catch (PrinterException e) {
System.err.println("Print error:\n" + e.getMessage()); // Passing test!
} }
} }
}

@ -24,7 +24,7 @@
/* /*
* @test * @test
* @bug 4414987 * @bug 4414987
* @author Jennifer Godinez * @key printer
* @summary Displays width & height of validated custom paper size * @summary Displays width & height of validated custom paper size
* @run main/manual ValidateCustom * @run main/manual ValidateCustom
*/ */

@ -22,7 +22,7 @@
*/ */
/* @test /* @test
@key headful @key printer
@bug 8201818 @bug 8201818
@summary Printing attributes break page size set via "java.awt.print.Book" @summary Printing attributes break page size set via "java.awt.print.Book"
object object

@ -23,6 +23,7 @@
/* @test /* @test
@bug 8167102 8181659 @bug 8167102 8181659
@key printer
@summary PrintRequestAttributeSet breaks page size set using PageFormat @summary PrintRequestAttributeSet breaks page size set using PageFormat
@run main/manual WrongPaperPrintingTest @run main/manual WrongPaperPrintingTest
*/ */

@ -25,6 +25,7 @@
/** /**
* @test * @test
* @bug 8262470 * @bug 8262470
* @key printer
* @requires (os.family == "windows") * @requires (os.family == "windows")
* @summary Check thay shapes are properly painted with the precision scale factor * @summary Check thay shapes are properly painted with the precision scale factor
* @run main/othervm/manual PathPrecisionScaleFactorShapeTest * @run main/othervm/manual PathPrecisionScaleFactorShapeTest

@ -25,6 +25,7 @@
/** /**
* @test * @test
* @bug 8262470 * @bug 8262470
* @key printer
* @requires (os.family == "windows") * @requires (os.family == "windows")
* @summary Check that a GlyphVector outline is printed with good quility on low dpi printers * @summary Check that a GlyphVector outline is printed with good quility on low dpi printers
* @run main/othervm/manual PathPrecisionScaleFactorTextTest * @run main/othervm/manual PathPrecisionScaleFactorTextTest

@ -23,6 +23,7 @@
/* /*
* @test * @test
* @bug 6575247 8170579 * @bug 6575247 8170579
* @key printer
* @summary Verifies if Banner page is printed * @summary Verifies if Banner page is printed
* @requires os.family == "solaris" * @requires os.family == "solaris"
* @run main/manual BannerTest * @run main/manual BannerTest

@ -25,7 +25,7 @@
* @test * @test
* @bug 4245280 * @bug 4245280
* @summary PrinterJob not cancelled when PrinterJob.cancel() is used * @summary PrinterJob not cancelled when PrinterJob.cancel() is used
* @author prr * @key printer
* @run main/manual PrinterJobCancel * @run main/manual PrinterJobCancel
*/ */

@ -25,6 +25,7 @@
* @test * @test
* @bug 6362683 8012381 * @bug 6362683 8012381
* @summary Collation should work. * @summary Collation should work.
* @key printer
* @run main/manual Collate2DPrintingTest * @run main/manual Collate2DPrintingTest
*/ */
import java.awt.*; import java.awt.*;

@ -24,6 +24,7 @@
/* /*
@test @test
@bug 4748055 @bug 4748055
@key printer
@summary PASS if the values are same in both cases (2 and 3) below. @summary PASS if the values are same in both cases (2 and 3) below.
@run main/manual CompareImageable @run main/manual CompareImageable
*/ */

@ -25,7 +25,7 @@
@test @test
@bug 4386025 8231243 @bug 4386025 8231243
@summary fonts not in win32 font directory print incorrectly. @summary fonts not in win32 font directory print incorrectly.
@author prr: area=PrinterJob @key printer
@run main/manual CustomFont @run main/manual CustomFont
*/ */
import java.io.*; import java.io.*;

@ -30,7 +30,6 @@ import javax.print.PrintServiceLookup;
* @bug 6870661 * @bug 6870661
* @summary Verify that no native dialog is opened for a custom PrintService * @summary Verify that no native dialog is opened for a custom PrintService
* @run main/manual PrintDialog * @run main/manual PrintDialog
* @author reinhapa
*/ */
public class PrintDialog { public class PrintDialog {

@ -28,7 +28,6 @@ import java.awt.print.PrinterJob;
* @test * @test
* @bug 6870661 * @bug 6870661
* @summary tests setPrintService() with a custom implementation * @summary tests setPrintService() with a custom implementation
* @author reinhapa
*/ */
public class SetPrintServiceTest { public class SetPrintServiceTest {

@ -21,7 +21,7 @@
* questions. * questions.
*/ */
/* @test 1.2 02/05/15 /* @test
@bug 4810363 4924441 @bug 4810363 4924441
@key printer @key printer
@run main DeviceScale @run main DeviceScale

@ -23,6 +23,7 @@
/* /*
* @test * @test
* @bug 8061258 * @bug 8061258
* @key printer
* @summary PrinterJob's native Print Dialog does not reflect * @summary PrinterJob's native Print Dialog does not reflect
* specified Copies or Page Ranges * specified Copies or Page Ranges
* @run main/manual DlgAttrsBug * @run main/manual DlgAttrsBug

@ -24,8 +24,8 @@
/** /**
* @test * @test
* @bug 4329866 * @bug 4329866
* @key printer
* @summary Confirm that no printing exception is generated. * @summary Confirm that no printing exception is generated.
* @author jgodinez
* @run main/manual DrawImage * @run main/manual DrawImage
*/ */

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 4185019 * @bug 4185019
* @key printer
* @summary Confirm that all of the drawString methods on Graphics2D * @summary Confirm that all of the drawString methods on Graphics2D
* work for printer graphics objects. * work for printer graphics objects.
* @run main/manual DrawStringMethods * @run main/manual DrawStringMethods

@ -66,11 +66,11 @@ public class EmptyFill implements Printable {
} }
ByteArrayOutputStream baos = new ByteArrayOutputStream(4096); ByteArrayOutputStream baos = new ByteArrayOutputStream(4096);
StreamPrintService svc = spfs[0].getPrintService(baos); StreamPrintService svc = spfs[0].getPrintService(baos);
if (svc == null) {
throw new RuntimeException("Could not create postscript stream");
}
PrinterJob pj = PrinterJob.getPrinterJob(); PrinterJob pj = PrinterJob.getPrinterJob();
if (svc == null) {
return;
}
pj.setPrintService(svc); pj.setPrintService(svc);
pj.setPrintable(new EmptyFill()); pj.setPrintable(new EmptyFill());
pj.print(); pj.print();

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 6653384 * @bug 6653384
* @key printer
* @summary No exception should be thrown. * @summary No exception should be thrown.
* @run main GetMediasTest * @run main GetMediasTest
*/ */

@ -25,7 +25,7 @@
* @test * @test
* @bug 4521945 7006865 * @bug 4521945 7006865
* @summary Test printing images of different types. * @summary Test printing images of different types.
* @author prr * @key printer
* @run main/manual ImageTypes * @run main/manual ImageTypes
*/ */

@ -34,6 +34,7 @@ import java.lang.reflect.InvocationTargetException;
/* /*
* @test * @test
* @bug 6581756 * @bug 6581756
* @key printer
* @library ../../../regtesthelpers * @library ../../../regtesthelpers
* @build PassFailJFrame * @build PassFailJFrame
* @summary Test printing of images which need to have src area clipped * @summary Test printing of images which need to have src area clipped

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 4184565 * @bug 4184565
* @key printer
* @summary Confirm that the default foreground color on a printer * @summary Confirm that the default foreground color on a printer
* graphics object is black so that rendering will appear * graphics object is black so that rendering will appear
* without having to execute setColor first. * without having to execute setColor first.

@ -25,7 +25,7 @@
* @test InvalidPage.java * @test InvalidPage.java
* @bug 4671634 6506286 * @bug 4671634 6506286
* @summary Invalid page format can crash win32 JRE * @summary Invalid page format can crash win32 JRE
* @author prr * @key printer
* @run main/manual InvalidPage * @run main/manual InvalidPage
*/ */

@ -25,7 +25,7 @@
* @test * @test
* @bug 4205601 * @bug 4205601
* @summary setJobName should be used by PrinterJob * @summary setJobName should be used by PrinterJob
* @author prr * @key printer
* @run main/manual PrinterJobName * @run main/manual PrinterJobName
*/ */

@ -22,7 +22,7 @@
*/ */
/* /*
* @test * @test
* @key headful printer * @key printer
* @bug 6842011 8158758 * @bug 6842011 8158758
* @summary Test if StackOverflowError occurs during printing landscape with * @summary Test if StackOverflowError occurs during printing landscape with
* scale and transform. * scale and transform.

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 4886069 8023045 * @bug 4886069 8023045
* @key printer
* @summary Confirm that printer recognizes the Legal selection either by * @summary Confirm that printer recognizes the Legal selection either by
* prompting the user to put Legal paper or automatically selecting * prompting the user to put Legal paper or automatically selecting
* the tray containing Legal Paper. The printout image should not * the tray containing Legal Paper. The printout image should not

@ -24,6 +24,7 @@
* @test * @test
* @bug 8162796 * @bug 8162796
* @summary Verifies if LinearGradientPaint is printed in osx * @summary Verifies if LinearGradientPaint is printed in osx
* @key printer
* @run main/manual LinearGradientPrintingTest * @run main/manual LinearGradientPrintingTest
*/ */
import java.awt.BorderLayout; import java.awt.BorderLayout;

@ -37,6 +37,7 @@ import javax.swing.SwingUtilities;
/** /**
* @test * @test
* @bug 8138749 * @bug 8138749
* @key printer multimon
* @summary PrinterJob.printDialog() does not support multi-mon, * @summary PrinterJob.printDialog() does not support multi-mon,
* always displayed on primary * always displayed on primary
* @run main/manual MultiMonPrintDlgTest * @run main/manual MultiMonPrintDlgTest

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 4922036 * @bug 4922036
* @key printer
* @summary Confirm that no Exception is thrown and 2 identical output is produced. * @summary Confirm that no Exception is thrown and 2 identical output is produced.
* @run main/manual MultiThreadTest * @run main/manual MultiThreadTest
*/ */

@ -25,7 +25,7 @@
* @test * @test
* @bug 4258003 * @bug 4258003
* @summary Checks the right number of copies are printed * @summary Checks the right number of copies are printed
* @author prr * @key printer
* @run main/manual NumCopies * @run main/manual NumCopies
*/ */

@ -24,6 +24,7 @@
/* /*
* @test * @test
* @bug 6801613 * @bug 6801613
* @key printer
* @summary Verifies if cross-platform pageDialog and printDialog top margin * @summary Verifies if cross-platform pageDialog and printDialog top margin
* entry is working * entry is working
* @run main/manual PageDialogMarginTest * @run main/manual PageDialogMarginTest

@ -23,6 +23,7 @@
/* /*
* @test * @test
* @bug 6509729 * @bug 6509729
* @key printer
* @summary Verifies pageDialog margin validation is correct * @summary Verifies pageDialog margin validation is correct
* @run main/manual PageDialogMarginValidation * @run main/manual PageDialogMarginValidation
*/ */

@ -24,6 +24,7 @@
/* /*
@test @test
@bug 6302514 @bug 6302514
@key printer
@run main/manual PageDialogTest @run main/manual PageDialogTest
@summary A toolkit modal dialog should not be blocked by Page/Print dialog. @summary A toolkit modal dialog should not be blocked by Page/Print dialog.
*/ */

@ -31,6 +31,7 @@ import javax.swing.SwingUtilities;
/** /**
* @test * @test
* @bug 8067059 * @bug 8067059
* @key printer
* @run main/manual PageDlgApp * @run main/manual PageDlgApp
* @summary Test if cancelling dialog returns null when * @summary Test if cancelling dialog returns null when
* PrinterJob.pageDialog() with DialogSelectionType.NATIVE is called * PrinterJob.pageDialog() with DialogSelectionType.NATIVE is called

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 4956397 * @bug 4956397
* @key printer
* @run main/manual PageDlgPrnButton * @run main/manual PageDlgPrnButton
*/ */

@ -28,6 +28,7 @@ import javax.print.attribute.standard.DialogTypeSelection;
/** /**
* @test * @test
* @bug 8039412 * @bug 8039412
* @key printer
* @run main/manual PageDlgStackOverflowTest * @run main/manual PageDlgStackOverflowTest
* @summary Calling pageDialog() after printDialog with * @summary Calling pageDialog() after printDialog with
* DialogTypeSelection.NATIVE should not result in StackOverflowError * DialogTypeSelection.NATIVE should not result in StackOverflowError

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 6359283 * @bug 6359283
* @key printer
* @summary pagedialog needs to update based on change of printer. * @summary pagedialog needs to update based on change of printer.
* @run main/manual PageFormatChange * @run main/manual PageFormatChange
*/ */

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 6575331 * @bug 6575331
* @key printer
* @summary The specified pages should be printed. * @summary The specified pages should be printed.
* @run main/manual=yesno PageRanges * @run main/manual=yesno PageRanges
*/ */

@ -23,6 +23,7 @@
/** /**
* @bug 8041902 * @bug 8041902
* @key printer
* @summary Test printing of wide poly lines. * @summary Test printing of wide poly lines.
* @run main/manual=yesno PolylinePrintingTest * @run main/manual=yesno PolylinePrintingTest
*/ */

@ -23,6 +23,7 @@
/** /**
* @test * @test
* @bug 4257262 6708509 * @bug 4257262 6708509
* @key printer
* @summary Image should be sent to printer. * @summary Image should be sent to printer.
* @run main/manual PrintAWTImage * @run main/manual PrintAWTImage
*/ */

@ -23,9 +23,11 @@
/** /**
* *
* test
* @bug 4884389 7183516 * @bug 4884389 7183516
* @key printer
* @summary Font specified with face name loses style on printing * @summary Font specified with face name loses style on printing
* @run main/manual PrintRotatedText * @run main/manual PrintAllFonts
*/ */
import java.awt.*; import java.awt.*;

@ -24,6 +24,7 @@
/* /*
@test @test
@bug 8042713 8170578 @bug 8042713 8170578
@key printer
@summary Print Dialog does not update attribute set with page range @summary Print Dialog does not update attribute set with page range
@run main/manual PrintAttributeUpdateTest @run main/manual PrintAttributeUpdateTest
*/ */

@ -25,7 +25,7 @@
* @test * @test
* @bug 4398853 * @bug 4398853
* @summary Printing shouldn't hang on bad images * @summary Printing shouldn't hang on bad images
* @author prr * @key printer
* @run main/manual PrintBadImage * @run main/manual PrintBadImage
*/ */

@ -25,7 +25,7 @@
* @test * @test
* @bug 4396835 * @bug 4396835
* @summary Compound font string not printing. * @summary Compound font string not printing.
* @author prr * @key printer
* @run main/manual PrintCompoundString * @run main/manual PrintCompoundString
*/ */

@ -25,7 +25,7 @@
@test PrintDialog.java @test PrintDialog.java
@bug 4257903 @bug 4257903
@summary Confirm that the you see the print dialog. @summary Confirm that the you see the print dialog.
@author prr: area=PrinterJob @key printer
@run main/manual PrintDialog @run main/manual PrintDialog
*/ */

@ -25,7 +25,7 @@
@test @test
@bug 4398231 @bug 4398231
@summary Confirm that the print dialog returns false when cancelled. @summary Confirm that the print dialog returns false when cancelled.
@author prr: area=PrinterJob @key printer
@run main/manual PrintDialogCancel @run main/manual PrintDialogCancel
*/ */

@ -23,6 +23,7 @@
/* /*
* @test * @test
* @bug 4885375 * @bug 4885375
* @key printer
* @summary Verifies if PageRanges To Field is populated based on Pageable * @summary Verifies if PageRanges To Field is populated based on Pageable
* for COMMON print dialog * for COMMON print dialog
* @run main/manual PrintDlgPageable * @run main/manual PrintDlgPageable

@ -23,6 +23,7 @@
/* /*
* @test * @test
* @bug 6529030 8159134 * @bug 6529030 8159134
* @key printer
* @summary Verifies if Java Printing: Selection radiobutton gets enabled. * @summary Verifies if Java Printing: Selection radiobutton gets enabled.
* @requires (os.family == "windows") * @requires (os.family == "windows")
* @run main/manual PrintDlgSelectionAttribTest * @run main/manual PrintDlgSelectionAttribTest

@ -21,6 +21,13 @@
* questions. * questions.
*/ */
/*
* Not enabled as a test. Needs some work.
* test
* @key printer
* @run main/manual PrintFontStyle
*/
import java.awt.*; import java.awt.*;
import java.awt.print.*; import java.awt.print.*;
import java.awt.GraphicsEnvironment; import java.awt.GraphicsEnvironment;

@ -24,6 +24,7 @@
/* /*
* @test * @test
* @bug 8029204 * @bug 8029204
* @key printer
* @library ../../regtesthelpers * @library ../../regtesthelpers
* @build PassFailJFrame * @build PassFailJFrame
* @summary Tests GlyphVector is printed in the correct location * @summary Tests GlyphVector is printed in the correct location

@ -25,7 +25,7 @@
* @test %I %W * @test %I %W
* @bug 4298489 * @bug 4298489
* @summary Confirm that output is same as screen. * @summary Confirm that output is same as screen.
* @author jgodinez * @key printer
* @run main/manual PrintImage * @run main/manual PrintImage
*/ */
import java.awt.*; import java.awt.*;

@ -27,6 +27,7 @@
* @library ../../regtesthelpers * @library ../../regtesthelpers
* @build PassFailJFrame * @build PassFailJFrame
* @summary JDK7 Printing: CJK and Latin Text in string overlap * @summary JDK7 Printing: CJK and Latin Text in string overlap
* @key printer
* @run main/manual PrintLatinCJKTest * @run main/manual PrintLatinCJKTest
*/ */

@ -25,7 +25,7 @@
* @test * @test
* @bug 4223328 * @bug 4223328
* @summary Printer graphics must behave the same as screen graphics * @summary Printer graphics must behave the same as screen graphics
* @author prr * @key printer
* @run main/manual PrintNullString * @run main/manual PrintNullString
*/ */

@ -25,7 +25,7 @@
* @test * @test
* @bug 4399442 * @bug 4399442
* @summary Brackets should be quoted in Postscript output * @summary Brackets should be quoted in Postscript output
* @author prr * @key printer
* @run main/manual PrintParenString * @run main/manual PrintParenString
*/ */

@ -26,7 +26,7 @@
* @bug 4271596 * @bug 4271596
* @bug 4460699 * @bug 4460699
* @summary Rotated text printing * @summary Rotated text printing
* @author prr * @key printer
* @run main/manual PrintRotatedText * @run main/manual PrintRotatedText
*/ */

@ -23,6 +23,7 @@
/* /*
* @test * @test
* @bug 8151590 * @bug 8151590
* @key printer
* @summary All radio button should be selected when we call * @summary All radio button should be selected when we call
* setDefaultSelection(JobAttributes.DefaultSelectionType.ALL); * setDefaultSelection(JobAttributes.DefaultSelectionType.ALL);
* @run main/manual PrintTest * @run main/manual PrintTest

@ -25,6 +25,7 @@
* @bug 6966350 8160882 * @bug 6966350 8160882
* @summary Verifies if Empty pages are printed on Lexmark E352dn PS3 * @summary Verifies if Empty pages are printed on Lexmark E352dn PS3
* with "1200 IQ" setting * with "1200 IQ" setting
* @key printer
* @run main/manual PrintTestLexmarkIQ * @run main/manual PrintTestLexmarkIQ
*/ */
import java.awt.BorderLayout; import java.awt.BorderLayout;

@ -25,7 +25,7 @@
* @test * @test
* @bug 4480930 * @bug 4480930
* @summary TextLayout prints as filled shapes * @summary TextLayout prints as filled shapes
* @author prr * @key printer
* @run main/manual PrintTextLayout * @run main/manual PrintTextLayout
*/ */

@ -24,6 +24,7 @@
/** /**
* @test * @test
* @bug 6425068 7157659 8132890 * @bug 6425068 7157659 8132890
* @key printer
* @summary Confirm that text prints where we expect to the length we expect. * @summary Confirm that text prints where we expect to the length we expect.
* @run main/manual=yesno PrintTextTest * @run main/manual=yesno PrintTextTest
*/ */

@ -24,8 +24,8 @@
/** /**
* @test * @test
* @bug 6359734 * @bug 6359734
* @key printer
* @summary Test that fonts with a translation print where they should. * @summary Test that fonts with a translation print where they should.
* @author prr
* @run main/manual PrintTranslatedFont * @run main/manual PrintTranslatedFont
*/ */

@ -25,7 +25,7 @@
* @test * @test
* @bug 4511023 * @bug 4511023
* @summary Image should be sent to printer, no exceptions thrown * @summary Image should be sent to printer, no exceptions thrown
* @author prr * @key printer
* @run main/manual PrintVolatileImage * @run main/manual PrintVolatileImage
*/ */

@ -25,8 +25,8 @@
<!-- <!--
@test @test
@bug 4784285 4785920 @bug 4784285 4785920
@key printer
@summary check whether Print- and Page- dialogs are modal and correct window activated after their closing @summary check whether Print- and Page- dialogs are modal and correct window activated after their closing
@author Your Name: area=PrinterJob.modality
@run applet/manual=yesno PrinterDialogsModalityTest.html @run applet/manual=yesno PrinterDialogsModalityTest.html
--> -->
<head> <head>

Some files were not shown because too many files have changed in this diff Show More