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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/time.html

Issue 2657583002: Import wpt@cf62b859e6b890abc34f8140d185ba91df95c5b6 (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. Created 3 years, 11 months 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: third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/time.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/time.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/time.html
index 5178d91de18f30595754de6536130696d588b1bd..eabb6cbd426e8bc6928316db1a4b6634871fe52f 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/time.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/time.html
@@ -104,26 +104,56 @@ test(function(){
_StepTest.value = "12:00";
_StepTest.step = "3600";
_StepTest.stepUp();
- assert_equals(_StepTest.value, "13:00");
+ assert_in_array(
+ _StepTest.value,
+ [
+ "13:00",
+ "13:00:00",
+ "13:00:00.0",
+ "13:00:00.00",
+ "13:00:00.000"],
+ "a valid time string representing 1pm");
} , "stepUp on step value hour ");
test(function(){
_StepTest.value = "12:00";
_StepTest.step = "3600";
_StepTest.stepDown();
- assert_equals(_StepTest.value, "11:00");
+ assert_in_array(
+ _StepTest.value,
+ [
+ "11:00",
+ "11:00:00",
+ "11:00:00.0",
+ "11:00:00.00",
+ "11:00:00.000"],
+ "a valid time string representing 11am");
} , "stepDown on step value hour ");
test(function(){
_StepTest.value = "12:00";
_StepTest.step = "1";
_StepTest.stepUp();
- assert_equals(_StepTest.value, "12:00:01");
+ assert_in_array(
+ _StepTest.value,
+ [
+ "12:00:01",
+ "12:00:01.0",
+ "12:00:01.00",
+ "12:00:01.000"],
+ "a valid time string representing 1 second after noon");
} , "stepUp on step value second ");
test(function(){
_StepTest.value = "12:00";
_StepTest.step = "1";
_StepTest.stepDown();
- assert_equals(_StepTest.value, "11:59:59");
+ assert_in_array(
+ _StepTest.value,
+ [
+ "11:59:59",
+ "11:59:59.0",
+ "11:59:59.00",
+ "11:59:59.000"],
+ "a valid time string representing 1 second before noon");
} , "stepDown on step value second ");
test(function(){
@@ -131,64 +161,118 @@ test(function(){
_StepTest.step = "0.001";
_StepTest.stepUp();
assert_equals(_StepTest.value, "12:00:00.001");
-} , "stepUp on step value miri second ");
+} , "stepUp on step value with fractional seconds");
test(function(){
_StepTest.value = "12:00";
_StepTest.step = "0.001";
_StepTest.stepDown();
assert_equals(_StepTest.value, "11:59:59.999");
-} , "stepDown on step value miri second ");
+} , "stepDown on step value with fractional seconds");
test(function(){
_StepTest.value = "13:00:00";
_StepTest.step = "1";
_StepTest.stepUp(2);
- assert_equals(_StepTest.value, "13:00:02");
-}, "stepUp argment 2 times");
+ assert_in_array(
+ _StepTest.value,
+ [
+ "13:00:02",
+ "13:00:02.0",
+ "13:00:02.00",
+ "13:00:02.000"],
+ "a valid time string representing 2 seconds after 1pm");
+}, "stepUp argument 2 times");
test(function(){
_StepTest.value = "13:00:00";
_StepTest.step = "1";
_StepTest.stepDown(2);
- assert_equals(_StepTest.value, "12:59:58");
-}, "stepDown argment 2 times");
+ assert_in_array(
+ _StepTest.value,
+ [
+ "12:59:58",
+ "12:59:58.0",
+ "12:59:58.00",
+ "12:59:58.000"],
+ "a valid time string representing 2 seconds before 1pm");
+}, "stepDown argument 2 times");
test(function(){
_StepTest.max = "15:00";
+ this.add_cleanup(function() { _StepTest.max = ""; });
_StepTest.value = "15:00";
_StepTest.stepUp();
- assert_equals(_StepTest.value, "15:00");
- _StepTest.max = "";
+ assert_in_array(
+ _StepTest.value,
+ [
+ "15:00",
+ "15:00:00",
+ "15:00:00.0",
+ "15:00:00.00",
+ "15:00:00.000"],
+ "a valid time string representing 3pm");
} , "stepUp stop because it exceeds the maximum value");
test(function(){
_StepTest.min = "13:00";
+ this.add_cleanup(function() { _StepTest.min = ""; });
_StepTest.value = "13:00";
_StepTest.stepDown();
- assert_equals(_StepTest.value, "13:00");
- _StepTest.min="";
-} , "stepDown Stop so lower than the minimum value");
+ assert_in_array(
+ _StepTest.value,
+ [
+ "13:00",
+ "13:00:00",
+ "13:00:00.0",
+ "13:00:00.00",
+ "13:00:00.000"],
+ "a valid time string representing 1pm");
+} , "stepDown stop so lower than the minimum value");
test(function(){
_StepTest.max = "15:01";
+ this.add_cleanup(function() { _StepTest.max = ""; });
_StepTest.value = "15:00";
_StepTest.step = "120";
_StepTest.stepUp();
- assert_equals(_StepTest.value, "15:01");
- _StepTest.max = "";
+ assert_in_array(
+ _StepTest.value,
+ [
+ "15:01",
+ "15:01:00",
+ "15:01:00.0",
+ "15:01:00.00",
+ "15:01:00.000"],
+ "a valid time string representing 1 minute after 3pm");
} , "stop at border on stepUp");
test(function(){
_StepTest.min = "12:59";
+ this.add_cleanup(function() { _StepTest.min = ""; });
_StepTest.value = "13:00";
_StepTest.step = "120";
_StepTest.stepDown();
- assert_equals(_StepTest.value, "12:59");
- _StepTest.min="";
+ assert_in_array(
+ _StepTest.value,
+ [
+ "12:59",
+ "12:59:00",
+ "12:59:00.0",
+ "12:59:00.00",
+ "12:59:00.000"],
+ "a valid time string representing 1 minute before 2pm");
} , "stop at border on stepDown");
test(function(){
_StepTest.value = "";
_StepTest.step = "60";
_StepTest.stepUp();
- assert_equals(_StepTest.value, "00:01");
+ assert_in_array(
+ _StepTest.value,
+ [
+ "00:01",
+ "00:01:00",
+ "00:01:00.0",
+ "00:01:00.00",
+ "00:01:00.000"],
+ "a valid time string representing 1 minute after midnight");
} , " empty value of stepUp");

Powered by Google App Engine
This is Rietveld 408576698