Skip to content

Commit 3e67a3b

Browse files
author
Amos Shi
committed
8279641: Create manual JTReg tests for Swing accessibility
Backport-of: 5523ddebd572f38c3f960950d114ffead33266ae
1 parent 1215b90 commit 3e67a3b

35 files changed

+1410
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<!--
2+
Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
3+
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
5+
This code is free software; you can redistribute it and/or modify it
6+
under the terms of the GNU General Public License version 2 only, as
7+
published by the Free Software Foundation.
8+
9+
This code is distributed in the hope that it will be useful, but WITHOUT
10+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
version 2 for more details (a copy is included in the LICENSE file that
13+
accompanied this code).
14+
15+
You should have received a copy of the GNU General Public License version
16+
2 along with this work; if not, write to the Free Software Foundation,
17+
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
19+
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
or visit www.oracle.com if you need additional information or have any
21+
questions.
22+
-->
23+
<!DOCTYPE html>
24+
<html>
25+
<head>
26+
<style>
27+
table, th, td {
28+
border: 1px solid black;
29+
}
30+
31+
</style>
32+
</head>
33+
<body>
34+
35+
36+
<table>
37+
<tr>
38+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:5%;">S.No</th>
39+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:25%;">Test</th>
40+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:75%;">Scenario</th>
41+
</tr>
42+
<tr>
43+
<td>1</td>
44+
<td>Button Demo</td>
45+
<td>
46+
<ol>
47+
<li> Tab until the Button Demo icon <img src="./resource/rbtn.png"> has focus. Press 'space' to
48+
choose.<br>
49+
<li> Tab until the "Button Demo" tab has focus. Press 'space'. Press 'tab'.<br>
50+
<li> Use the arrow keys to navigate between "Buttons", "Radio Buttons", and "Check Boxes".<br>
51+
<li> Tab to enter the demo pane. Tab & Shift-Tab to move between each button.<br>
52+
<li> Press 'space' to trigger (i.e. "press") a button.<br>
53+
<li> Repeat steps 1 through 5 for the <b>Radio Button</b> & <b>Check Boxes</b> tabs.<br>
54+
</ol>
55+
</td>
56+
</td>
57+
</tr>
58+
<tr>
59+
<td style="Width:100%;" colspan="3"><b>Expected Result</b></td>
60+
</tr>
61+
<tr>
62+
<td style="Width:100%;" colspan="3">
63+
<ol>
64+
<li>Verify that as you navigate, the focus is shown, e.g.</li>
65+
<img src="./resource/btn.png">
66+
<li>As you press 'space' to trigger each button, verify that you see each button visually depress.
67+
e.g.:
68+
</li>
69+
<img src="./resource/dep.png">
70+
</ol>
71+
</td>
72+
</tr>
73+
<tr>
74+
<td style="Width:100%;" colspan="3"><b>Note: actual component appearence may vary depending on look and
75+
feel.</b></td>
76+
</tr>
77+
</table>
78+
</body>
79+
</html>
80+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation.
8+
*
9+
* This code is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
* version 2 for more details (a copy is included in the LICENSE file that
13+
* accompanied this code).
14+
*
15+
* You should have received a copy of the GNU General Public License version
16+
* 2 along with this work; if not, write to the Free Software Foundation,
17+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
*
19+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
* or visit www.oracle.com if you need additional information or have any
21+
* questions.
22+
*/
23+
/*
24+
@test
25+
@key headful
26+
@summary manual test for accessibility button demo
27+
@run main/manual SwingSetTest ButtonDemo
28+
*/
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<!--
2+
Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
3+
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
5+
This code is free software; you can redistribute it and/or modify it
6+
under the terms of the GNU General Public License version 2 only, as
7+
published by the Free Software Foundation.
8+
9+
This code is distributed in the hope that it will be useful, but WITHOUT
10+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
version 2 for more details (a copy is included in the LICENSE file that
13+
accompanied this code).
14+
15+
You should have received a copy of the GNU General Public License version
16+
2 along with this work; if not, write to the Free Software Foundation,
17+
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
19+
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
or visit www.oracle.com if you need additional information or have any
21+
questions.
22+
-->
23+
<!DOCTYPE html>
24+
<html>
25+
<head>
26+
<style>
27+
table, th, td {
28+
border: 1px solid black;
29+
}
30+
31+
</style>
32+
</head>
33+
<body>
34+
35+
36+
<table>
37+
<tr>
38+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:5%;">S.No</th>
39+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:25%;">Test</th>
40+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:75%;">Scenario</th>
41+
</tr>
42+
<tr>
43+
<td>1</td>
44+
<td>ComboBox Demo</td>
45+
<td>
46+
<ol>
47+
<li> Tab until ComboBox icon<img src="./resource/cmb.png"> has focus. Press 'Space' to choose.</li>
48+
<li>Tab until the "ComboBox Demo" tab has focus. Press 'space'. Press 'tab'.</li>
49+
<li> Use Tab and Shift-Tab to move between the four ComboBox widgets.
50+
<li>Use the space and down arrow keys to bring up the drop-down list.</li>
51+
<li> Use the up and down arrows to navigate up and down the list.</li>
52+
<li>Use the 'space' key to make a the selection.</li>
53+
<li> Repeat 4,5 but hit Esc key to cancel the drop-down.</li>
54+
</ol>
55+
</td>
56+
</td>
57+
</tr>
58+
<tr>
59+
<td style="Width:100%;" colspan="3"><b>Expected Result</b></td>
60+
</tr>
61+
<tr>
62+
<td style="Width:100%;" colspan="3">
63+
<ol>
64+
<li>Verify that space and down arrow bring up the drop-down list.</li>
65+
<img src="./resource/list.png">
66+
<li>Verify that up and down arrows move up and down the list.</li>
67+
<li>Verify that 'space' makes the selection (the drop-down list should collapse).</li>
68+
</ol>
69+
</td>
70+
</tr>
71+
</table>
72+
</body>
73+
</html>
74+
75+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation.
8+
*
9+
* This code is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
* version 2 for more details (a copy is included in the LICENSE file that
13+
* accompanied this code).
14+
*
15+
* You should have received a copy of the GNU General Public License version
16+
* 2 along with this work; if not, write to the Free Software Foundation,
17+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
*
19+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
* or visit www.oracle.com if you need additional information or have any
21+
* questions.
22+
*/
23+
/*
24+
@test
25+
@key headful
26+
@summary manual test for accessibility button demo
27+
@run main/manual SwingSetTest ComboBoxDemo
28+
*/
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!--
2+
Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
3+
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
5+
This code is free software; you can redistribute it and/or modify it
6+
under the terms of the GNU General Public License version 2 only, as
7+
published by the Free Software Foundation.
8+
9+
This code is distributed in the hope that it will be useful, but WITHOUT
10+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
version 2 for more details (a copy is included in the LICENSE file that
13+
accompanied this code).
14+
15+
You should have received a copy of the GNU General Public License version
16+
2 along with this work; if not, write to the Free Software Foundation,
17+
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
19+
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
or visit www.oracle.com if you need additional information or have any
21+
questions.
22+
-->
23+
<!DOCTYPE html>
24+
<html>
25+
<head>
26+
<style>
27+
table, th, td {
28+
border: 1px solid black;
29+
}
30+
31+
</style>
32+
</head>
33+
<body>
34+
35+
36+
<table>
37+
<tr>
38+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:5%;">S.No</th>
39+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:25%;">Test</th>
40+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:75%;">Scenario</th>
41+
</tr>
42+
<tr>
43+
<td>1</td>
44+
<td>Demo Selection</td>
45+
<td>Move between demos with 'tab' and 'shift-tab', and left and right arrows. Type 'space' to activate a demo.
46+
<img src="./resource/dms.png">
47+
</td>
48+
</td>
49+
</tr>
50+
<tr>
51+
<td style="Width:100%;" colspan="3"><b>Expected Result</b></td>
52+
</tr>
53+
<tr>
54+
<td style="Width:100%;" colspan="3">
55+
Verify that there is visible focus as you tab (or arrow) between demo icons. Typing 'space' should change
56+
the selected demo.
57+
</td>
58+
</tr>
59+
<tr>
60+
<td style="Width:100%;" colspan="3"><b>Note: actual component appearence may vary depending on look and
61+
feel.</b></td>
62+
</tr>
63+
</table>
64+
</body>
65+
</html>
66+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation.
8+
*
9+
* This code is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
* version 2 for more details (a copy is included in the LICENSE file that
13+
* accompanied this code).
14+
*
15+
* You should have received a copy of the GNU General Public License version
16+
* 2 along with this work; if not, write to the Free Software Foundation,
17+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
*
19+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
* or visit www.oracle.com if you need additional information or have any
21+
* questions.
22+
*/
23+
/*
24+
@test
25+
@key headful
26+
@summary manual test for accessibility button demo
27+
@run main/manual SwingSetTest DemoSelection
28+
*/
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<!--
2+
Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
3+
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
5+
This code is free software; you can redistribute it and/or modify it
6+
under the terms of the GNU General Public License version 2 only, as
7+
published by the Free Software Foundation.
8+
9+
This code is distributed in the hope that it will be useful, but WITHOUT
10+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
version 2 for more details (a copy is included in the LICENSE file that
13+
accompanied this code).
14+
15+
You should have received a copy of the GNU General Public License version
16+
2 along with this work; if not, write to the Free Software Foundation,
17+
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
19+
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
or visit www.oracle.com if you need additional information or have any
21+
questions.
22+
-->
23+
<!DOCTYPE html>
24+
<html>
25+
<head>
26+
<style>
27+
table, th, td {
28+
border: 1px solid black;
29+
}
30+
31+
</style>
32+
</head>
33+
<body>
34+
35+
36+
<table>
37+
<tr>
38+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:5%;">S.No</th>
39+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:25%;">Test</th>
40+
<th style="background-color:rgb(204,255,255); font-weight:bold; width:75%;">Scenario</th>
41+
</tr>
42+
<tr>
43+
<td>1</td>
44+
<td>OptionPane Demo</td>
45+
<td>
46+
<ol>
47+
<li>Tab until the OptionPane icon <img src="./resource/op.png">has focus. Press 'space' to choose.
48+
<li>Tab until the "OptionPane Demo" tab has focus. Press 'space'. Press 'tab'. The 'Show Input Dialog'
49+
button should have focus.
50+
<li>Press 'space'. An Input dialog should pop up. Type some text, and hit return. The dialog should
51+
change to a Message dialog with text saying "That was a pretty good movie!" Press return.
52+
<li>Bring up the dialog again (space). Press 'esc' and confirm that the dialog goes away without the
53+
Message from above.
54+
<li>Press Tab to move down through the buttons, and select "Component Dialog Example" (press space). A
55+
dialog should appear. Tab to ensure that you can navigate through all the components:<br>
56+
a. Textfield<br>
57+
b. ComboBox<br>
58+
c. All 4 buttons: "Cancel", "Probably", "Maybe", "No", "Yes".<br>
59+
d. Press 'esc' to cancel the dialog.<br>
60+
</ol>
61+
</td>
62+
</tr>
63+
<tr>
64+
<td style="Width:100%;" colspan="3">
65+
<b>Expected Result</b>
66+
</td>
67+
</tr>
68+
<tr>
69+
<td style="Width:100%;" colspan="3">
70+
When a popup window is created, focus must be on the popup window; when the window is closed, focus must
71+
return to the previous focus point.
72+
</td>
73+
</tr>
74+
</table>
75+
</body>
76+
</html>
77+
78+

0 commit comments

Comments
 (0)