Index: LayoutTests/fast/forms/calendar-picker/calendar-picker-datetimelocal-with-step.html |
diff --git a/LayoutTests/fast/forms/calendar-picker/calendar-picker-datetimelocal-with-step.html b/LayoutTests/fast/forms/calendar-picker/calendar-picker-datetimelocal-with-step.html |
index 2d5b1bdf7c5b7dc30c7d537beb14ff4627948414..61935f3eaba83d7b28c21bb6a2d6d500cddaaffd 100644 |
--- a/LayoutTests/fast/forms/calendar-picker/calendar-picker-datetimelocal-with-step.html |
+++ b/LayoutTests/fast/forms/calendar-picker/calendar-picker-datetimelocal-with-step.html |
@@ -8,14 +8,16 @@ |
<div id="console"></div> |
<input type="datetime-local" id="datetime" value="2012-11-20T00:00" step="302400"/> |
+<input type="datetime-local" id="datetime-bare" step="302400"/> |
<script> |
description('Test if step limits available dates in calendar picker on datetime input.'); |
-openPicker(document.getElementById('datetime'), test1); |
+document.getElementById('datetime-bare').value = '2012-11-20T00:00'; |
+openPicker(document.getElementById('datetime-bare'), test1); |
function test1() { |
- debug("Step without min or max."); |
+ debug("Step without value, min nor max attributes."); |
shouldBeEqualToString('availableDayCells()', '2012-10-28,2012-11-01,2012-11-04,2012-11-08,2012-11-11,2012-11-15,2012-11-18,2012-11-22,2012-11-25,2012-11-29'); |
// Close popup |
@@ -24,15 +26,12 @@ function test1() { |
} |
function test1AfterClose() { |
- document.getElementById('datetime').min = "2012-11-16T12:00"; |
- |
- // Reopen popup |
openPicker(document.getElementById('datetime'), test2); |
} |
function test2() { |
- debug("Step when min is set."); |
- shouldBeEqualToString('availableDayCells()', '2012-11-16,2012-11-20,2012-11-23,2012-11-27,2012-11-30'); |
+ debug("Step without min or max."); |
+ shouldBeEqualToString('availableDayCells()', '2012-10-30,2012-11-02,2012-11-06,2012-11-09,2012-11-13,2012-11-16,2012-11-20,2012-11-23,2012-11-27,2012-11-30'); |
// Close popup |
eventSender.keyDown('\x1B'); |
@@ -40,13 +39,29 @@ function test2() { |
} |
function test2AfterClose() { |
- document.getElementById('datetime').max = "2012-11-20T00:00"; |
- |
+ document.getElementById('datetime').min = '2012-11-16T12:00'; |
+ |
// Reopen popup |
openPicker(document.getElementById('datetime'), test3); |
} |
function test3() { |
+ debug("Step when min is set."); |
+ shouldBeEqualToString('availableDayCells()', '2012-11-16,2012-11-20,2012-11-23,2012-11-27,2012-11-30'); |
+ |
+ // Close popup |
+ eventSender.keyDown('\x1B'); |
+ waitUntilClosing(test3AfterClose); |
+} |
+ |
+function test3AfterClose() { |
+ document.getElementById('datetime').max = '2012-11-20T00:00'; |
+ |
+ // Reopen popup |
+ openPicker(document.getElementById('datetime'), test4); |
+} |
+ |
+function test4() { |
debug("Step when min and max are set."); |
shouldBeEqualToString('availableDayCells()', '2012-11-16,2012-11-20'); |
finishJSTest(); |