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

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

Issue 564053002: AX: Calendar Picker: Apply aria-activedescendant to YearListView. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix the test for Windows 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: ' + escapeHTML(accessibilityController.focusedElement.de scription)); 16 // Remove ',' to reduce platform differences.
17 debug('Focused: ' + escapeHTML(accessibilityController.focusedElement.de scription.replace(/,/g, '')));
17 } else if (type == 'ActiveDescendantChanged') { 18 } else if (type == 'ActiveDescendantChanged') {
18 testPassed('Received ActiveDescendantChanged'); 19 testPassed('Received ActiveDescendantChanged');
19 if (++activeDescendantCounter == 2) 20 if (++activeDescendantCounter == 2) {
20 testButtonDescription(); 21 testButtonDescription();
22 } else if (activeDescendantCounter == 3) {
23 // Highlight 2000-02 in the month popup.
24 setTimeout(function() { eventSender.keyDown('rightArrow'); }, 0);
25 } else if (activeDescendantCounter == 4) {
26 // Highlight 1999-10 in the month popup.
27 setTimeout(function() { eventSender.keyDown('upArrow'); }, 0);
28 } else if (activeDescendantCounter == 5) {
29 finishJSTest();
30 }
21 } 31 }
22 }); 32 });
23 var activeDescendantCounter = 0; 33 var activeDescendantCounter = 0;
24 var date1 = document.getElementById('date1'); 34 var date1 = document.getElementById('date1');
25 openPicker(date1, test1); 35 openPicker(date1, test1);
26 36
27 function test1() { 37 function test1() {
28 eventSender.keyDown('rightArrow'); 38 eventSender.keyDown('rightArrow');
29 } 39 }
30 40
31 function testButtonDescription() { 41 function testButtonDescription() {
32 // Focus on 'next month' button. 42 // Focus on 'next month' button.
33 eventSender.keyDown('\t', ['shiftKey']); 43 eventSender.keyDown('\t', ['shiftKey']);
34 // Focus on the today button. 44 // Focus on the today button.
35 eventSender.keyDown('\t', ['shiftKey']); 45 eventSender.keyDown('\t', ['shiftKey']);
36 // Focus on 'previous month' button. 46 // Focus on 'previous month' button.
37 eventSender.keyDown('\t', ['shiftKey']); 47 eventSender.keyDown('\t', ['shiftKey']);
38 // Focus on the month selector button. 48 // Focus on the month selector button.
39 eventSender.keyDown('\t', ['shiftKey']); 49 eventSender.keyDown('\t', ['shiftKey']);
40 setTimeout(finishJSTest, 0); 50
51 debug('Open the month popup. This should notify the third ActiveDescendantCh anged.');
52 eventSender.keyDown(' ');
41 } 53 }
42 </script> 54 </script>
43 </body> 55 </body>
44 </html> 56 </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