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

Side by Side Diff: LayoutTests/fast/forms/calendar-picker/calendar-picker-with-step.html

Issue 484353004: Test tidying: use "escape" and "backspace" with eventSender.keyDown() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More quoting consistency wibbles Created 6 years, 4 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="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../forms/resources/picker-common.js"></script> 5 <script src="../../forms/resources/picker-common.js"></script>
6 <script src="resources/calendar-picker-common.js"></script> 6 <script src="resources/calendar-picker-common.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <p id="description"></p> 9 <p id="description"></p>
10 <div id="console"></div> 10 <div id="console"></div>
11 11
12 <input type=date id=date value="2011-05-02" step="9"> 12 <input type=date id=date value="2011-05-02" step="9">
13 <input type=date id="date-bare" step="9"> 13 <input type=date id="date-bare" step="9">
14 14
15 <script> 15 <script>
16 description('Test if step limits available dates in calendar picker.'); 16 description('Test if step limits available dates in calendar picker.');
17 17
18 document.getElementById('date-bare').value = '2011-05-01'; 18 document.getElementById('date-bare').value = '2011-05-01';
19 openPicker(document.getElementById('date-bare'), test1); 19 openPicker(document.getElementById('date-bare'), test1);
20 20
21 function test1() { 21 function test1() {
22 debug("Step without value or min attributes."); 22 debug("Step without value or min attributes.");
23 shouldBeEqualToString('availableDayCells()', '2011-05-08,2011-05-17,2011-05- 26,2011-06-04'); 23 shouldBeEqualToString('availableDayCells()', '2011-05-08,2011-05-17,2011-05- 26,2011-06-04');
24 24
25 // Close popup 25 // Close popup
26 eventSender.keyDown('\x1B'); 26 eventSender.keyDown('escape');
27 waitUntilClosing(test1AfterClose); 27 waitUntilClosing(test1AfterClose);
28 } 28 }
29 29
30 function test1AfterClose() { 30 function test1AfterClose() {
31 openPicker(document.getElementById('date'), test2); 31 openPicker(document.getElementById('date'), test2);
32 } 32 }
33 33
34 function test2() { 34 function test2() {
35 debug("Step without min."); 35 debug("Step without min.");
36 shouldBeEqualToString('availableDayCells()', '2011-05-02,2011-05-11,2011-05- 20,2011-05-29'); 36 shouldBeEqualToString('availableDayCells()', '2011-05-02,2011-05-11,2011-05- 20,2011-05-29');
37 37
38 // Close popup 38 // Close popup
39 eventSender.keyDown('\x1B'); 39 eventSender.keyDown('escape');
40 waitUntilClosing(test2AfterClose); 40 waitUntilClosing(test2AfterClose);
41 } 41 }
42 42
43 function test2AfterClose() { 43 function test2AfterClose() {
44 document.getElementById('date').min = '2011-05-01'; 44 document.getElementById('date').min = '2011-05-01';
45 45
46 // Reopen popup 46 // Reopen popup
47 openPicker(document.getElementById('date'), test3); 47 openPicker(document.getElementById('date'), test3);
48 } 48 }
49 49
50 function test3() { 50 function test3() {
51 debug("Step when min is set."); 51 debug("Step when min is set.");
52 shouldBeEqualToString('availableDayCells()', '2011-05-01,2011-05-10,2011-05- 19,2011-05-28'); 52 shouldBeEqualToString('availableDayCells()', '2011-05-01,2011-05-10,2011-05- 19,2011-05-28');
53 finishJSTest(); 53 finishJSTest();
54 } 54 }
55 </script> 55 </script>
56 </body> 56 </body>
57 </html> 57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698