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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../../js/resources/js-test-pre.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p id="description"></p> 7 <p id="description"></p>
8 <p> 8 <p>
9 Please run this with DumpRenderTree. 9 Please run this with DumpRenderTree.
10 </p> 10 </p>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 keyDown('8'); // -> 09/20/[0098] --:-- -- 51 keyDown('8'); // -> 09/20/[0098] --:-- --
52 keyDown('7'); // -> 09/20/[0987] --:-- -- 52 keyDown('7'); // -> 09/20/[0987] --:-- --
53 keyDown('6'); // -> 09/20/[9876] --:-- -- 53 keyDown('6'); // -> 09/20/[9876] --:-- --
54 keyDown('5'); // -> 09/20/98765 [--]:-- -- 54 keyDown('5'); // -> 09/20/98765 [--]:-- --
55 keyDown('7'); // -> 09/20/98765 07:[--] -- 55 keyDown('7'); // -> 09/20/98765 07:[--] --
56 keyDown('5'); // -> 09/20/98765 07:[05] -- 56 keyDown('5'); // -> 09/20/98765 07:[05] --
57 keyDown('6'); // -> 09/20/98765 07:56 [--] 57 keyDown('6'); // -> 09/20/98765 07:56 [--]
58 keyDown('A'); // -> 09/20/98765 07:56 AM 58 keyDown('A'); // -> 09/20/98765 07:56 AM
59 shouldBeEqualToString('input.value', '98765-09-20T07:56'); 59 shouldBeEqualToString('input.value', '98765-09-20T07:56');
60 60
61 beginTest('Digit keys starting with zero', null, null, '9999-12-31T23:59');
62 keyDown('0'); // -> [00]/dd/yyyy --:-- --
63 keyDown('2'); // -> 02/[dd]/yyyy --:-- --
64 keyDown('0'); // -> 02/[00]/yyyy --:-- --
65 keyDown('3'); // -> 02/03/[yyyy] --:-- --
66 keyDown('0'); // -> 02/03/[0000] --:-- --
67 keyDown('0'); // -> 02/03/[0000] --:-- --
68 keyDown('4'); // -> 02/03/[0044] --:-- --
69 keyDown('4'); // -> 02/03/[0044] --:-- --
70 keyDown('0'); // -> 02/03/0044 [00]:-- --
71 keyDown('5'); // -> 02/03/0044 05:[--] --
72 keyDown('0'); // -> 02/03/0044 01:[01] --
73 keyDown('6'); // -> 02/03/0044 05:06 [--]
74 keyDown('A'); // -> 02/03/0044 05:06 AM
75 shouldBeEqualToString('input.value', '0044-02-03T05:06');
76
77 beginTest('Digit keys and backspace key');
78 keyDown('1'); // -> [01]/dd/yyyy --:-- --
79 keyDown("\b"); // -> [mm]/20/2012 --:-- --
80 keyDown('5'); // -> 05/[dd]/yyyy --:-- --
81 keyDown('6'); // -> 05/06/[yyyy] --:-- --
82 keyDown("\b"); // -> 05/06/[yyyy] --:-- --
83 keyDown('7'); // -> 05/06/[0007] --:-- --
84 keyDown("\b"); // -> 05/06/[yyyy] --:-- --
85 keyDown('8'); // -> 05/06/[0008] --:-- --
86 keyDown('rightArrow'); // -> 05/06/0008 [--]:-- --
87 keyDown('9'); // -> 05/06/0008 09:[--] --
88 keyDown('1'); // -> 05/06/0008 09:[01] --
89 keyDown('0'); // -> 05/06/0008 09:10 [--]
90 keyDown('A'); // -> 05/06/0008 09:10 [AM]
91 shouldBeEqualToString('input.value', '0008-05-06T09:10');
92
61 // FIXME: We should test type ahead time out. When event.leapForward() affects 93 // FIXME: We should test type ahead time out. When event.leapForward() affects
62 // keyboard event time stamp, we can uncomment this fragment. 94 // keyboard event time stamp, we can uncomment this fragment.
63 /* 95 /*
64 beginTest('Digit keys with type ahead timeout', '2012-01-01T00:00'); 96 beginTest('Digit keys with type ahead timeout', '2012-01-01T00:00');
65 keyDown('1'); // -> [01]/01/2012 12:00 AM 97 keyDown('1'); // -> [01]/01/2012 12:00 AM
66 leapForward(1100); 98 leapForward(1100);
67 keyDown('1'); // -> [01]/01/2012 12:00 AM 99 keyDown('1'); // -> [01]/01/2012 12:00 AM
68 keyDown('2'); // -> 12/[01]/2012 12:00 AM 100 keyDown('2'); // -> 12/[01]/2012 12:00 AM
69 keyDown('5'); // -> 12/05/[2012] 12:00 AM 101 keyDown('5'); // -> 12/05/[2012] 12:00 AM
70 keyDown('6'); // -> 12/05/[0006] 12:00 AM 102 keyDown('6'); // -> 12/05/[0006] 12:00 AM
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 shouldBeEqualToString('input.value', '2012-11-08T00:00'); 263 shouldBeEqualToString('input.value', '2012-11-08T00:00');
232 input.readOnly = false; 264 input.readOnly = false;
233 input.focus(); 265 input.focus();
234 keyDown('upArrow'); // [12]/08/2012 12:00 AM 266 keyDown('upArrow'); // [12]/08/2012 12:00 AM
235 shouldBeEqualToString('input.value', '2012-12-08T00:00'); 267 shouldBeEqualToString('input.value', '2012-12-08T00:00');
236 268
237 </script> 269 </script>
238 <script src="../../js/resources/js-test-post.js"></script> 270 <script src="../../js/resources/js-test-post.js"></script>
239 </body> 271 </body>
240 </html> 272 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698