Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: LayoutTests/fast/forms/calendar-picker/date-picker-ax.html

Issue 561673002: AX: Calendar Picker: Update a test for button descriptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test stability Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/forms/calendar-picker/date-picker-ax-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../forms/resources/picker-common.js"></script> 5 <script src="../../forms/resources/picker-common.js"></script>
6 <script src="resources/calendar-picker-common.js"></script> 6 <script src="resources/calendar-picker-common.js"></script>
7 <p id="description"></p> 7 <p id="description"></p>
8 <div id="console"></div> 8 <div id="console"></div>
9 <input type="date" id="date1" value="2000-01-02"> 9 <input type="date" id="date1" value="2000-01-02">
10 10
11 <script> 11 <script>
12 description('Tests if typing an arrow key dispatches |Focus| and |ActiveDescenda ntChanged| a11y events.'); 12 description('Tests if typing an arrow key dispatches |Focus| and |ActiveDescenda ntChanged| a11y events.');
13 13
14 window.accessibilityController.setNotificationListener(function(axnode, type) { 14 window.accessibilityController.setNotificationListener(function(axnode, type) {
15 if (type == 'Focus') { 15 if (type == 'Focus') {
16 debug('Focused: ' + accessibilityController.focusedElement.description); 16 debug('Focused: ' + escapeHTML(accessibilityController.focusedElement.de scription));
17 } else if (type == 'ActiveDescendantChanged') { 17 } else if (type == 'ActiveDescendantChanged') {
18 testPassed('Received ActiveDescendantChanged'); 18 testPassed('Received ActiveDescendantChanged');
19 if (++activeDescendantCounter >= 2) 19 if (++activeDescendantCounter == 2)
20 finishJSTest(); 20 testButtonDescription();
21 } 21 }
22 }); 22 });
23 var activeDescendantCounter = 0; 23 var activeDescendantCounter = 0;
24 var date1 = document.getElementById('date1'); 24 var date1 = document.getElementById('date1');
25 openPicker(date1, test1); 25 openPicker(date1, test1);
26 26
27 function test1() { 27 function test1() {
28 eventSender.keyDown('rightArrow'); 28 eventSender.keyDown('rightArrow');
29 } 29 }
30
31 function testButtonDescription() {
32 // Focus on 'next month' button.
33 eventSender.keyDown('\t', ['shiftKey']);
34 // Focus on the today button.
35 eventSender.keyDown('\t', ['shiftKey']);
36 // Focus on 'previous month' button.
37 eventSender.keyDown('\t', ['shiftKey']);
38 // Focus on the month selector button.
39 eventSender.keyDown('\t', ['shiftKey']);
40 setTimeout(finishJSTest, 0);
41 }
30 </script> 42 </script>
31 </body> 43 </body>
32 </html> 44 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/calendar-picker/date-picker-ax-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698