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

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

Issue 83413002: Derive the step base for an input element as (now) specified. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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-01" step="9"> 12 <input type=date id=date value="2011-05-02" step="9">
13 <input type=date id="date-bare" step="9">
13 14
14 <script> 15 <script>
15 description('Test if step limits available dates in calendar picker.'); 16 description('Test if step limits available dates in calendar picker.');
16 17
17 openPicker(document.getElementById('date'), test1); 18 document.getElementById('date-bare').value="2011-05-01" ;
yosin_UTC9 2013/11/25 01:26:41 nit: Please use single-quote to avoid mixing singl
sof 2013/11/26 17:59:05 Done.
19 openPicker(document.getElementById('date-bare'), test1);
18 20
19 function test1() { 21 function test1() {
20 debug("Step without min."); 22 debug("Step without value or min attributes.");
21 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');
22 24
23 // Close popup 25 // Close popup
24 eventSender.keyDown('\x1B'); 26 eventSender.keyDown('\x1B');
25 waitUntilClosing(test1AfterClose); 27 waitUntilClosing(test1AfterClose);
26 } 28 }
27 29
28 function test1AfterClose() { 30 function test1AfterClose() {
29 document.getElementById('date').min = "2011-05-01";
30
31 // Reopen popup
32 openPicker(document.getElementById('date'), test2); 31 openPicker(document.getElementById('date'), test2);
33 } 32 }
34 33
35 function test2() { 34 function test2() {
35 debug("Step without min.");
36 shouldBeEqualToString('availableDayCells()', '2011-05-02,2011-05-11,2011-05- 20,2011-05-29');
37
38 // Close popup
39 eventSender.keyDown('\x1B');
40 waitUntilClosing(test2AfterClose);
41 }
42
43 function test2AfterClose() {
44 document.getElementById('date').min = "2011-05-01";
yosin_UTC9 2013/11/25 01:26:41 nit: Please use single-quote to avoid mixing singl
sof 2013/11/26 17:59:05 Done.
45
46 // Reopen popup
47 openPicker(document.getElementById('date'), test3);
48 }
49
50 function test3() {
36 debug("Step when min is set."); 51 debug("Step when min is set.");
37 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');
38 finishJSTest(); 53 finishJSTest();
39 } 54 }
40 </script> 55 </script>
41 </body> 56 </body>
42 </html> 57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698