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. |
/* |