| OLD | NEW |
| 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="month" id="month1" value="2000-01"> | 9 <input type="week" id="week1" value="2000-W13"> |
| 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 // Remove ',' to reduce platform differences. | 16 // Remove ',' to reduce platform differences. |
| 17 debug('Focused: ' + escapeHTML(accessibilityController.focusedElement.de
scription.replace(/,/g, ''))); | 17 debug('Focused: ' + escapeHTML(accessibilityController.focusedElement.de
scription.replace(/,/g, ''))); |
| 18 } else if (type == 'ActiveDescendantChanged') { | 18 } else if (type == 'ActiveDescendantChanged') { |
| 19 testPassed('Received ActiveDescendantChanged'); | 19 testPassed('Received ActiveDescendantChanged'); |
| 20 if (++activeDescendantCounter == 2) | 20 if (++activeDescendantCounter == 2) |
| 21 finishJSTest(); | 21 finishJSTest(); |
| 22 } | 22 } |
| 23 }); | 23 }); |
| 24 var activeDescendantCounter = 0; | 24 var activeDescendantCounter = 0; |
| 25 var month1 = document.getElementById('month1'); | 25 var week1 = document.getElementById('week1'); |
| 26 openPicker(month1, test1); | 26 openPicker(week1, test1); |
| 27 | 27 |
| 28 function test1() { | 28 function test1() { |
| 29 eventSender.keyDown('rightArrow'); | 29 eventSender.keyDown('downArrow'); |
| 30 } | 30 } |
| 31 | 31 |
| 32 </script> | 32 </script> |
| 33 </body> | 33 </body> |
| 34 </html> | 34 </html> |
| OLD | NEW |