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

Side by Side 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 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 beginTest('Digit keys'); 48 beginTest('Digit keys');
49 keyDown('9'); // -> 09/[dd]/yyyy 49 keyDown('9'); // -> 09/[dd]/yyyy
50 keyDown('2'); // -> 09/[02]/yyyy 50 keyDown('2'); // -> 09/[02]/yyyy
51 keyDown('0'); // -> 09/20/[yyyy] 51 keyDown('0'); // -> 09/20/[yyyy]
52 keyDown('1'); // -> 09/20/[0001] 52 keyDown('1'); // -> 09/20/[0001]
53 keyDown('2'); // -> 09/20/[0012] 53 keyDown('2'); // -> 09/20/[0012]
54 keyDown('A'); // Ignored. 54 keyDown('A'); // Ignored.
55 shouldBeEqualToString('input.value', '0012-09-20'); 55 shouldBeEqualToString('input.value', '0012-09-20');
56 56
57 beginTest('Digit keys starting with zero');
58 keyDown('0'); // -> [00]/dd/yyyy
59 keyDown('2'); // -> 02/[dd]/yyyy
60 keyDown('0'); // -> 02/[00]/yyyy
61 keyDown('3'); // -> 02/03/[yyyy]
62 keyDown('0'); // -> 02/03/[0000]
63 keyDown('0'); // -> 02/03/[0000]
64 keyDown('0'); // -> 02/03/[0000]
65 keyDown('4'); // -> 02/03/[0004]
66 keyDown('4'); // -> 02/03/[0044]
67 shouldBeEqualToString('input.value', '0044-02-03');
68
69 beginTest('Digit keys and backspace key');
70 keyDown('1'); // -> [01]/dd/yyyy
71 keyDown("\b"); // -> [mm]/20/2012
72 keyDown('5'); // -> 05/[dd]/yyyy
73 keyDown('6'); // -> 05/06/[yyyy]
74 keyDown("\b"); // -> 05/06/[yyyy]
75 keyDown('7'); // -> 05/06/[0007]
76 keyDown("\b"); // -> 05/06/[yyyy]
77 keyDown('8'); // -> 05/06/[0008]
78 shouldBeEqualToString('input.value', '0008-05-06');
79
57 // FIXME: We should test type ahead time out. When event.leapForward() affects 80 // FIXME: We should test type ahead time out. When event.leapForward() affects
58 // keyboard event time stamp, we can uncomment this fragment. 81 // keyboard event time stamp, we can uncomment this fragment.
59 /* 82 /*
60 beginTest('Digit keys with type ahead timeout'); 83 beginTest('Digit keys with type ahead timeout');
61 keyDown('1'); // -> [01]/dd/yyyy 84 keyDown('1'); // -> [01]/dd/yyyy
62 leapForward(1100); // -> 01/[dd]/yyyy 85 leapForward(1100); // -> 01/[dd]/yyyy
63 keyDown('1'); // -> 01/[01]/yyyy 86 keyDown('1'); // -> 01/[01]/yyyy
64 keyDown('5'); // -> 01/15/[yyyy] 87 keyDown('5'); // -> 01/15/[yyyy]
65 keyDown('6'); // -> 01/15/[0006] 88 keyDown('6'); // -> 01/15/[0006]
66 shouldBeEqualToString('input.value', '0006-01-15'); 89 shouldBeEqualToString('input.value', '0006-01-15');
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 shouldBeEqualToString('input.value', '2012-11-08'); 242 shouldBeEqualToString('input.value', '2012-11-08');
220 input.readOnly = false; 243 input.readOnly = false;
221 input.focus(); 244 input.focus();
222 keyDown('upArrow'); // [12]/08/2012 245 keyDown('upArrow'); // [12]/08/2012
223 shouldBeEqualToString('input.value', '2012-12-08'); 246 shouldBeEqualToString('input.value', '2012-12-08');
224 247
225 </script> 248 </script>
226 <script src="../../js/resources/js-test-post.js"></script> 249 <script src="../../js/resources/js-test-post.js"></script>
227 </body> 250 </body>
228 </html> 251 </html>
OLDNEW
« 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