4 <script src=
"../../../resources/js-test.js"></script>
7 <input id=
"test" type=
"week" value=
"2012-W10">
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.');
22 debug('Non-empty value');
24 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Week, AXValueDescription: 10, 1, 53');
25 eventSender
.keyDown('\t');
26 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Year, AXValueDescription: 2012, 1, 275760');
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');