Skip to content

Commit

Permalink
Backport 76fea807071eee80a1e00aae7bc4784a6d35bf4b
Browse files Browse the repository at this point in the history
  • Loading branch information
amosshi committed Jun 19, 2024
1 parent e716aae commit 036febd
Show file tree
Hide file tree
Showing 138 changed files with 224 additions and 107 deletions.
40 changes: 32 additions & 8 deletions test/jdk/TEST.ROOT
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,41 @@
# should be taken to handle test failures of intermittent or
# randomness tests.
#
# A "headful" test requires a graphical environment to meaningfully
# run. Tests that are not headful are "headless".
# A test flagged with key sound needs audio devices on the system, this
# may be accompanied by the headful keyword since audio device access
# A test flagged with cgroups uses cgroups.
#
# Notes on "client" keywords : headful sound printer multimon
# ===========================================================
#
# 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
# 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.
# A test flagged with cgroups uses cgroups.
#
# "multimon" should be used in conjunction with headful and is used to identify
# 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
othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/swing javax/print \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/*
@test
@bug 4116029 4300383
@key printer
@summary verify that child components can draw only inside their
visible bounds
@library /test/lib
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/java/awt/PrintJob/EdgeTest/EdgeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
/**
* @test
* @bug 4092755
* @key printer
* @summary Verifies that (0, 0) is the upper-left corner of the page, not
* the upper-left corner adjusted for the margins.
* @author dpm
* @run main/manual EdgeTest
*/

Expand Down
2 changes: 1 addition & 1 deletion test/jdk/java/awt/PrintJob/HighResTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
@test
@bug 4227128 8066139
@summary Test printing at resolutions > 72dpi
@author dpm: area=awt.print
@key printer
@run main/manual HighResTest
*/
import java.awt.Button;
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/PrintJob/JobAttrUpdateTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/*
* @test
* @bug 6357905
* @key printer
* @summary JobAttributes.getFromPage() and getToPage() always returns 1
* @run main/manual JobAttrUpdateTest
*/
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/java/awt/PrintJob/MultipleEnd/MultipleEnd.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/**
* @test
* @key headful
* @key headful printer
* @bug 4112758
* @summary Checks that a second invocation of PrintJob.end() does not cause
* an exception or segmentation violation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@test
@bug 4507585
@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
*/
Expand Down
3 changes: 1 addition & 2 deletions test/jdk/java/awt/PrintJob/PrintArcTest/PrintArcTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@

/*
* @test
* @key headful
* @key headful printer
* @bug 4105609
* @summary Test printing of drawArc preceded by drawString
* @author robi.khan
*/

import java.awt.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
@bug 5045936 5055171
@summary Tests that there is no ClassCastException thrown in printing
checkbox and scrollbar with XAWT
@author art@sparc.spb.su
@key printer
@run applet/manual=yesno PrintCheckboxManualTest.html
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@

/**
* @test
* @key headful
* @key headful printer
* @bug 4040668
* @summary Checks that banner titles which contain double quotation marks
* or backslashes still print correctly.
* @author dpm
*/

import java.awt.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@

/**
* @test
* @key headful
* @key headful printer
* @bug 4061440
* @summary Checks that rounded rectangles print correctly.
* @author dpm
*/

import java.awt.*;
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/PrintJob/SaveDialogTitleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/*
* @test
* @bug 4851363 8025988 8025990
* @key printer
* @summary Tests the save to file dialog has a title.
* @run main/manual=yesno/othervm SaveDialogTitleTest
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/**
* @test
* @key headful
* @key headful printer
* @bug 6195901 6195923 6195928 6195933 6491273 6888734
* @summary No SecurityException should be thrown when printing to a file
using the given policy.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/*
* @test
* @bug 8154218
* @key printer
* @summary Verifies if owner Frame is associated with print dialog
* @run main/manual TestPrintJobFrameAssociation
*/
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/PrintJob/Text/stringwidth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#
# @test
# @bug 4692562
# @key printer
# @summary Requirement: Windows with printer installed. It should print with text "Hello World".
# @compile StringWidth.java
# @run shell/manual stringwidth.sh
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/Dialog/DestinationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/**
* @test
* @bug 4846344 4851365 4851321 4851316 4863656 5046198 6293139
* @key printer
* @summary Confirm that cancelling the dialog will not prompt for file.
* @run main/manual DestinationTest
*/
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/Dialog/DialogCopies.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/*
* @test
* @bug 6357858
* @key printer
* @summary Job must reports the number of copies set in the dialog.
* @run main/manual DialogCopies
*/
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/Dialog/DialogOrient.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/*
@test
@bug 6594374
@key printer
@summary Confirm that the orientation is as specified.
@run main/manual DialogOrient
*/
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/Dialog/DialogOwnerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

/* @test
@bug 8203796
@key printer
@run main/manual DialogOwnerTest
@summary Test DialogOwner API
*/
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/Dialog/DialogType.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/**
* @test
* @bug 6568874
* @key printer
* @summary Verify the native dialog works with attribute sets.
* @run main/manual=yesno DialogType
*/
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/Dialog/MediaInPrintable.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/**
* @test
* @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.
* @run main/manual MediaInPrintable
*/
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/Dialog/PaperSizeError.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/**
* @test
* @bug 6360339
* @key printer
* @summary Test for fp error in paper size calculations.
* @run main/manual PaperSizeError
*/
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/Dialog/PrintApplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/*
@test
@bug 5024549
@key printer
@summary Pass if dialogs are modal.
@run applet/manual PrintApplet.html
*/
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/Dialog/PrintDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/*
@test
@bug 6342748
@key printer
@summary Pass if dialogs display correctly
@run main/manual PrintDialog
*/
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/Dialog/PrintDlgPageable.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/**
* @test
* @bug 4869502 4869539
* @key printer
* @summary Confirm that ToPage is populated for argument =2. Range is disabled for argument = 0.
* @run main/manual PrintDlgPageable
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/*
* @test
* @bug 6365992 6379599 8137137
* @key printer
* @summary REG: Showing and disposing a native print dialog makes the main
* frame inactive, Win32
* @run main/manual RestoreActiveWindowTest
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/Headless/HeadlessPrinterJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

/*
* @test
* @key printer
* @summary Check that PrinterJob constructor and methods do not throw unexpected
* exceptions in headless mode
* @run main/othervm -Djava.awt.headless=true HeadlessPrinterJob
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
/**
* @test
* @bug 8265761
* @key printer
* @requires (os.family == "windows")
* @summary Font with missed font family name is not properly printed on Windows
* @run main/othervm/manual PrintFontWithMissedFontFamilyTest
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/java/awt/print/PageFormat/CustomPaper.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @test
* @bug 4355514
* @bug 4385157
* @author Jennifer Godinez
* @key printer
* @summary Prints a rectangle to show the imageable area of a
* 12in x 14in custom paper size.
* @run main/manual CustomPaper
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/java/awt/print/PageFormat/ImageableAreaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* @test
* @bug 8044444 8081491
* @summary The output's 'Page-n' footer does not show completely
* @author Alexandr Scherbatiy
* @key printer
* @run main/manual ImageableAreaTest
*/
public class ImageableAreaTest {
Expand Down
7 changes: 0 additions & 7 deletions test/jdk/java/awt/print/PageFormat/NullPaper.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@

/*
@test
@key headful
@bug 4199506
@summary java.awt.print.PageFormat.setpaper(Paper paper)
assertion test fails by not throwing
NullPointerException when a null paper instance is
passed as argument and this is specified in the doc.
@author rbi: area=PageFormat
@run main NullPaper
*/

Expand All @@ -46,9 +44,6 @@
*/

import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.print.*;

// This test is a "main" test as applets would need Runtime permission
Expand Down Expand Up @@ -154,7 +149,6 @@ public static synchronized void setTimeoutTo( int seconds )
public static synchronized void pass()
{
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
if ( mainThread == Thread.currentThread() )
{
Expand All @@ -180,7 +174,6 @@ public static synchronized void fail()
public static synchronized void fail( String 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
if ( mainThread == Thread.currentThread() )
{
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/java/awt/print/PageFormat/Orient.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@summary Confirm that the you get three pages of output, one
each in portrait, landscape, and reverse landscape
orientations.
@author rbi: area=PageFormat
@key printer
@run main/manual Orient
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* @test
* @bug 4500750 6848799 8028584
* @summary Tests creating page format from attributes
* @key printer
* @run main PageFormatFromAttributes
*/
import java.awt.print.*;
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/java/awt/print/PageFormat/PageSetupDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @bug 6358747
* @bug 6574633
* @summary Page setup dialog settings
* @author prr
* @key printer
* @run main/manual PageSetupDialog
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

/**
* @test
* @key printer
* @bug 8295737
* @summary macOS: Print content cut off when width > height with portrait orientation
* @run main/othervm/manual PrintContentCutOffTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/*
* @test
* @key headful
* @key headful printer
* @bug 4254954
* @summary PageFormat would fail on solaris when setting orientation
*/
Expand Down
1 change: 1 addition & 0 deletions test/jdk/java/awt/print/PageFormat/SetOrient.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
@bug 4186119
@summary Confirm that the clip and transform of the Graphics2D is
affected by the landscape orientation of the PageFormat.
@key printer
@run applet/manual=yesno SetOrient.html
-->
<html>
Expand Down
Loading

0 comments on commit 036febd

Please sign in to comment.