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="date" value="2012-10-09"> | 7 <input id="test" type="date" value="2012-10-09"> |
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 | 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.parentNode.removeChild(testInput); | 31 testInput.parentNode.removeChild(testInput); |
32 finishJSTest(); | 32 finishJSTest(); |
33 }, 1); | 33 }, 1); |
34 } | 34 } |
35 </script> | 35 </script> |
36 </body> | 36 </body> |
37 </html> | 37 </html> |
OLD | NEW |