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

Side by Side 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 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // We assume the date format is Week ww, yyyy. 46 // We assume the date format is Week ww, yyyy.
47 47
48 beginTest('Digit keys'); 48 beginTest('Digit keys');
49 keyDown('9'); // -> Week 09, yyyy 49 keyDown('9'); // -> Week 09, yyyy
50 keyDown('1'); // -> Week 09, [0001] 50 keyDown('1'); // -> Week 09, [0001]
51 keyDown('2'); // -> Week 09, [0012] 51 keyDown('2'); // -> Week 09, [0012]
52 keyDown('A'); // Ignored. 52 keyDown('A'); // Ignored.
53 shouldBeEqualToString('input.value', '0012-W09'); 53 shouldBeEqualToString('input.value', '0012-W09');
54 54
55 beginTest('Digit keys starting with zero');
56 keyDown('0'); // -> Week [00], yyyy
57 keyDown('2'); // -> Week 02, [yyyy]
58 keyDown('0'); // -> Week 02, [0000]
59 keyDown('3'); // -> Week 02, [0003]
60 keyDown('0'); // -> Week 02, [0030]
61 keyDown('0'); // -> Week 02, [0300]
62 shouldBeEqualToString('input.value', '0300-W02');
63
64 beginTest('Digit keys and backspace key');
65 keyDown('0'); // -> Week [00], yyyy
66 keyDown('\b'); // -> Week [ww], yyyy
67 keyDown('0'); // -> Week [00], yyyy
68 keyDown('0'); // -> Week 01, [yyyy]
69 keyDown('0'); // -> Week 01, [0000]
70 keyDown('6'); // -> Week 05, [0006]
71 shouldBeEqualToString('input.value', '0006-W01');
72
55 // FIXME: We should test type ahead time out. When event.leapForward() affects 73 // FIXME: We should test type ahead time out. When event.leapForward() affects
56 // keyboard event time stamp, we can uncomment this fragment. 74 // keyboard event time stamp, we can uncomment this fragment.
57 /* 75 /*
58 beginTest('Digit keys with type ahead timeout'); 76 beginTest('Digit keys with type ahead timeout');
59 keyDown('1'); // -> Week [01], yyyy 77 keyDown('1'); // -> Week [01], yyyy
60 eventSender.leapForward(1100); // -> Week 01, [yyyy] 78 eventSender.leapForward(1100); // -> Week 01, [yyyy]
61 keyDown('1'); // -> Week 01, [0001] 79 keyDown('1'); // -> Week 01, [0001]
62 keyDown('5'); // -> Week 01, [0015] 80 keyDown('5'); // -> Week 01, [0015]
63 keyDown('6'); // -> Week 01, [0156] 81 keyDown('6'); // -> Week 01, [0156]
64 shouldBeEqualToString('input.value', '0156-W01'); 82 shouldBeEqualToString('input.value', '0156-W01');
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 shouldBeEqualToString('input.value', '2012-W11'); 201 shouldBeEqualToString('input.value', '2012-W11');
184 input.readOnly = false; 202 input.readOnly = false;
185 input.focus(); 203 input.focus();
186 keyDown('upArrow'); // Week [12], 2012 204 keyDown('upArrow'); // Week [12], 2012
187 shouldBeEqualToString('input.value', '2012-W12'); 205 shouldBeEqualToString('input.value', '2012-W12');
188 206
189 </script> 207 </script>
190 <script src="../../js/resources/js-test-post.js"></script> 208 <script src="../../js/resources/js-test-post.js"></script>
191 </body> 209 </body>
192 </html> 210 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698