Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-ax-aria-attributes.html

Issue 12086056: Merge 140803 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-ax-aria-attributes-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-ax-aria-attributes.html
===================================================================
--- LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-ax-aria-attributes.html (revision 141200)
+++ LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-ax-aria-attributes.html (working copy)
@@ -2,40 +2,45 @@
<html>
<head>
<script src="../../../fast/js/resources/js-test-pre.js"></script>
+<script src="../resources/multiple-fields-ax-aria-attributes.js"></script>
</head>
<body>
-<input id="test" type="date" value="2012-10-09">
+<input id="test" type="date">
<script>
description('This test checks aria-help attribute of fields in multiple fields date 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: Month, AXValueDescription: 10, 1, 12');
+ debug('Initial empty state');
+ checkFocusedElementAXAttributes('AXHelp: Month, AXValueDescription: blank, intValue:0, range:1-12');
eventSender.keyDown('\t');
- shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Day, AXValueDescription: 09, 1, 31');
+ checkFocusedElementAXAttributes('AXHelp: Day, AXValueDescription: blank, intValue:0, range:1-31');
eventSender.keyDown('\t');
- shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Year, AXValueDescription: 2012, 1, 275760');
+ checkFocusedElementAXAttributes('AXHelp: Year, AXValueDescription: blank, intValue:0, range:1-275760');
+ eventSender.keyDown('\t', ['shiftKey']);
+ eventSender.keyDown('\t', ['shiftKey']);
+ debug('Non-empty value');
+ testInput.value = "2012-10-09";
+ checkFocusedElementAXAttributes('AXHelp: Month, AXValueDescription: 10, intValue:10, range:1-12');
+ eventSender.keyDown('\t');
+ checkFocusedElementAXAttributes('AXHelp: Day, AXValueDescription: 09, intValue:9, range:1-31');
+ eventSender.keyDown('\t');
+ checkFocusedElementAXAttributes('AXHelp: Year, AXValueDescription: 2012, intValue:2012, range:1-275760');
+
debug('Empty value');
eventSender.keyDown('\b');
- shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Year, AXValueDescription: blank, 1, 275760');
+ checkFocusedElementAXAttributes('AXHelp: Year, AXValueDescription: blank, intValue:0, range:1-275760');
eventSender.keyDown('\t', ['shiftKey']);
eventSender.keyDown('\b');
- shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Day, AXValueDescription: blank, 1, 31');
+ checkFocusedElementAXAttributes('AXHelp: Day, AXValueDescription: blank, intValue:0, range:1-31');
eventSender.keyDown('\t', ['shiftKey']);
eventSender.keyDown('\b');
- shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Month, AXValueDescription: blank, 1, 12');
+ checkFocusedElementAXAttributes('AXHelp: Month, AXValueDescription: blank, intValue:0, range:1-12');
debug('');
testInput.parentNode.removeChild(testInput);
« no previous file with comments | « no previous file | LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-ax-aria-attributes-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698