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

Unified Diff: LayoutTests/fast/forms/calendar-picker/calendar-picker-datetimelocal-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 side-by-side diff with in-line comments
Download patch
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..bae3ac42238e28da30bb17a0b66362d09ebaad8f 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";
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.
+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";
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.
+
+ // 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();

Powered by Google App Engine
This is Rietveld 408576698