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="time" value="12:34:56.789"> | 7 <input id=test type="time" value="12:34:56.789"> |
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 function enableAccessibility() | 11 function enableAccessibility() |
12 { | 12 { |
13 if (!window.accessibilityController) { | 13 if (!window.accessibilityController) { |
14 debug("Please run inside DumpRenderTree."); | 14 debug("Please run inside DumpRenderTree."); |
15 return; | 15 return; |
16 } | 16 } |
17 | 17 |
18 accessibilityController.addNotificationListener(function (element, notificat
ion) { | 18 accessibilityController.addNotificationListener(function (element, notificat
ion) { |
19 if (notification == 'Focus' || notification == 'ValueChanged') { | 19 if (notification == 'Focus' || notification == 'ValueChanged') { |
20 debug(notification + ' ' + element.deprecatedHelpText + '=' + elemen
t.valueDescription); | 20 debug(notification + ' ' + element.description + '=' + element.value
Description); |
21 } | 21 } |
22 }); | 22 }); |
23 } | 23 } |
24 | 24 |
25 function keyDown(key, modifiers) | 25 function keyDown(key, modifiers) |
26 { | 26 { |
27 if (!window.eventSender) | 27 if (!window.eventSender) |
28 return; | 28 return; |
29 eventSender.keyDown(key, modifiers); | 29 eventSender.keyDown(key, modifiers); |
30 } | 30 } |
31 | 31 |
32 var testInput = document.getElementById("test"); | 32 var testInput = document.getElementById("test"); |
33 | 33 |
34 enableAccessibility(); | 34 enableAccessibility(); |
35 testInput.focus(); | 35 testInput.focus(); |
36 keyDown('\t'); | 36 keyDown('\t'); |
37 keyDown('4'); | 37 keyDown('4'); |
38 keyDown('upArrow'); | 38 keyDown('upArrow'); |
39 | 39 |
40 window.jsTestIsAsync = true; | 40 window.jsTestIsAsync = true; |
41 | 41 |
42 window.setTimeout(function () { | 42 window.setTimeout(function () { |
43 debug(''); | 43 debug(''); |
44 testInput.parentNode.removeChild(testInput); | 44 testInput.parentNode.removeChild(testInput); |
45 finishJSTest(); | 45 finishJSTest(); |
46 }, 1); | 46 }, 1); |
47 </script> | 47 </script> |
48 </body> | 48 </body> |
49 </html> | 49 </html> |
OLD | NEW |