Skip to content

Commit 6e2ab84

Browse files
Srinivas Mandalikaprrace
authored andcommitted
8068378: [TEST_BUG]The java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java instruction need to update
Reviewed-by: psadhukhan, prr
1 parent 9b12c0b commit 6e2ab84

File tree

3 files changed

+30
-35
lines changed

3 files changed

+30
-35
lines changed

test/jdk/ProblemList.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,6 @@ java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_1.java 7131438,802
772772
java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_2.java 7131438,8022539 generic-all
773773
java/awt/Modal/WsDisabledStyle/CloseBlocker/CloseBlocker.java 7187741 linux-all,macosx-all
774774
java/awt/xembed/server/TestXEmbedServerJava.java 8001150,8004031 generic-all
775-
java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java 8068378 generic-all
776775
java/awt/image/VolatileImage/VolatileImageConfigurationTest.java 8171069 macosx-all,linux-all
777776
java/awt/Modal/InvisibleParentTest/InvisibleParentTest.java 8172245 linux-all
778777
java/awt/Frame/FrameStateTest/FrameStateTest.java 8203920 macosx-all,linux-all

test/jdk/java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -49,40 +49,35 @@
4949

5050
public class PrintDialogsTest extends Panel implements ActionListener {
5151

52-
static final String INSTRUCTIONS = """
53-
This test is free format, which means there is no enforced or guided sequence.
54-
55-
Please select each of
56-
(a) The dialog parent type.
57-
(b) The dialog modality type
58-
(c) The print dialog type (Print dialog or Page Setup dialog)
59-
60-
Once the choices have been made click the "Start test" button.
61-
62-
Three windows will appear
63-
(1) A Frame or a Dialog - in the case you selected "Dialog" as the parent type
64-
(2) a Window (ie an undecorated top-level)
65-
(3) A dialog with two buttons "Open" and "Finish"
66-
67-
Now check as follows whether modal blocking works as expected.
68-
Windows (1) and (2) contain a button which you should be able to press
69-
ONLY if you selected "Non-modal", or "Modeless" for modality type.
70-
In other cases window (3) will block input to (1) and (2)
71-
72-
Then push the "Open" button on the Dialog to show the printing dialog and check
73-
if it blocks the rest of the application - ie all of windows (1), (2) and (3)
74-
should ALWAYS be blocked when the print dialog is showing.
75-
Now cancel the printing dialog and check the correctness of modal blocking
76-
behavior for the Dialog again.
77-
To close all the 3 test windows please push the "Finish" button.
78-
79-
Repeat all the above for different combinations, which should include
80-
using all of the Dialog parent choices and all of the Dialog Modality types.
81-
82-
If any behave incorrectly, note the combination of choices and press Fail.
83-
84-
If all behave correctly, press Pass.
85-
""";
52+
static final String INSTRUCTIONS =
53+
"1. On the Test UI Select:\n" +
54+
"\tThe dialog parent type. (e.g. Frame, Dialog, Hidden, Null)\n" +
55+
"\tThe dialog modality type. (e.g. Modal, Non-Modal, Toolkit modal).\n" +
56+
"\tThe print dialog type. (Print dialog or Page Setup dialog).\n\n" +
57+
"2. Next, click on 'Start test' - Three windows will appear:\n" +
58+
"\tWindow (1) -a Frame or Dialog (depending on selected parent type).\n" +
59+
"\tWindow (2) -an undecorated top-level Window.\n" +
60+
"\tWindow (3) -a Dialog containing two buttons: 'Open' and 'Finish'.\n" +
61+
"\tWindows (1) & (2) have a Dummy button.\n\n" +
62+
"3. Press the button on Window (1) & Window (2) \n" +
63+
"Verification step:\n" +
64+
"\tIf Modality is 'Non-modal' or 'Modeless', Button is pressed \n" +
65+
"\tIf Modality is 'Document' & parent is not Frame/Dialog, Button is pressed \n" +
66+
"\tIn all other cases, button is not pressed & Window (3) should \n" +
67+
"\tblock input to Windows (1) & (2).\n\n" +
68+
"4. Next, press the 'Open' button in Window (3) to open print dialog.\n\n" +
69+
"5. Press the button on Window (1) & Window (2)\n" +
70+
"Verification step:\n" +
71+
"\tThe print dialog should block all three windows (1, 2, and 3).\n\n" +
72+
"6. Cancel the print dialog, Check again if Window (3) " +
73+
"blocks Windows (1) and (2) correctly.\n" +
74+
"Verification step:\n" +
75+
"\tConditions as seen in Verification step 3 " +
76+
"should be seen, as before.\n" +
77+
"To close all test windows, press 'Finish'.\n\n" +
78+
"7. Repeat the steps for different combinations of Dialog Parent, Dialog Modality Type, Print Dialg Type.\n" +
79+
"Try every dialog parent type and every dialog modality type.\n\n" +
80+
"If any of the Verification step fails, note the combination and press 'Fail'.\n";
8681

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

test/jdk/java/awt/Modal/PrintDialogsTest/Test.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ private void createGUI() {
191191
break;
192192
case DIALOG:
193193
dialog = new CustomDialog(parent);
194+
break;
194195
case FRAME:
195196
dialog = new CustomDialog(frame);
196197
break;

0 commit comments

Comments
 (0)