| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../../fast/js/resources/js-test-pre.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <input id="test" type="week" value="2012-W10"> | 7 <input id="test" type="week" value="2012-W10"> |
| 8 <script> | 8 <script> |
| 9 description('This test checks value changed accessibility notifications.'); | 9 description('This test checks value changed accessibility notifications.'); |
| 10 | 10 |
| 11 var testInput = document.getElementById("test"); | 11 var testInput = document.getElementById("test"); |
| 12 | 12 |
| 13 if (!window.accessibilityController || !window.eventSender) | 13 if (!window.accessibilityController || !window.eventSender) |
| 14 debug("Please run inside DRT or WRT."); | 14 debug("Please run inside DRT or WRT."); |
| 15 else { | 15 else { |
| 16 accessibilityController.addNotificationListener(function (element, notificat
ion) { | 16 accessibilityController.addNotificationListener(function (element, notificat
ion) { |
| 17 if (notification == 'FocusedUIElementChanged' || notification == 'ValueC
hanged') { | 17 if (notification == 'Focus' || notification == 'ValueChanged') { |
| 18 debug(notification + ' ' + element.helpText + '=' + element.valueDes
cription); | 18 debug(notification + ' ' + element.helpText + '=' + element.valueDes
cription); |
| 19 } | 19 } |
| 20 }); | 20 }); |
| 21 | 21 |
| 22 testInput.focus(); | 22 testInput.focus(); |
| 23 eventSender.keyDown('\t'); | 23 eventSender.keyDown('\t'); |
| 24 eventSender.keyDown('4'); | 24 eventSender.keyDown('4'); |
| 25 eventSender.keyDown('upArrow'); | 25 eventSender.keyDown('upArrow'); |
| 26 | 26 |
| 27 window.jsTestIsAsync = true; | 27 window.jsTestIsAsync = true; |
| 28 | 28 |
| 29 window.setTimeout(function() { | 29 window.setTimeout(function() { |
| 30 debug(''); | 30 debug(''); |
| 31 testInput.remove(); | 31 testInput.remove(); |
| 32 finishJSTest(); | 32 finishJSTest(); |
| 33 }, 1); | 33 }, 1); |
| 34 } | 34 } |
| 35 </script> | 35 </script> |
| 36 <script src="../../../fast/js/resources/js-test-post.js"></script> | 36 <script src="../../../fast/js/resources/js-test-post.js"></script> |
| 37 </body> | 37 </body> |
| 38 </html> | 38 </html> |
| OLD | NEW |