Index: LayoutTests/fast/forms/datetimelocal-multiple-fields/resources/preserve-value-after-history-back-frame.html |
diff --git a/LayoutTests/fast/forms/datetimelocal-multiple-fields/resources/preserve-value-after-history-back-frame.html b/LayoutTests/fast/forms/datetimelocal-multiple-fields/resources/preserve-value-after-history-back-frame.html |
index c9cbe0aeb71aaea010a6f045fb1090cb0fd42f50..02451ba95fbc2cfb5ab36d633bb8f27b2ae06c63 100644 |
--- a/LayoutTests/fast/forms/datetimelocal-multiple-fields/resources/preserve-value-after-history-back-frame.html |
+++ b/LayoutTests/fast/forms/datetimelocal-multiple-fields/resources/preserve-value-after-history-back-frame.html |
@@ -7,6 +7,12 @@ function fieldsText(input) { |
return window.internals.oldestShadowRoot(input).textContent; |
} |
+// On Linux/Android with a newer ICU, date and time are separated by ','. |
+function insertCommaIfNecessary(expected, input) { |
+ return (fieldsText(input).indexOf(', ') == -1) ? expected : |
+ expected.replace(' ', ', '); |
+} |
+ |
function back(newState) { |
parent.state = newState; |
history.back(); |
@@ -53,7 +59,7 @@ window.onload = function() { |
{ |
'description' : 'Went back to a page. Checking a form control which had a partial value', |
'actual' : fieldsText(testInput2), |
- 'expected' : '01/dd/1999 --:00 --' |
+ 'expected' : insertCommaIfNecessary('01/dd/1999 --:00 --', testInput1) |
}); |
forward('forwardTo2'); |
break; |
@@ -91,7 +97,7 @@ window.onload = function() { |
{ |
'description' : 'Went forward to a page. Checking a form control which had a partial value', |
'actual' : fieldsText(testInput2), |
- 'expected' : 'mm/31/yyyy 12:-- PM' |
+ 'expected' : insertCommaIfNecessary('mm/31/yyyy 12:-- PM', testInput1) |
}); |
back('backTo1Second'); |
break; |