| Index: LayoutTests/fast/forms/calendar-picker/calendar-picker-with-step.html
|
| diff --git a/LayoutTests/fast/forms/calendar-picker/calendar-picker-with-step.html b/LayoutTests/fast/forms/calendar-picker/calendar-picker-with-step.html
|
| index 3cf5913fc0bb427270ef6ae0dfe72525855c4f8c..c3c03aac5ca2b0364f140bc3ea804b05c2629657 100644
|
| --- a/LayoutTests/fast/forms/calendar-picker/calendar-picker-with-step.html
|
| +++ b/LayoutTests/fast/forms/calendar-picker/calendar-picker-with-step.html
|
| @@ -9,15 +9,17 @@
|
| <p id="description"></p>
|
| <div id="console"></div>
|
|
|
| -<input type=date id=date value="2011-05-01" step="9">
|
| +<input type=date id=date value="2011-05-02" step="9">
|
| +<input type=date id="date-bare" step="9">
|
|
|
| <script>
|
| description('Test if step limits available dates in calendar picker.');
|
|
|
| -openPicker(document.getElementById('date'), test1);
|
| +document.getElementById('date-bare').value = '2011-05-01';
|
| +openPicker(document.getElementById('date-bare'), test1);
|
|
|
| function test1() {
|
| - debug("Step without min.");
|
| + debug("Step without value or min attributes.");
|
| shouldBeEqualToString('availableDayCells()', '2011-05-08,2011-05-17,2011-05-26,2011-06-04');
|
|
|
| // Close popup
|
| @@ -26,13 +28,26 @@ function test1() {
|
| }
|
|
|
| function test1AfterClose() {
|
| - document.getElementById('date').min = "2011-05-01";
|
| -
|
| - // Reopen popup
|
| openPicker(document.getElementById('date'), test2);
|
| }
|
|
|
| function test2() {
|
| + debug("Step without min.");
|
| + shouldBeEqualToString('availableDayCells()', '2011-05-02,2011-05-11,2011-05-20,2011-05-29');
|
| +
|
| + // Close popup
|
| + eventSender.keyDown('\x1B');
|
| + waitUntilClosing(test2AfterClose);
|
| +}
|
| +
|
| +function test2AfterClose() {
|
| + document.getElementById('date').min = '2011-05-01';
|
| +
|
| + // Reopen popup
|
| + openPicker(document.getElementById('date'), test3);
|
| +}
|
| +
|
| +function test3() {
|
| debug("Step when min is set.");
|
| shouldBeEqualToString('availableDayCells()', '2011-05-01,2011-05-10,2011-05-19,2011-05-28');
|
| finishJSTest();
|
|
|