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

Unified Diff: LayoutTests/fast/forms/datetimelocal-multiple-fields/resources/preserve-value-after-history-back-frame.html

Issue 302323004: Prepare Layout tests for ICU upgrade to 52 in (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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: 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;

Powered by Google App Engine
This is Rietveld 408576698