Chromium Code Reviews| Index: LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-mouse-events.html |
| diff --git a/LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-mouse-events.html b/LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-mouse-events.html |
| index f93c8c5f1351c92daaecd02a7b344a80f9ffe44b..5c0908f467b9a442c611d2eef4e3865a422b69b1 100644 |
| --- a/LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-mouse-events.html |
| +++ b/LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-mouse-events.html |
| @@ -72,9 +72,13 @@ mouseClickOn(input.offsetWidth - spinButtonOffset, center + 1); |
| shouldBeEqualToString('input.value', '2346-08-20T10:00'); |
| shouldBeZero('window.getSelection().rangeCount'); // No text selection. |
| +// With ICU 52 on Linux/Android, a comma is used to delimete date and time and |
| +// the hour and time field positions are shifted. |
| +var commaOffset = window.internals.oldestShadowRoot(input).textContent.indexOf(', ') == -1 ? 0 : 16; |
| + |
| debug(''); |
| debug('==> Focus on the hour field.'); |
|
tkent
2014/06/03 01:45:07
Optional: We can get a shadow node for the hour fi
|
| -mouseClickOn(190, center); |
| +mouseClickOn(190 + commaOffset, center); |
| keyDown('upArrow'); |
| shouldBeEqualToString('input.value', '2346-08-20T11:00'); |
| mouseClickOn(input.offsetWidth - spinButtonOffset, center - 1); |
| @@ -85,7 +89,7 @@ shouldBeZero('window.getSelection().rangeCount'); // No text selection. |
| debug(''); |
| debug('==> Focus on the minute field.'); |
| -mouseClickOn(240, center); |
| +mouseClickOn(240 + commaOffset, center); |
| keyDown('upArrow'); |
| shouldBeEqualToString('input.value', '2346-08-20T11:01'); |
| mouseClickOn(input.offsetWidth - spinButtonOffset, center - 1); |
| @@ -94,6 +98,9 @@ mouseClickOn(input.offsetWidth - spinButtonOffset, center + 1); |
| shouldBeEqualToString('input.value', '2346-08-20T11:01'); |
| shouldBeZero('window.getSelection().rangeCount'); // No text selection. |
| +// Set the value explicitly to prevent a earlier failure from leading to a |
| +// failure in the subsequent tests. |
| +input.value= '2346-08-20T11:01'; |
| debug(''); |
| debug('==> Click on a disabled field.'); |
| input.disabled = true; |