OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.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 == 'Focus' || notification == 'ValueChanged') { | 17 if (notification == 'Focus' || notification == 'ValueChanged') { |
18 debug(notification + ' ' + element.deprecatedHelpText + '=' + elemen
t.valueDescription); | 18 debug(notification + ' ' + element.description + '=' + element.value
Description); |
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 </body> | 39 </body> |
40 </html> | 40 </html> |
OLD | NEW |