Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / week-multiple-fields / week-multiple-fields-ax-aria-attributes.html
blobc275bf91038175b7d8e9aa98802d27937eb238d6
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <input id="test" type="week" value="2012-W10">
8 <script>
9 description('This test checks aria-help attribute of fields in multiple fields week input UI.');
11 function focusedFieldValueDescription()
13 var element = accessibilityController.focusedElement;
14 return element.helpText + ', ' + element.valueDescription + ', ' + element.minValue + ', ' + element.maxValue;
17 var testInput = document.getElementById('test');
19 if (!window.accessibilityController || !window.eventSender)
20 debug('Please run inside DRT or WTR.');
21 else {
22 debug('Non-empty value');
23 testInput.focus();
24 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Week, AXValueDescription: 10, 1, 53');
25 eventSender.keyDown('\t');
26 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Year, AXValueDescription: 2012, 1, 275760');
28 debug('Empty value');
29 eventSender.keyDown('\b');
30 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Year, AXValueDescription: blank, 1, 275760');
31 eventSender.keyDown('\t', ['shiftKey']);
32 eventSender.keyDown('\b');
33 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Week, AXValueDescription: blank, 1, 53');
35 debug('');
36 testInput.remove();
38 </script>
39 </body>
40 </html>