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

Unified Diff: LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events.html

Issue 11801035: Merge 138365 (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
Index: LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events.html
===================================================================
--- LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events.html (revision 139034)
+++ LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events.html (working copy)
@@ -54,6 +54,29 @@
keyDown('A'); // Ignored.
shouldBeEqualToString('input.value', '0012-09-20');
+beginTest('Digit keys starting with zero');
+keyDown('0'); // -> [00]/dd/yyyy
+keyDown('2'); // -> 02/[dd]/yyyy
+keyDown('0'); // -> 02/[00]/yyyy
+keyDown('3'); // -> 02/03/[yyyy]
+keyDown('0'); // -> 02/03/[0000]
+keyDown('0'); // -> 02/03/[0000]
+keyDown('0'); // -> 02/03/[0000]
+keyDown('4'); // -> 02/03/[0004]
+keyDown('4'); // -> 02/03/[0044]
+shouldBeEqualToString('input.value', '0044-02-03');
+
+beginTest('Digit keys and backspace key');
+keyDown('1'); // -> [01]/dd/yyyy
+keyDown("\b"); // -> [mm]/20/2012
+keyDown('5'); // -> 05/[dd]/yyyy
+keyDown('6'); // -> 05/06/[yyyy]
+keyDown("\b"); // -> 05/06/[yyyy]
+keyDown('7'); // -> 05/06/[0007]
+keyDown("\b"); // -> 05/06/[yyyy]
+keyDown('8'); // -> 05/06/[0008]
+shouldBeEqualToString('input.value', '0008-05-06');
+
// FIXME: We should test type ahead time out. When event.leapForward() affects
// keyboard event time stamp, we can uncomment this fragment.
/*
« no previous file with comments | « LayoutTests/ChangeLog ('k') | LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698