Move <input type=time> tests to fast/forms/time/
https://bugs.webkit.org/show_bug.cgi?id=65955
Reviewed by Hajime Morita.
* fast/forms/ValidityState-rangeOverflow-expected.txt: Removed 'time' part.
* fast/forms/ValidityState-rangeUnderflow-expected.txt: ditto.
* fast/forms/ValidityState-stepMismatch-expected.txt: ditto.
* fast/forms/ValidityState-typeMismatch-time-expected.txt: Removed.
* fast/forms/ValidityState-typeMismatch-time.html: Removed.
* fast/forms/input-stepup-stepdown-expected.txt: Removed 'time' part.
* fast/forms/input-stepup-stepdown-from-renderer-expected.txt: ditto.
* fast/forms/input-type-change3-expected.txt: ditto.
* fast/forms/input-valueasdate-time-expected.txt: Removed.
* fast/forms/input-valueasdate-time.html: Removed.
* fast/forms/input-valueasnumber-time-expected.txt: Removed.
* fast/forms/input-valueasnumber-time.html: Removed.
* fast/forms/script-tests/ValidityState-rangeOverflow.js: Removed 'time' part.
* fast/forms/script-tests/ValidityState-rangeUnderflow.js: ditto.
* fast/forms/script-tests/ValidityState-stepMismatch.js: ditto.
* fast/forms/script-tests/ValidityState-typeMismatch-time.js: Removed.
* fast/forms/script-tests/input-stepup-stepdown-from-renderer.js: Removed 'time' part.
* fast/forms/script-tests/input-stepup-stepdown.js: ditto.
* fast/forms/script-tests/input-type-change3.js: ditto.
* fast/forms/script-tests/input-valueasdate-time.js: Removed.
* fast/forms/script-tests/input-valueasnumber-time.js: Removed.
* fast/forms/time: Added.
* fast/forms/time/ValidityState-rangeOverflow-time-expected.txt: Copied from LayoutTests/fast/forms/ValidityState-rangeOverflow-expected.txt.
* fast/forms/time/ValidityState-rangeOverflow-time.html: Copied from LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow.js.
* fast/forms/time/ValidityState-rangeUnderflow-time-expected.txt: Copied from LayoutTests/fast/forms/ValidityState-rangeUnderflow-expected.txt.
* fast/forms/time/ValidityState-rangeUnderflow-time.html: Copied from LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow.js.
* fast/forms/time/ValidityState-stepMismatch-time-expected.txt: Copied from LayoutTests/fast/forms/ValidityState-stepMismatch-expected.txt.
* fast/forms/time/ValidityState-stepMismatch-time.html: Copied from LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch.js.
* fast/forms/time/ValidityState-typeMismatch-time-expected.txt: Copied from LayoutTests/fast/forms/ValidityState-typeMismatch-time-expected.txt.
* fast/forms/time/ValidityState-typeMismatch-time.html: Copied from LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-time.js.
* fast/forms/time/input-valueasdate-time-expected.txt: Copied from LayoutTests/fast/forms/input-valueasdate-time-expected.txt.
* fast/forms/time/input-valueasdate-time.html: Copied from LayoutTests/fast/forms/script-tests/input-valueasdate-time.js.
* fast/forms/time/input-valueasnumber-time-expected.txt: Copied from LayoutTests/fast/forms/input-valueasnumber-time-expected.txt.
* fast/forms/time/input-valueasnumber-time.html: Copied from LayoutTests/fast/forms/script-tests/input-valueasnumber-time.js.
* fast/forms/time/time-input-type-expected.txt: Copied from LayoutTests/fast/forms/week/week-input-type-expected.txt.
* fast/forms/time/time-input-type.html: Copied from LayoutTests/fast/forms/week/week-input-type.html.
* fast/forms/time/time-input-visible-string-expected.txt: Copied from LayoutTests/fast/forms/week/week-input-visible-string-expected.txt.
* fast/forms/time/time-input-visible-string.html: Copied from LayoutTests/fast/forms/week/week-input-visible-string.html.
* fast/forms/time/time-stepup-stepdown-expected.txt: Copied from LayoutTests/fast/forms/input-stepup-stepdown-expected.txt.
* fast/forms/time/time-stepup-stepdown-from-renderer-expected.txt: Copied from LayoutTests/fast/forms/input-stepup-stepdown-from-renderer-expected.txt.
* fast/forms/time/time-stepup-stepdown-from-renderer.html: Copied from LayoutTests/fast/forms/script-tests/input-stepup-stepdown-from-renderer.js.
* fast/forms/time/time-stepup-stepdown.html: Copied from LayoutTests/fast/forms/script-tests/input-stepup-stepdown.js.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@92746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index db60f06..fb0857a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,53 @@
+2011-08-09 Kent Tamura <tkent@chromium.org>
+
+ Move <input type=time> tests to fast/forms/time/
+ https://bugs.webkit.org/show_bug.cgi?id=65955
+
+ Reviewed by Hajime Morita.
+
+ * fast/forms/ValidityState-rangeOverflow-expected.txt: Removed 'time' part.
+ * fast/forms/ValidityState-rangeUnderflow-expected.txt: ditto.
+ * fast/forms/ValidityState-stepMismatch-expected.txt: ditto.
+ * fast/forms/ValidityState-typeMismatch-time-expected.txt: Removed.
+ * fast/forms/ValidityState-typeMismatch-time.html: Removed.
+ * fast/forms/input-stepup-stepdown-expected.txt: Removed 'time' part.
+ * fast/forms/input-stepup-stepdown-from-renderer-expected.txt: ditto.
+ * fast/forms/input-type-change3-expected.txt: ditto.
+ * fast/forms/input-valueasdate-time-expected.txt: Removed.
+ * fast/forms/input-valueasdate-time.html: Removed.
+ * fast/forms/input-valueasnumber-time-expected.txt: Removed.
+ * fast/forms/input-valueasnumber-time.html: Removed.
+ * fast/forms/script-tests/ValidityState-rangeOverflow.js: Removed 'time' part.
+ * fast/forms/script-tests/ValidityState-rangeUnderflow.js: ditto.
+ * fast/forms/script-tests/ValidityState-stepMismatch.js: ditto.
+ * fast/forms/script-tests/ValidityState-typeMismatch-time.js: Removed.
+ * fast/forms/script-tests/input-stepup-stepdown-from-renderer.js: Removed 'time' part.
+ * fast/forms/script-tests/input-stepup-stepdown.js: ditto.
+ * fast/forms/script-tests/input-type-change3.js: ditto.
+ * fast/forms/script-tests/input-valueasdate-time.js: Removed.
+ * fast/forms/script-tests/input-valueasnumber-time.js: Removed.
+ * fast/forms/time: Added.
+ * fast/forms/time/ValidityState-rangeOverflow-time-expected.txt: Copied from LayoutTests/fast/forms/ValidityState-rangeOverflow-expected.txt.
+ * fast/forms/time/ValidityState-rangeOverflow-time.html: Copied from LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow.js.
+ * fast/forms/time/ValidityState-rangeUnderflow-time-expected.txt: Copied from LayoutTests/fast/forms/ValidityState-rangeUnderflow-expected.txt.
+ * fast/forms/time/ValidityState-rangeUnderflow-time.html: Copied from LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow.js.
+ * fast/forms/time/ValidityState-stepMismatch-time-expected.txt: Copied from LayoutTests/fast/forms/ValidityState-stepMismatch-expected.txt.
+ * fast/forms/time/ValidityState-stepMismatch-time.html: Copied from LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch.js.
+ * fast/forms/time/ValidityState-typeMismatch-time-expected.txt: Copied from LayoutTests/fast/forms/ValidityState-typeMismatch-time-expected.txt.
+ * fast/forms/time/ValidityState-typeMismatch-time.html: Copied from LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-time.js.
+ * fast/forms/time/input-valueasdate-time-expected.txt: Copied from LayoutTests/fast/forms/input-valueasdate-time-expected.txt.
+ * fast/forms/time/input-valueasdate-time.html: Copied from LayoutTests/fast/forms/script-tests/input-valueasdate-time.js.
+ * fast/forms/time/input-valueasnumber-time-expected.txt: Copied from LayoutTests/fast/forms/input-valueasnumber-time-expected.txt.
+ * fast/forms/time/input-valueasnumber-time.html: Copied from LayoutTests/fast/forms/script-tests/input-valueasnumber-time.js.
+ * fast/forms/time/time-input-type-expected.txt: Copied from LayoutTests/fast/forms/week/week-input-type-expected.txt.
+ * fast/forms/time/time-input-type.html: Copied from LayoutTests/fast/forms/week/week-input-type.html.
+ * fast/forms/time/time-input-visible-string-expected.txt: Copied from LayoutTests/fast/forms/week/week-input-visible-string-expected.txt.
+ * fast/forms/time/time-input-visible-string.html: Copied from LayoutTests/fast/forms/week/week-input-visible-string.html.
+ * fast/forms/time/time-stepup-stepdown-expected.txt: Copied from LayoutTests/fast/forms/input-stepup-stepdown-expected.txt.
+ * fast/forms/time/time-stepup-stepdown-from-renderer-expected.txt: Copied from LayoutTests/fast/forms/input-stepup-stepdown-from-renderer-expected.txt.
+ * fast/forms/time/time-stepup-stepdown-from-renderer.html: Copied from LayoutTests/fast/forms/script-tests/input-stepup-stepdown-from-renderer.js.
+ * fast/forms/time/time-stepup-stepdown.html: Copied from LayoutTests/fast/forms/script-tests/input-stepup-stepdown.js.
+
2011-08-09 Abhishek Arya <inferno@chromium.org>
Fix functional bug where style change was not getting propogated to before, after
diff --git a/LayoutTests/fast/forms/ValidityState-rangeOverflow-expected.txt b/LayoutTests/fast/forms/ValidityState-rangeOverflow-expected.txt
index 2a165a8..9c37b1d 100644
--- a/LayoutTests/fast/forms/ValidityState-rangeOverflow-expected.txt
+++ b/LayoutTests/fast/forms/ValidityState-rangeOverflow-expected.txt
@@ -63,19 +63,6 @@
PASS The value "101" overflows the maximum value "1E+2".
PASS The value "101" overflows the maximum value "100".
PASS The value "101" doesn't overflow the maximum value "1E+2" when disabled.
-
-Type=time
-PASS The value "13:16" doesn't overflow the maximum value "".
-PASS The value "13:16" doesn't overflow the maximum value "".
-PASS The value "13:16" doesn't overflow the maximum value "foo".
-PASS The value "13:16" doesn't overflow the maximum value "13:16".
-PASS The value "13:16" doesn't overflow the maximum value "13:17".
-PASS The value "13:16" doesn't overflow the maximum value "14:15".
-PASS The value "foo" doesn't overflow the maximum value "13:16".
-PASS The value "13:16" overflows the maximum value "13:15".
-PASS The value "23:59:59.999" overflows the maximum value "13:16".
-PASS The value "13:16" overflows the maximum value "12:00".
-PASS The value "23:59:59.999" doesn't overflow the maximum value "13:16" when disabled.
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/forms/ValidityState-rangeUnderflow-expected.txt b/LayoutTests/fast/forms/ValidityState-rangeUnderflow-expected.txt
index ef8a849..34e5a90 100644
--- a/LayoutTests/fast/forms/ValidityState-rangeUnderflow-expected.txt
+++ b/LayoutTests/fast/forms/ValidityState-rangeUnderflow-expected.txt
@@ -63,20 +63,6 @@
PASS The value "99" undeflows the minimum value "1E+2".
PASS The value "101" undeflows the minimum value "200".
PASS The value "99" doesn't underflow the minimum value "1E+2" when disabled.
-
-Type=time
-PASS The value "13:16" doesn't underflow the minimum value "".
-PASS The value "13:16" doesn't underflow the minimum value "".
-PASS The value "13:16" doesn't underflow the minimum value "foo".
-PASS The value "00:00:00.000" doesn't underflow the minimum value "".
-PASS The value "23:59:59.999" doesn't underflow the minimum value "".
-PASS The value "13:16" doesn't underflow the minimum value "11:00".
-PASS The value "13:16" doesn't underflow the minimum value "13:16".
-PASS The value "foo" doesn't underflow the minimum value "11:00".
-PASS The value "13:16" undeflows the minimum value "13:17".
-PASS The value "23:59" undeflows the minimum value "23:59:30".
-PASS The value "13:16" undeflows the minimum value "14:00".
-PASS The value "23:59" doesn't underflow the minimum value "23:59:30" when disabled.
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/forms/ValidityState-stepMismatch-expected.txt b/LayoutTests/fast/forms/ValidityState-stepMismatch-expected.txt
index 12c9c26..8b43238 100644
--- a/LayoutTests/fast/forms/ValidityState-stepMismatch-expected.txt
+++ b/LayoutTests/fast/forms/ValidityState-stepMismatch-expected.txt
@@ -1,4 +1,4 @@
-Check stepMismatch results for type=date, datetime, datetime-local, time.
+Check stepMismatch results for type=date, datetime, datetime-local.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -154,36 +154,6 @@
Disabled
PASS stepMismatchFor("1", "2", "0", true) is false
-Time type
-Empty values
-PASS stepMismatchFor("", null, null) is false
-PASS stepMismatchFor("", "2", "12:34:56") is false
-Normal step values
-PASS stepMismatchFor("12:34:55", "1", "12:34:56") is false
-PASS stepMismatchFor("12:34:55.001", "1", "12:34:56") is true
-PASS stepMismatchFor("12:34:56.001", "0.001", "12:34:56") is false
-PASS stepMismatchFor("12:34:55", "0.333", "12:34:56") is true
-PASS stepMismatchFor("12:34:55.001", "0.333", "12:34:56") is false
-PASS stepMismatchFor("12:34", "86400", "12:34") is false
-PASS stepMismatchFor("23:59:59.998", "86399.999", "00:00") is true
-PASS stepMismatchFor("23:59:59.999", "86399.999", "00:00") is false
-Implicit step base
-PASS stepMismatchFor("12:34", "120", null) is false
-PASS stepMismatchFor("12:35", "120", null) is true
-Small step values
-PASS stepMismatchFor("12:34:55.001", "0.0003", "12:34.55.000") is false
-PASS stepMismatchFor("12:34:55.001", "0.0019", "12:34.55.000") is true
-PASS stepMismatchFor("12:34:55.004", "0.0019", "12:34.55.000") is false
-Invalid or no step values
-PASS stepMismatchFor("12:34", null, "12:34") is false
-PASS stepMismatchFor("12:34:56", null, "12:34") is true
-PASS stepMismatchFor("12:34", "-1", "12:34") is false
-PASS stepMismatchFor("12:34", "foo", "12:34") is false
-Special step value
-PASS stepMismatchFor("12:35", "any", "12:34") is false
-Disabled
-PASS stepMismatchFor("12:34:55.001", "1", "12:34:56", true) is false
-
Unsupported types
PASS input.type = "text"; input.step = "3"; input.min = ""; input.value = "2"; input.validity.stepMismatch is false
PASS input.type = "button"; input.validity.stepMismatch is false
diff --git a/LayoutTests/fast/forms/ValidityState-typeMismatch-time.html b/LayoutTests/fast/forms/ValidityState-typeMismatch-time.html
deleted file mode 100644
index 764129a..0000000
--- a/LayoutTests/fast/forms/ValidityState-typeMismatch-time.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/ValidityState-typeMismatch-time.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/input-stepup-stepdown-expected.txt b/LayoutTests/fast/forms/input-stepup-stepdown-expected.txt
index 93f8c89..89cdfbb 100644
--- a/LayoutTests/fast/forms/input-stepup-stepdown-expected.txt
+++ b/LayoutTests/fast/forms/input-stepup-stepdown-expected.txt
@@ -1,4 +1,4 @@
-Check stepUp() and stepDown() bahevior for type=date, datetime, datetime-local, time.
+Check stepUp() and stepDown() bahevior for type=date, datetime, datetime-local.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -219,35 +219,6 @@
PASS stepDownExplicitBounds(null, null, 0.1, 1, 8) is "0.2"
PASS stepDownExplicitBounds(null, null, 0.1, 1) is "0.9"
-Time type
-Invalid value
-PASS stepUp("", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS stepDown("", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-Non-number arguments
-PASS stepUp("20:13", null, null, "0") is "20:13"
-PASS stepDown("20:13", null, null, "0") is "20:13"
-PASS stepUp("20:13", null, null, "foo") is "20:13"
-PASS stepDown("20:13", null, null, "foo") is "20:13"
-PASS stepUp("20:13", null, null, null) is "20:13"
-PASS stepDown("20:13", null, null, null) is "20:13"
-Normal cases
-PASS stepUp("20:13", null, null) is "20:14"
-PASS stepDown("20:13", null, null) is "20:12"
-PASS stepUp("20:13", null, null, 10) is "20:23"
-PASS stepDown("20:13", null, null, 11) is "20:02"
-PASS stepUp("20:13", "4", null, 2) is "20:13:08"
-PASS stepDown("20:13", "4", null, 3) is "20:12:48"
-Step=any
-PASS stepUp("20:13", "any", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS stepDown("20:13", "any", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-Overflow/underflow
-PASS stepUp("20:13", "3.40282346e+38", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS stepDown("20:13", "3.40282346e+38", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS stepUp("20:13", "1", "20:13") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS stepDown("20:13", "1", "20:13") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS stepUp("23:59", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS stepDown("00:00", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-
Unsupported type
PASS input.step = "3"; input.min = ""; input.max = ""; input.value = "2"; input.stepDown() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
PASS input.stepDown(0) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
diff --git a/LayoutTests/fast/forms/input-stepup-stepdown-from-renderer-expected.txt b/LayoutTests/fast/forms/input-stepup-stepdown-from-renderer-expected.txt
index a307f17..8b1e24a 100644
--- a/LayoutTests/fast/forms/input-stepup-stepdown-from-renderer-expected.txt
+++ b/LayoutTests/fast/forms/input-stepup-stepdown-from-renderer-expected.txt
@@ -1,4 +1,4 @@
-Check stepping-up and -down for from renderer. No cases of empty initial values for type=date, datetime, datetime-local, time.
+Check stepping-up and -down for from renderer. No cases of empty initial values for type=date, datetime, datetime-local.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -205,29 +205,6 @@
PASS stepDownExplicitBounds(null, null, 0.1, 1, 8) is "0.2"
PASS stepDownExplicitBounds(null, null, 0.1, 1) is "0.9"
-Time type
-Function arguments are (value, step, {min or max}, [stepCount]).
-Normal cases
-PASS stepUp("20:13", null, null) is "20:14"
-PASS stepDown("20:13", null, null) is "20:12"
-PASS stepUp("20:13", null, null, 10) is "20:23"
-PASS stepDown("20:13", null, null, 11) is "20:02"
-PASS stepUp("20:13", "4", null, 2) is "20:13:08"
-PASS stepDown("20:13", "4", null, 3) is "20:12:48"
-Step=any
-PASS stepUp("20:13", "any", null) is "20:14"
-PASS stepDown("20:13", "any", null) is "20:12"
-Overflow/underflow
-PASS stepUp("20:13", "3.40282346e+38", null) is "23:59:59.999"
-PASS stepDown("20:13", "3.40282346e+38", null) is "00:00:00.000"
-PASS stepUp("20:13", "1", "20:13") is "20:13"
-PASS stepDown("20:13", "1", "20:13") is "20:13"
-PASS stepUp("23:59", null, null) is "23:59"
-PASS stepDown("00:00", null, null) is "00:00"
-stepDown()/stepUp() for stepMismatch values
-PASS stepDown("20:13", "3", "20:12:56") is "20:12:59"
-PASS stepUp("00:13", "7", "") is "00:13:04"
-
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/forms/input-type-change3-expected.txt b/LayoutTests/fast/forms/input-type-change3-expected.txt
index 1e903c0..1a85155 100644
--- a/LayoutTests/fast/forms/input-type-change3-expected.txt
+++ b/LayoutTests/fast/forms/input-type-change3-expected.txt
@@ -34,7 +34,6 @@
PASS input.type for "submit" is correctly "submit".
PASS input.type for "tel" is correctly "tel".
PASS input.type for "telephone" is correctly "text".
-PASS input.type for "time" is correctly "time".
PASS input.type for "url" is correctly "url".
PASS input.type for "uri" is correctly "text".
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/forms/input-valueasdate-time.html b/LayoutTests/fast/forms/input-valueasdate-time.html
deleted file mode 100644
index dbeda1a..0000000
--- a/LayoutTests/fast/forms/input-valueasdate-time.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/input-valueasdate-time.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/input-valueasnumber-time.html b/LayoutTests/fast/forms/input-valueasnumber-time.html
deleted file mode 100644
index 2476381..0000000
--- a/LayoutTests/fast/forms/input-valueasnumber-time.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/input-valueasnumber-time.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow.js b/LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow.js
index b1217fc..84d8ea2 100644
--- a/LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow.js
+++ b/LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow.js
@@ -135,27 +135,4 @@
// Disabled
checkNotOverflow('101', '1E+2', true);
-// ----------------------------------------------------------------
-debug('');
-debug('Type=time');
-input.type = 'time';
-input.min = '';
-// No overflow cases
-checkNotOverflow('13:16', null);
-checkNotOverflow('13:16', '');
-checkNotOverflow('13:16', 'foo');
-checkNotOverflow('13:16', '13:16');
-checkNotOverflow('13:16', '13:17');
-checkNotOverflow('13:16', '14:15');
-checkNotOverflow('foo', '13:16');
-
-// Overflow cases
-checkOverflow('13:16', '13:15');
-checkOverflow('23:59:59.999', '13:16');
-input.min = '14:00'; // value < min && value > max
-checkOverflow('13:16', '12:00');
-
-// Disabled
-checkNotOverflow('23:59:59.999', '13:16', true);
-
var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow.js b/LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow.js
index 6200134..ba97f50 100644
--- a/LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow.js
+++ b/LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow.js
@@ -143,28 +143,4 @@
// Disabled
checkNotUnderflow('99', '1E+2', true);
-// ----------------------------------------------------------------
-debug('');
-debug('Type=time');
-input.type = 'time';
-input.max = '';
-// No underflow cases
-checkNotUnderflow('13:16', null);
-checkNotUnderflow('13:16', '');
-checkNotUnderflow('13:16', 'foo');
-checkNotUnderflow('00:00:00.000', '');
-checkNotUnderflow('23:59:59.999', '');
-checkNotUnderflow('13:16', '11:00');
-checkNotUnderflow('13:16', '13:16');
-checkNotUnderflow('foo', '11:00');
-
-// Underflow cases
-checkUnderflow('13:16', '13:17');
-checkUnderflow('23:59', '23:59:30');
-input.max = '11:00'; // value < min && value > max
-checkUnderflow('13:16', '14:00');
-
-// Disabled
-checkNotUnderflow('23:59', '23:59:30', true);
-
var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch.js b/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch.js
index 481c901..c7bf6b7 100644
--- a/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch.js
+++ b/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch.js
@@ -1,4 +1,4 @@
-description('Check stepMismatch results for type=date, datetime, datetime-local, time.');
+description('Check stepMismatch results for type=date, datetime, datetime-local.');
var input = document.createElement('input');
document.body.appendChild(input);
@@ -176,38 +176,6 @@
shouldBe('stepMismatchFor("1", "2", "0", true)', 'false');
debug('');
-debug('Time type');
-input.type = 'time';
-debug('Empty values');
-shouldBeFalse('stepMismatchFor("", null, null)');
-shouldBeFalse('stepMismatchFor("", "2", "12:34:56")');
-debug('Normal step values');
-shouldBeFalse('stepMismatchFor("12:34:55", "1", "12:34:56")');
-shouldBeTrue('stepMismatchFor("12:34:55.001", "1", "12:34:56")');
-shouldBeFalse('stepMismatchFor("12:34:56.001", "0.001", "12:34:56")');
-shouldBeTrue('stepMismatchFor("12:34:55", "0.333", "12:34:56")');
-shouldBeFalse('stepMismatchFor("12:34:55.001", "0.333", "12:34:56")');
-shouldBeFalse('stepMismatchFor("12:34", "86400", "12:34")');
-shouldBeTrue('stepMismatchFor("23:59:59.998", "86399.999", "00:00")');
-shouldBeFalse('stepMismatchFor("23:59:59.999", "86399.999", "00:00")');
-debug('Implicit step base');
-shouldBeFalse('stepMismatchFor("12:34", "120", null)');
-shouldBeTrue('stepMismatchFor("12:35", "120", null)');
-debug('Small step values');
-shouldBeFalse('stepMismatchFor("12:34:55.001", "0.0003", "12:34.55.000")');
-shouldBeTrue('stepMismatchFor("12:34:55.001", "0.0019", "12:34.55.000")');
-shouldBeFalse('stepMismatchFor("12:34:55.004", "0.0019", "12:34.55.000")');
-debug('Invalid or no step values');
-shouldBeFalse('stepMismatchFor("12:34", null, "12:34")');
-shouldBeTrue('stepMismatchFor("12:34:56", null, "12:34")');
-shouldBeFalse('stepMismatchFor("12:34", "-1", "12:34")');
-shouldBeFalse('stepMismatchFor("12:34", "foo", "12:34")');
-debug('Special step value');
-shouldBeFalse('stepMismatchFor("12:35", "any", "12:34")');
-debug('Disabled');
-shouldBeFalse('stepMismatchFor("12:34:55.001", "1", "12:34:56", true)');
-
-debug('');
debug('Unsupported types');
shouldBe('input.type = "text"; input.step = "3"; input.min = ""; input.value = "2"; input.validity.stepMismatch', 'false');
shouldBe('input.type = "button"; input.validity.stepMismatch', 'false');
diff --git a/LayoutTests/fast/forms/script-tests/input-stepup-stepdown-from-renderer.js b/LayoutTests/fast/forms/script-tests/input-stepup-stepdown-from-renderer.js
index 8a172ce..e5d1161 100644
--- a/LayoutTests/fast/forms/script-tests/input-stepup-stepdown-from-renderer.js
+++ b/LayoutTests/fast/forms/script-tests/input-stepup-stepdown-from-renderer.js
@@ -1,4 +1,4 @@
-description('Check stepping-up and -down for <input> from renderer. No cases of empty initial values for type=date, datetime, datetime-local, time.');
+description('Check stepping-up and -down for <input> from renderer. No cases of empty initial values for type=date, datetime, datetime-local.');
var input = document.createElement('input');
var invalidStateErr = '"Error: INVALID_STATE_ERR: DOM Exception 11"';
@@ -289,29 +289,4 @@
shouldBe('stepDownExplicitBounds(null, null, 0.1, 1)', '"0.9"');
debug('');
-debug('Time type');
-input.type = 'time';
-debug('Function arguments are (value, step, {min or max}, [stepCount]).');
-debug('Normal cases');
-shouldBe('stepUp("20:13", null, null)', '"20:14"');
-shouldBe('stepDown("20:13", null, null)', '"20:12"');
-shouldBe('stepUp("20:13", null, null, 10)', '"20:23"');
-shouldBe('stepDown("20:13", null, null, 11)', '"20:02"');
-shouldBe('stepUp("20:13", "4", null, 2)', '"20:13:08"');
-shouldBe('stepDown("20:13", "4", null, 3)', '"20:12:48"');
-debug('Step=any');
-shouldBe('stepUp("20:13", "any", null)', '"20:14"');
-shouldBe('stepDown("20:13", "any", null)', '"20:12"');
-debug('Overflow/underflow');
-shouldBe('stepUp("20:13", "3.40282346e+38", null)', '"23:59:59.999"');
-shouldBe('stepDown("20:13", "3.40282346e+38", null)', '"00:00:00.000"');
-shouldBe('stepUp("20:13", "1", "20:13")', '"20:13"');
-shouldBe('stepDown("20:13", "1", "20:13")', '"20:13"');
-shouldBe('stepUp("23:59", null, null)', '"23:59"');
-shouldBe('stepDown("00:00", null, null)', '"00:00"');
-debug('stepDown()/stepUp() for stepMismatch values');
-shouldBe('stepDown("20:13", "3", "20:12:56")', '"20:12:59"');
-shouldBe('stepUp("00:13", "7", "")', '"00:13:04"');
-
-debug('');
var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/input-stepup-stepdown.js b/LayoutTests/fast/forms/script-tests/input-stepup-stepdown.js
index 07bf2df..ef805c1 100644
--- a/LayoutTests/fast/forms/script-tests/input-stepup-stepdown.js
+++ b/LayoutTests/fast/forms/script-tests/input-stepup-stepdown.js
@@ -1,4 +1,4 @@
-description('Check stepUp() and stepDown() bahevior for type=date, datetime, datetime-local, time.');
+description('Check stepUp() and stepDown() bahevior for type=date, datetime, datetime-local.');
var input = document.createElement('input');
var invalidStateErr = '"Error: INVALID_STATE_ERR: DOM Exception 11"';
@@ -275,38 +275,8 @@
shouldBe('stepDownExplicitBounds(null, null, 0.1, 1)', '"0.9"');
debug('');
-debug('Time type');
-input.type = 'time';
-debug('Invalid value');
-shouldThrow('stepUp("", null, null)', invalidStateErr);
-shouldThrow('stepDown("", null, null)', invalidStateErr);
-debug('Non-number arguments');
-shouldBe('stepUp("20:13", null, null, "0")', '"20:13"');
-shouldBe('stepDown("20:13", null, null, "0")', '"20:13"');
-shouldBe('stepUp("20:13", null, null, "foo")', '"20:13"');
-shouldBe('stepDown("20:13", null, null, "foo")', '"20:13"');
-shouldBe('stepUp("20:13", null, null, null)', '"20:13"');
-shouldBe('stepDown("20:13", null, null, null)', '"20:13"');
-debug('Normal cases');
-shouldBe('stepUp("20:13", null, null)', '"20:14"');
-shouldBe('stepDown("20:13", null, null)', '"20:12"');
-shouldBe('stepUp("20:13", null, null, 10)', '"20:23"');
-shouldBe('stepDown("20:13", null, null, 11)', '"20:02"');
-shouldBe('stepUp("20:13", "4", null, 2)', '"20:13:08"');
-shouldBe('stepDown("20:13", "4", null, 3)', '"20:12:48"');
-debug('Step=any');
-shouldThrow('stepUp("20:13", "any", null)', invalidStateErr);
-shouldThrow('stepDown("20:13", "any", null)', invalidStateErr);
-debug('Overflow/underflow');
-shouldThrow('stepUp("20:13", "3.40282346e+38", null)', invalidStateErr);
-shouldThrow('stepDown("20:13", "3.40282346e+38", null)', invalidStateErr);
-shouldThrow('stepUp("20:13", "1", "20:13")', invalidStateErr);
-shouldThrow('stepDown("20:13", "1", "20:13")', invalidStateErr);
-shouldThrow('stepUp("23:59", null, null)', invalidStateErr);
-shouldThrow('stepDown("00:00", null, null)', invalidStateErr);
-
-debug('');
debug('Unsupported type');
+input.type = 'text';
shouldThrow('input.step = "3"; input.min = ""; input.max = ""; input.value = "2"; input.stepDown()', '"Error: INVALID_STATE_ERR: DOM Exception 11"');
shouldThrow('input.stepDown(0)', '"Error: INVALID_STATE_ERR: DOM Exception 11"');
shouldThrow('input.stepUp()', '"Error: INVALID_STATE_ERR: DOM Exception 11"');
diff --git a/LayoutTests/fast/forms/script-tests/input-type-change3.js b/LayoutTests/fast/forms/script-tests/input-type-change3.js
index c8b52d0..78bb2bd 100644
--- a/LayoutTests/fast/forms/script-tests/input-type-change3.js
+++ b/LayoutTests/fast/forms/script-tests/input-type-change3.js
@@ -48,7 +48,6 @@
check("submit", "submit");
check("tel", "tel");
check("telephone", "text");
-check("time", "time");
check("url", "url");
check("uri", "text");
diff --git a/LayoutTests/fast/forms/time/ValidityState-rangeOverflow-time-expected.txt b/LayoutTests/fast/forms/time/ValidityState-rangeOverflow-time-expected.txt
new file mode 100644
index 0000000..f0abe46
--- /dev/null
+++ b/LayoutTests/fast/forms/time/ValidityState-rangeOverflow-time-expected.txt
@@ -0,0 +1,20 @@
+This test aims to check for rangeOverflow flag with time input fields
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS The value "13:16" doesn't overflow the maximum value "".
+PASS The value "13:16" doesn't overflow the maximum value "".
+PASS The value "13:16" doesn't overflow the maximum value "foo".
+PASS The value "13:16" doesn't overflow the maximum value "13:16".
+PASS The value "13:16" doesn't overflow the maximum value "13:17".
+PASS The value "13:16" doesn't overflow the maximum value "14:15".
+PASS The value "foo" doesn't overflow the maximum value "13:16".
+PASS The value "13:16" overflows the maximum value "13:15".
+PASS The value "23:59:59.999" overflows the maximum value "13:16".
+PASS The value "13:16" overflows the maximum value "12:00".
+PASS The value "23:59:59.999" doesn't overflow the maximum value "13:16" when disabled.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/time/ValidityState-rangeOverflow-time.html b/LayoutTests/fast/forms/time/ValidityState-rangeOverflow-time.html
new file mode 100644
index 0000000..6a83aec
--- /dev/null
+++ b/LayoutTests/fast/forms/time/ValidityState-rangeOverflow-time.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description('This test aims to check for rangeOverflow flag with time input fields');
+
+var input = document.createElement('input');
+
+function checkOverflow(value, max, disabled)
+{
+ input.value = value;
+ input.max = max;
+ input.disabled = !!disabled;
+ var overflow = input.validity.rangeOverflow;
+ var resultText = 'The value "' + input.value + '" ' +
+ (overflow ? 'overflows' : 'doesn\'t overflow') +
+ ' the maximum value "' + input.max + '"' + (disabled ? ' when disabled.' : '.');
+ if (overflow)
+ testPassed(resultText);
+ else
+ testFailed(resultText);
+}
+
+function checkNotOverflow(value, max, disabled)
+{
+ input.value = value;
+ input.max = max;
+ input.disabled = !!disabled;
+ var overflow = input.validity.rangeOverflow;
+ var resultText = 'The value "' + input.value + '" ' +
+ (overflow ? 'overflows' : 'doesn\'t overflow') +
+ ' the maximum value "' + input.max + '"' + (disabled ? ' when disabled.' : '.');
+ if (overflow)
+ testFailed(resultText);
+ else
+ testPassed(resultText);
+}
+
+input.type = 'time';
+input.min = '';
+// No overflow cases
+checkNotOverflow('13:16', null);
+checkNotOverflow('13:16', '');
+checkNotOverflow('13:16', 'foo');
+checkNotOverflow('13:16', '13:16');
+checkNotOverflow('13:16', '13:17');
+checkNotOverflow('13:16', '14:15');
+checkNotOverflow('foo', '13:16');
+
+// Overflow cases
+checkOverflow('13:16', '13:15');
+checkOverflow('23:59:59.999', '13:16');
+input.min = '14:00'; // value < min && value > max
+checkOverflow('13:16', '12:00');
+
+// Disabled
+checkNotOverflow('23:59:59.999', '13:16', true);
+
+var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/time/ValidityState-rangeUnderflow-time-expected.txt b/LayoutTests/fast/forms/time/ValidityState-rangeUnderflow-time-expected.txt
new file mode 100644
index 0000000..0e6cb5f
--- /dev/null
+++ b/LayoutTests/fast/forms/time/ValidityState-rangeUnderflow-time-expected.txt
@@ -0,0 +1,21 @@
+This test aims to check for rangeUnderflow flag with time input fields
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS The value "13:16" doesn't underflow the minimum value "".
+PASS The value "13:16" doesn't underflow the minimum value "".
+PASS The value "13:16" doesn't underflow the minimum value "foo".
+PASS The value "00:00:00.000" doesn't underflow the minimum value "".
+PASS The value "23:59:59.999" doesn't underflow the minimum value "".
+PASS The value "13:16" doesn't underflow the minimum value "11:00".
+PASS The value "13:16" doesn't underflow the minimum value "13:16".
+PASS The value "foo" doesn't underflow the minimum value "11:00".
+PASS The value "13:16" undeflows the minimum value "13:17".
+PASS The value "23:59" undeflows the minimum value "23:59:30".
+PASS The value "13:16" undeflows the minimum value "14:00".
+PASS The value "23:59" doesn't underflow the minimum value "23:59:30" when disabled.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/time/ValidityState-rangeUnderflow-time.html b/LayoutTests/fast/forms/time/ValidityState-rangeUnderflow-time.html
new file mode 100644
index 0000000..2fc73ba
--- /dev/null
+++ b/LayoutTests/fast/forms/time/ValidityState-rangeUnderflow-time.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description('This test aims to check for rangeUnderflow flag with time input fields');
+
+var input = document.createElement('input');
+
+function checkUnderflow(value, min, disabled)
+{
+ input.value = value;
+ input.min = min;
+ input.disabled = !!disabled;
+ var underflow = input.validity.rangeUnderflow;
+ var resultText = 'The value "' + input.value + '" ' +
+ (underflow ? 'undeflows' : 'doesn\'t underflow') +
+ ' the minimum value "' + input.min + '"' + (disabled ? ' when disabled.' : '.');
+ if (underflow)
+ testPassed(resultText);
+ else
+ testFailed(resultText);
+}
+
+function checkNotUnderflow(value, min, disabled)
+{
+ input.value = value;
+ input.min = min;
+ input.disabled = !!disabled;
+ var underflow = input.validity.rangeUnderflow;
+ var resultText = 'The value "' + input.value + '" ' +
+ (underflow ? 'underflows' : 'doesn\'t underflow') +
+ ' the minimum value "' + input.min + '"' + (disabled ? ' when disabled.' : '.');
+ if (underflow)
+ testFailed(resultText);
+ else
+ testPassed(resultText);
+}
+
+input.type = 'time';
+input.max = '';
+// No underflow cases
+checkNotUnderflow('13:16', null);
+checkNotUnderflow('13:16', '');
+checkNotUnderflow('13:16', 'foo');
+checkNotUnderflow('00:00:00.000', '');
+checkNotUnderflow('23:59:59.999', '');
+checkNotUnderflow('13:16', '11:00');
+checkNotUnderflow('13:16', '13:16');
+checkNotUnderflow('foo', '11:00');
+
+// Underflow cases
+checkUnderflow('13:16', '13:17');
+checkUnderflow('23:59', '23:59:30');
+input.max = '11:00'; // value < min && value > max
+checkUnderflow('13:16', '14:00');
+
+// Disabled
+checkNotUnderflow('23:59', '23:59:30', true);
+
+var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/time/ValidityState-stepMismatch-time-expected.txt b/LayoutTests/fast/forms/time/ValidityState-stepMismatch-time-expected.txt
new file mode 100644
index 0000000..fc9bfa0
--- /dev/null
+++ b/LayoutTests/fast/forms/time/ValidityState-stepMismatch-time-expected.txt
@@ -0,0 +1,38 @@
+Check stepMismatch results for type=time.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Empty values
+PASS stepMismatchFor("", null, null) is false
+PASS stepMismatchFor("", "2", "12:34:56") is false
+Normal step values
+PASS stepMismatchFor("12:34:55", "1", "12:34:56") is false
+PASS stepMismatchFor("12:34:55.001", "1", "12:34:56") is true
+PASS stepMismatchFor("12:34:56.001", "0.001", "12:34:56") is false
+PASS stepMismatchFor("12:34:55", "0.333", "12:34:56") is true
+PASS stepMismatchFor("12:34:55.001", "0.333", "12:34:56") is false
+PASS stepMismatchFor("12:34", "86400", "12:34") is false
+PASS stepMismatchFor("23:59:59.998", "86399.999", "00:00") is true
+PASS stepMismatchFor("23:59:59.999", "86399.999", "00:00") is false
+Implicit step base
+PASS stepMismatchFor("12:34", "120", null) is false
+PASS stepMismatchFor("12:35", "120", null) is true
+Small step values
+PASS stepMismatchFor("12:34:55.001", "0.0003", "12:34.55.000") is false
+PASS stepMismatchFor("12:34:55.001", "0.0019", "12:34.55.000") is true
+PASS stepMismatchFor("12:34:55.004", "0.0019", "12:34.55.000") is false
+Invalid or no step values
+PASS stepMismatchFor("12:34", null, "12:34") is false
+PASS stepMismatchFor("12:34:56", null, "12:34") is true
+PASS stepMismatchFor("12:34", "-1", "12:34") is false
+PASS stepMismatchFor("12:34", "foo", "12:34") is false
+Special step value
+PASS stepMismatchFor("12:35", "any", "12:34") is false
+Disabled
+PASS stepMismatchFor("12:34:55.001", "1", "12:34:56", true) is false
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/time/ValidityState-stepMismatch-time.html b/LayoutTests/fast/forms/time/ValidityState-stepMismatch-time.html
new file mode 100644
index 0000000..7ef4565
--- /dev/null
+++ b/LayoutTests/fast/forms/time/ValidityState-stepMismatch-time.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description('Check stepMismatch results for type=time.');
+
+var input = document.createElement('input');
+document.body.appendChild(input);
+
+function stepMismatchFor(value, step, min, disabled) {
+ input.min = min;
+ input.step = step;
+ input.value = value;
+ input.disabled = !!disabled;
+ return input.validity.stepMismatch;
+}
+
+input.type = 'time';
+debug('Empty values');
+shouldBeFalse('stepMismatchFor("", null, null)');
+shouldBeFalse('stepMismatchFor("", "2", "12:34:56")');
+debug('Normal step values');
+shouldBeFalse('stepMismatchFor("12:34:55", "1", "12:34:56")');
+shouldBeTrue('stepMismatchFor("12:34:55.001", "1", "12:34:56")');
+shouldBeFalse('stepMismatchFor("12:34:56.001", "0.001", "12:34:56")');
+shouldBeTrue('stepMismatchFor("12:34:55", "0.333", "12:34:56")');
+shouldBeFalse('stepMismatchFor("12:34:55.001", "0.333", "12:34:56")');
+shouldBeFalse('stepMismatchFor("12:34", "86400", "12:34")');
+shouldBeTrue('stepMismatchFor("23:59:59.998", "86399.999", "00:00")');
+shouldBeFalse('stepMismatchFor("23:59:59.999", "86399.999", "00:00")');
+debug('Implicit step base');
+shouldBeFalse('stepMismatchFor("12:34", "120", null)');
+shouldBeTrue('stepMismatchFor("12:35", "120", null)');
+debug('Small step values');
+shouldBeFalse('stepMismatchFor("12:34:55.001", "0.0003", "12:34.55.000")');
+shouldBeTrue('stepMismatchFor("12:34:55.001", "0.0019", "12:34.55.000")');
+shouldBeFalse('stepMismatchFor("12:34:55.004", "0.0019", "12:34.55.000")');
+debug('Invalid or no step values');
+shouldBeFalse('stepMismatchFor("12:34", null, "12:34")');
+shouldBeTrue('stepMismatchFor("12:34:56", null, "12:34")');
+shouldBeFalse('stepMismatchFor("12:34", "-1", "12:34")');
+shouldBeFalse('stepMismatchFor("12:34", "foo", "12:34")');
+debug('Special step value');
+shouldBeFalse('stepMismatchFor("12:35", "any", "12:34")');
+debug('Disabled');
+shouldBeFalse('stepMismatchFor("12:34:55.001", "1", "12:34:56", true)');
+
+debug('');
+var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/ValidityState-typeMismatch-time-expected.txt b/LayoutTests/fast/forms/time/ValidityState-typeMismatch-time-expected.txt
similarity index 100%
rename from LayoutTests/fast/forms/ValidityState-typeMismatch-time-expected.txt
rename to LayoutTests/fast/forms/time/ValidityState-typeMismatch-time-expected.txt
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-time.js b/LayoutTests/fast/forms/time/ValidityState-typeMismatch-time.html
similarity index 83%
rename from LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-time.js
rename to LayoutTests/fast/forms/time/ValidityState-typeMismatch-time.html
index b99b3fe..075afe4 100644
--- a/LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-time.js
+++ b/LayoutTests/fast/forms/time/ValidityState-typeMismatch-time.html
@@ -1,3 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
description('This test aims to check for typeMismatch flag with type=time input fields');
var i = document.createElement('input');
i.type = 'time';
@@ -63,3 +73,7 @@
shouldBeValid('invalid', true);
var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/input-valueasdate-time-expected.txt b/LayoutTests/fast/forms/time/input-valueasdate-time-expected.txt
similarity index 100%
rename from LayoutTests/fast/forms/input-valueasdate-time-expected.txt
rename to LayoutTests/fast/forms/time/input-valueasdate-time-expected.txt
diff --git a/LayoutTests/fast/forms/script-tests/input-valueasdate-time.js b/LayoutTests/fast/forms/time/input-valueasdate-time.html
similarity index 86%
rename from LayoutTests/fast/forms/script-tests/input-valueasdate-time.js
rename to LayoutTests/fast/forms/time/input-valueasdate-time.html
index 583b3a0..2c09837 100644
--- a/LayoutTests/fast/forms/script-tests/input-valueasdate-time.js
+++ b/LayoutTests/fast/forms/time/input-valueasdate-time.html
@@ -1,3 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
description('Tests for .valueAsDate with <input type=time>.');
var input = document.createElement('input');
@@ -44,3 +54,7 @@
shouldBe('input.step = "0.001"; setValueAsDateAndGetValue(0, 0, 0, 0)', '"00:00:00.000"');
var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/input-valueasnumber-time-expected.txt b/LayoutTests/fast/forms/time/input-valueasnumber-time-expected.txt
similarity index 100%
rename from LayoutTests/fast/forms/input-valueasnumber-time-expected.txt
rename to LayoutTests/fast/forms/time/input-valueasnumber-time-expected.txt
diff --git a/LayoutTests/fast/forms/script-tests/input-valueasnumber-time.js b/LayoutTests/fast/forms/time/input-valueasnumber-time.html
similarity index 88%
rename from LayoutTests/fast/forms/script-tests/input-valueasnumber-time.js
rename to LayoutTests/fast/forms/time/input-valueasnumber-time.html
index c207f2f..06d0242 100644
--- a/LayoutTests/fast/forms/script-tests/input-valueasnumber-time.js
+++ b/LayoutTests/fast/forms/time/input-valueasnumber-time.html
@@ -1,3 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
description('Tests for .valueAsNumber with <input type=time>.');
var input = document.createElement('input');
@@ -44,3 +54,7 @@
shouldBe('input.step = "0.001"; setValueAsNumberAndGetValue(0, 0, 0, 0)', '"00:00:00.000"');
var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/time/time-input-type-expected.txt b/LayoutTests/fast/forms/time/time-input-type-expected.txt
new file mode 100644
index 0000000..027c39b
--- /dev/null
+++ b/LayoutTests/fast/forms/time/time-input-type-expected.txt
@@ -0,0 +1,12 @@
+Tests for writing and reading .type property of HTMLInputElement.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS input.type for "time" is correctly "time".
+PASS input.type for "TIME" is correctly "time".
+PASS input.type for " time " is correctly "text".
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/time/time-input-type.html b/LayoutTests/fast/forms/time/time-input-type.html
new file mode 100644
index 0000000..4106507
--- /dev/null
+++ b/LayoutTests/fast/forms/time/time-input-type.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description('Tests for writing and reading .type property of HTMLInputElement.');
+
+var input = document.createElement('input');
+document.body.appendChild(input);
+
+function check(value, expected)
+{
+ input.type = value;
+ if (input.type == expected)
+ testPassed('input.type for "' + value + '" is correctly "' + input.type + '".');
+ else
+ testFailed('input.type for "' + value + '" is incorrectly "' + input.type + '", should be "' + expected + '".');
+}
+
+check("time", "time");
+check("TIME", "time");
+check(" time ", "text");
+
+var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/time/time-input-visible-string-expected.txt b/LayoutTests/fast/forms/time/time-input-visible-string-expected.txt
new file mode 100644
index 0000000..97e39b2
--- /dev/null
+++ b/LayoutTests/fast/forms/time/time-input-visible-string-expected.txt
@@ -0,0 +1,7 @@
+The user-visible values of week input fields should be localized if the platform has a LocalizedDate implementation. Otherwise, they should be in the HTML5 formats.
+
+time: value='01:56:20.391' visible='01:56:20.391'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/time/time-input-visible-string.html b/LayoutTests/fast/forms/time/time-input-visible-string.html
new file mode 100644
index 0000000..c8eef6b
--- /dev/null
+++ b/LayoutTests/fast/forms/time/time-input-visible-string.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Time Input Test</title>
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p>The user-visible values of week input fields should be localized if the platform has
+a LocalizedDate implementation. Otherwise, they should be in the HTML5 formats.</p>
+
+ <form method="get" action="#">
+ <input type="time"><br>
+ </form>
+
+ <div id=console></div>
+ <script>
+ var input = document.getElementsByTagName("input")[0];
+ // Tue Apr 26 2011 18:56:20 GMT-0700 (PDT) which is Wed Apr 27 2011 01:56:20 GMT.
+ input.valueAsDate = new Date(1303869380391);
+ input.focus();
+ document.execCommand("SelectAll");
+ debug(input.type + ": value='" + input.value + "' visible='" + document.getSelection().toString() + "'");
+
+ document.body.removeChild(document.getElementsByTagName("form")[0]);
+ var successfullyParsed = true;
+ </script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/time/time-stepup-stepdown-expected.txt b/LayoutTests/fast/forms/time/time-stepup-stepdown-expected.txt
new file mode 100644
index 0000000..d3456de
--- /dev/null
+++ b/LayoutTests/fast/forms/time/time-stepup-stepdown-expected.txt
@@ -0,0 +1,37 @@
+Check stepUp() and stepDown() bahevior for type=time.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Invalid value
+PASS stepUp("", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepDown("", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+Non-number arguments
+PASS stepUp("20:13", null, null, "0") is "20:13"
+PASS stepDown("20:13", null, null, "0") is "20:13"
+PASS stepUp("20:13", null, null, "foo") is "20:13"
+PASS stepDown("20:13", null, null, "foo") is "20:13"
+PASS stepUp("20:13", null, null, null) is "20:13"
+PASS stepDown("20:13", null, null, null) is "20:13"
+Normal cases
+PASS stepUp("20:13", null, null) is "20:14"
+PASS stepDown("20:13", null, null) is "20:12"
+PASS stepUp("20:13", null, null, 10) is "20:23"
+PASS stepDown("20:13", null, null, 11) is "20:02"
+PASS stepUp("20:13", "4", null, 2) is "20:13:08"
+PASS stepDown("20:13", "4", null, 3) is "20:12:48"
+Step=any
+PASS stepUp("20:13", "any", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepDown("20:13", "any", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+Overflow/underflow
+PASS stepUp("20:13", "3.40282346e+38", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepDown("20:13", "3.40282346e+38", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepUp("20:13", "1", "20:13") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepDown("20:13", "1", "20:13") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepUp("23:59", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepDown("00:00", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/time/time-stepup-stepdown-from-renderer-expected.txt b/LayoutTests/fast/forms/time/time-stepup-stepdown-from-renderer-expected.txt
new file mode 100644
index 0000000..19d9a10
--- /dev/null
+++ b/LayoutTests/fast/forms/time/time-stepup-stepdown-from-renderer-expected.txt
@@ -0,0 +1,31 @@
+Check stepping-up and -down for time input fields from renderer. No cases of empty initial values.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Function arguments are (value, step, {min or max}, [stepCount]).
+Normal cases
+PASS stepUp("20:13", null, null) is "20:14"
+PASS stepDown("20:13", null, null) is "20:12"
+PASS stepUp("20:13", null, null, 10) is "20:23"
+PASS stepDown("20:13", null, null, 11) is "20:02"
+PASS stepUp("20:13", "4", null, 2) is "20:13:08"
+PASS stepDown("20:13", "4", null, 3) is "20:12:48"
+Step=any
+PASS stepUp("20:13", "any", null) is "20:14"
+PASS stepDown("20:13", "any", null) is "20:12"
+Overflow/underflow
+PASS stepUp("20:13", "3.40282346e+38", null) is "23:59:59.999"
+PASS stepDown("20:13", "3.40282346e+38", null) is "00:00:00.000"
+PASS stepUp("20:13", "1", "20:13") is "20:13"
+PASS stepDown("20:13", "1", "20:13") is "20:13"
+PASS stepUp("23:59", null, null) is "23:59"
+PASS stepDown("00:00", null, null) is "00:00"
+stepDown()/stepUp() for stepMismatch values
+PASS stepDown("20:13", "3", "20:12:56") is "20:12:59"
+PASS stepUp("00:13", "7", "") is "00:13:04"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/time/time-stepup-stepdown-from-renderer.html b/LayoutTests/fast/forms/time/time-stepup-stepdown-from-renderer.html
new file mode 100644
index 0000000..3f8dc6f
--- /dev/null
+++ b/LayoutTests/fast/forms/time/time-stepup-stepdown-from-renderer.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description('Check stepping-up and -down for time input fields from renderer. No cases of empty initial values.');
+
+var input = document.createElement('input');
+var invalidStateErr = '"Error: INVALID_STATE_ERR: DOM Exception 11"';
+
+function sendKey(keyName) {
+ var event = document.createEvent('KeyboardEvent');
+ event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName);
+ input.dispatchEvent(event);
+}
+
+function setInputAttributes(min, max, step, value) {
+ input.min = min;
+ input.max = max;
+ input.step = step;
+ input.value = value;
+}
+
+function stepUp(value, step, max, optionalStepCount) {
+ setInputAttributes(null, max, step, value);
+ if (typeof optionalStepCount != "undefined")
+ if (optionalStepCount < 0)
+ for (var i = 0; i < -optionalStepCount; i++)
+ sendKey('Down');
+ else
+ for (var i = 0; i < optionalStepCount; i++)
+ sendKey('Up');
+ else
+ sendKey('Up');
+ return input.value;
+}
+
+function stepDown(value, step, min, optionalStepCount) {
+ setInputAttributes(min, null, step, value);
+ if (typeof optionalStepCount != "undefined")
+ if (optionalStepCount < 0)
+ for (var i = 0; i < -optionalStepCount; i++)
+ sendKey('Up');
+ else
+ for (var i = 0; i < optionalStepCount; i++)
+ sendKey('Down');
+ else
+ sendKey('Down');
+ return input.value;
+}
+
+input.type = 'time';
+debug('Function arguments are (value, step, {min or max}, [stepCount]).');
+debug('Normal cases');
+shouldBe('stepUp("20:13", null, null)', '"20:14"');
+shouldBe('stepDown("20:13", null, null)', '"20:12"');
+shouldBe('stepUp("20:13", null, null, 10)', '"20:23"');
+shouldBe('stepDown("20:13", null, null, 11)', '"20:02"');
+shouldBe('stepUp("20:13", "4", null, 2)', '"20:13:08"');
+shouldBe('stepDown("20:13", "4", null, 3)', '"20:12:48"');
+debug('Step=any');
+shouldBe('stepUp("20:13", "any", null)', '"20:14"');
+shouldBe('stepDown("20:13", "any", null)', '"20:12"');
+debug('Overflow/underflow');
+shouldBe('stepUp("20:13", "3.40282346e+38", null)', '"23:59:59.999"');
+shouldBe('stepDown("20:13", "3.40282346e+38", null)', '"00:00:00.000"');
+shouldBe('stepUp("20:13", "1", "20:13")', '"20:13"');
+shouldBe('stepDown("20:13", "1", "20:13")', '"20:13"');
+shouldBe('stepUp("23:59", null, null)', '"23:59"');
+shouldBe('stepDown("00:00", null, null)', '"00:00"');
+debug('stepDown()/stepUp() for stepMismatch values');
+shouldBe('stepDown("20:13", "3", "20:12:56")', '"20:12:59"');
+shouldBe('stepUp("00:13", "7", "")', '"00:13:04"');
+
+debug('');
+var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/time/time-stepup-stepdown.html b/LayoutTests/fast/forms/time/time-stepup-stepdown.html
new file mode 100644
index 0000000..7b2dec4
--- /dev/null
+++ b/LayoutTests/fast/forms/time/time-stepup-stepdown.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description('Check stepUp() and stepDown() bahevior for type=time.');
+
+var input = document.createElement('input');
+var invalidStateErr = '"Error: INVALID_STATE_ERR: DOM Exception 11"';
+
+function setInputAttributes(min, max, step, value) {
+ input.min = min;
+ input.max = max;
+ input.step = step;
+ input.value = value;
+}
+
+function stepUp(value, step, max, optionalStepCount) {
+ setInputAttributes(null, max, step, value);
+ if (typeof optionalStepCount != "undefined")
+ input.stepUp(optionalStepCount);
+ else
+ input.stepUp();
+ return input.value;
+}
+
+function stepDown(value, step, min, optionalStepCount) {
+ setInputAttributes(min, null, step, value);
+ if (typeof optionalStepCount != "undefined")
+ input.stepDown(optionalStepCount);
+ else
+ input.stepDown();
+ return input.value;
+}
+
+input.type = 'time';
+debug('Invalid value');
+shouldThrow('stepUp("", null, null)', invalidStateErr);
+shouldThrow('stepDown("", null, null)', invalidStateErr);
+debug('Non-number arguments');
+shouldBe('stepUp("20:13", null, null, "0")', '"20:13"');
+shouldBe('stepDown("20:13", null, null, "0")', '"20:13"');
+shouldBe('stepUp("20:13", null, null, "foo")', '"20:13"');
+shouldBe('stepDown("20:13", null, null, "foo")', '"20:13"');
+shouldBe('stepUp("20:13", null, null, null)', '"20:13"');
+shouldBe('stepDown("20:13", null, null, null)', '"20:13"');
+debug('Normal cases');
+shouldBe('stepUp("20:13", null, null)', '"20:14"');
+shouldBe('stepDown("20:13", null, null)', '"20:12"');
+shouldBe('stepUp("20:13", null, null, 10)', '"20:23"');
+shouldBe('stepDown("20:13", null, null, 11)', '"20:02"');
+shouldBe('stepUp("20:13", "4", null, 2)', '"20:13:08"');
+shouldBe('stepDown("20:13", "4", null, 3)', '"20:12:48"');
+debug('Step=any');
+shouldThrow('stepUp("20:13", "any", null)', invalidStateErr);
+shouldThrow('stepDown("20:13", "any", null)', invalidStateErr);
+debug('Overflow/underflow');
+shouldThrow('stepUp("20:13", "3.40282346e+38", null)', invalidStateErr);
+shouldThrow('stepDown("20:13", "3.40282346e+38", null)', invalidStateErr);
+shouldThrow('stepUp("20:13", "1", "20:13")', invalidStateErr);
+shouldThrow('stepDown("20:13", "1", "20:13")', invalidStateErr);
+shouldThrow('stepUp("23:59", null, null)', invalidStateErr);
+shouldThrow('stepDown("00:00", null, null)', invalidStateErr);
+
+debug('');
+var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>