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

Unified Diff: LayoutTests/fast/forms/week-multiple-fields/week-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/week-multiple-fields/week-multiple-fields-keyboard-events.html
===================================================================
--- LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-keyboard-events.html (revision 139034)
+++ LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-keyboard-events.html (working copy)
@@ -52,6 +52,24 @@
keyDown('A'); // Ignored.
shouldBeEqualToString('input.value', '0012-W09');
+beginTest('Digit keys starting with zero');
+keyDown('0'); // -> Week [00], yyyy
+keyDown('2'); // -> Week 02, [yyyy]
+keyDown('0'); // -> Week 02, [0000]
+keyDown('3'); // -> Week 02, [0003]
+keyDown('0'); // -> Week 02, [0030]
+keyDown('0'); // -> Week 02, [0300]
+shouldBeEqualToString('input.value', '0300-W02');
+
+beginTest('Digit keys and backspace key');
+keyDown('0'); // -> Week [00], yyyy
+keyDown('\b'); // -> Week [ww], yyyy
+keyDown('0'); // -> Week [00], yyyy
+keyDown('0'); // -> Week 01, [yyyy]
+keyDown('0'); // -> Week 01, [0000]
+keyDown('6'); // -> Week 05, [0006]
+shouldBeEqualToString('input.value', '0006-W01');
+
// 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