| 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="datetime-local" value="2012-10-09T12:34:56"> | 7 <input id="test" type="datetime-local" value="2012-10-09T12:34:56"> |
| 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 eventSender.keyDown('\t'); | 26 eventSender.keyDown('\t'); |
| 27 eventSender.keyDown('2'); | 27 eventSender.keyDown('2'); |
| 28 eventSender.keyDown('downArrow'); | 28 eventSender.keyDown('downArrow'); |
| 29 | 29 |
| 30 window.jsTestIsAsync = true; | 30 window.jsTestIsAsync = true; |
| 31 | 31 |
| 32 window.setTimeout(function() { | 32 window.setTimeout(function() { |
| 33 debug(''); | 33 debug(''); |
| 34 testInput.parentNode.removeChild(testInput); | 34 testInput.parentNode.removeChild(testInput); |
| 35 finishJSTest(); | 35 finishJSTest(); |
| 36 }, 1); | 36 }, 1); |
| 37 } | 37 } |
| 38 </script> | 38 </script> |
| 39 <script src="../../../fast/js/resources/js-test-post.js"></script> | 39 <script src="../../../fast/js/resources/js-test-post.js"></script> |
| 40 </body> | 40 </body> |
| 41 </html> | 41 </html> |
| OLD | NEW |