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

Unified Diff: LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-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/datetimelocal-multiple-fields/datetimelocal-multiple-fields-keyboard-events.html
===================================================================
--- LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-keyboard-events.html (revision 139034)
+++ LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-keyboard-events.html (working copy)
@@ -58,6 +58,38 @@
keyDown('A'); // -> 09/20/98765 07:56 AM
shouldBeEqualToString('input.value', '98765-09-20T07:56');
+beginTest('Digit keys starting with zero', null, null, '9999-12-31T23:59');
+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('4'); // -> 02/03/[0044] --:-- --
+keyDown('4'); // -> 02/03/[0044] --:-- --
+keyDown('0'); // -> 02/03/0044 [00]:-- --
+keyDown('5'); // -> 02/03/0044 05:[--] --
+keyDown('0'); // -> 02/03/0044 01:[01] --
+keyDown('6'); // -> 02/03/0044 05:06 [--]
+keyDown('A'); // -> 02/03/0044 05:06 AM
+shouldBeEqualToString('input.value', '0044-02-03T05:06');
+
+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] --:-- --
+keyDown('rightArrow'); // -> 05/06/0008 [--]:-- --
+keyDown('9'); // -> 05/06/0008 09:[--] --
+keyDown('1'); // -> 05/06/0008 09:[01] --
+keyDown('0'); // -> 05/06/0008 09:10 [--]
+keyDown('A'); // -> 05/06/0008 09:10 [AM]
+shouldBeEqualToString('input.value', '0008-05-06T09:10');
+
// FIXME: We should test type ahead time out. When event.leapForward() affects
// keyboard event time stamp, we can uncomment this fragment.
/*

Powered by Google App Engine
This is Rietveld 408576698