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

Side by Side Diff: LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events.html

Issue 11665021: Merge 138365 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 shouldBeEqualToString('input.value', '2012-11-08'); 240 shouldBeEqualToString('input.value', '2012-11-08');
218 input.readOnly = false; 241 input.readOnly = false;
219 input.focus(); 242 input.focus();
220 keyDown('upArrow'); // [12]/08/2012 243 keyDown('upArrow'); // [12]/08/2012
221 shouldBeEqualToString('input.value', '2012-12-08'); 244 shouldBeEqualToString('input.value', '2012-12-08');
222 245
223 </script> 246 </script>
224 <script src="../../js/resources/js-test-post.js"></script> 247 <script src="../../js/resources/js-test-post.js"></script>
225 </body> 248 </body>
226 </html> 249 </html>
OLDNEW
« no previous file with comments | « no previous file | 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