8281284: Write JSlider accessibility test
Reviewed-by: prr, kizune
This commit is contained in:
parent
fe670ff403
commit
f074775f6c
test/jdk/javax/accessibility/manual
79
test/jdk/javax/accessibility/manual/SliderDemo.html
Normal file
79
test/jdk/javax/accessibility/manual/SliderDemo.html
Normal file
@ -0,0 +1,79 @@
|
||||
<!--
|
||||
Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
This code is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License version 2 only, as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
version 2 for more details (a copy is included in the LICENSE file that
|
||||
accompanied this code).
|
||||
|
||||
You should have received a copy of the GNU General Public License version
|
||||
2 along with this work; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
or visit www.oracle.com if you need additional information or have any
|
||||
questions.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th style="background-color:rgb(204,255,255); font-weight:bold; width:5%;">S.No</th>
|
||||
<th style="background-color:rgb(204,255,255); font-weight:bold; width:25%;">Test</th>
|
||||
<th style="background-color:rgb(204,255,255); font-weight:bold; width:75%;">Scenario</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Test Slider Demo (test different Sliders and its values should changing when
|
||||
different keys are pressed and mouse drag and click action are performed).</td>
|
||||
<td>
|
||||
<ol>
|
||||
<li>Tab or use array keys until the Slider icon <img src="./resource/jsliderIcon.gif"> has focus on it.</li>
|
||||
<li>Press 'space' to choose Slider Demo. Press tab key to move the focus on the slider.</li>
|
||||
<li>Pressing Left / Down arrow keys will decrease the Slider value.</li>
|
||||
<li>Pressing Right / Up arrow keys will increase the Slider value.</li>
|
||||
<li>Pressing Home key Slider value is set to initial value</li>
|
||||
<li>Pressing End key Slider value is set to final or maximum value</li>
|
||||
<li>Pressing PageUp / PageDown key Slider value is jump to the value range
|
||||
value set.</li>
|
||||
<li>Use mouse to drag the slider head or thumb to increase or decrease the slider value.</li>
|
||||
<li>Disabled Slider value will not change.</li>
|
||||
</ol>
|
||||
<img src="./resource/Slider.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="Width:100%;" colspan="3">
|
||||
<b>Expected Result</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="Width:100%;" colspan="3">
|
||||
Verify that Slider value should change according to the Key press key release and mouse
|
||||
action.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="Width:100%;" colspan="3"><b>Note: actual component appearence may vary depending on look and
|
||||
feel.</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
28
test/jdk/javax/accessibility/manual/SliderDemo.java
Normal file
28
test/jdk/javax/accessibility/manual/SliderDemo.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
/*
|
||||
@test
|
||||
@key headful
|
||||
@summary manual test for accessibility Slider demo
|
||||
@run main/manual SwingSetTest SliderDemo
|
||||
*/
|
BIN
test/jdk/javax/accessibility/manual/resource/Slider.png
Normal file
BIN
test/jdk/javax/accessibility/manual/resource/Slider.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 57 KiB |
BIN
test/jdk/javax/accessibility/manual/resource/jsliderIcon.gif
Normal file
BIN
test/jdk/javax/accessibility/manual/resource/jsliderIcon.gif
Normal file
Binary file not shown.
After ![]() (image error) Size: 426 B |
Loading…
x
Reference in New Issue
Block a user