4 <script src=
"../../../resources/js-test.js"></script>
7 <input id=
"test" type=
"datetime-local" step=
"0.001" value=
"2012-10-09T12:34:56.789">
9 description('This test checks aria-help attribute of fields in multiple fields datetime-local 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: Month, AXValueDescription: 10, 1, 12');
25 eventSender
.keyDown('\t');
26 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Day, AXValueDescription: 09, 1, 31');
27 eventSender
.keyDown('\t');
28 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Year, AXValueDescription: 2012, 1, 275760');
29 eventSender
.keyDown('\t');
30 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Hours, AXValueDescription: 12, 1, 12');
31 eventSender
.keyDown('\t');
32 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Minutes, AXValueDescription: 34, 0, 59');
33 eventSender
.keyDown('\t');
34 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Seconds, AXValueDescription: 56, 0, 59');
35 eventSender
.keyDown('\t');
36 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Milliseconds, AXValueDescription: 789, 0, 999');
37 eventSender
.keyDown('\t');
38 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: AM/PM, AXValueDescription: PM, 1, 2');
41 eventSender
.keyDown('\b');
42 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: AM/PM, AXValueDescription: blank, 1, 2');
43 eventSender
.keyDown('\t', ['shiftKey']);
44 eventSender
.keyDown('\b');
45 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Milliseconds, AXValueDescription: blank, 0, 999');
46 eventSender
.keyDown('\t', ['shiftKey']);
47 eventSender
.keyDown('\b');
48 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Seconds, AXValueDescription: blank, 0, 59');
49 eventSender
.keyDown('\t', ['shiftKey']);
50 eventSender
.keyDown('\b');
51 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Minutes, AXValueDescription: blank, 0, 59');
52 eventSender
.keyDown('\t', ['shiftKey']);
53 eventSender
.keyDown('\b');
54 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Hours, AXValueDescription: blank, 1, 12');
55 eventSender
.keyDown('\t', ['shiftKey']);
56 eventSender
.keyDown('\b');
57 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Year, AXValueDescription: blank, 1, 275760');
58 eventSender
.keyDown('\t', ['shiftKey']);
59 eventSender
.keyDown('\b');
60 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Day, AXValueDescription: blank, 1, 31');
61 eventSender
.keyDown('\t', ['shiftKey']);
62 eventSender
.keyDown('\b');
63 shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Month, AXValueDescription: blank, 1, 12');
66 testInput
.parentNode
.removeChild(testInput
);