summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-ax-aria-attributes.html
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-ax-aria-attributes.html')
-rw-r--r--third_party/WebKit/LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-ax-aria-attributes.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-ax-aria-attributes.html b/third_party/WebKit/LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-ax-aria-attributes.html
new file mode 100644
index 0000000..b250665
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-ax-aria-attributes.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<input id="test" type="week" value="2012-W10">
+<script>
+description('This test checks aria-help attribute of fields in multiple fields week input UI.');
+
+function focusedFieldValueDescription()
+{
+ var element = accessibilityController.focusedElement;
+ return element.helpText + ', ' + element.valueDescription + ', ' + element.minValue + ', ' + element.maxValue;
+}
+
+var testInput = document.getElementById('test');
+
+if (!window.accessibilityController || !window.eventSender)
+ debug('Please run inside DRT or WTR.');
+else {
+ debug('Non-empty value');
+ testInput.focus();
+ shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Week, AXValueDescription: 10, 1, 53');
+ eventSender.keyDown('\t');
+ shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Year, AXValueDescription: 2012, 1, 275760');
+
+ debug('Empty value');
+ eventSender.keyDown('\b');
+ shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Year, AXValueDescription: blank, 1, 275760');
+ eventSender.keyDown('\t', ['shiftKey']);
+ eventSender.keyDown('\b');
+ shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Week, AXValueDescription: blank, 1, 53');
+
+ debug('');
+ testInput.remove();
+}
+</script>
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>