4 <script src=
"../../../resources/js-test.js"></script>
5 <script src=
"../../forms/resources/picker-common.js"></script>
6 <script src=
"../resources/common.js"></script>
7 <script src=
"resources/calendar-picker-common.js"></script>
11 description('Test for crbug.com/271451. The calendar picker should not change the time part of datetime-local field.');
13 var input
= document
.createElement('input');
14 input
.type
= 'datetime-local';
15 getElementByPseudoId(internals
.youngestShadowRoot(input
), '-webkit-datetime-edit').setAttribute('pattern', 'yyyy-MM-dd HH:mm');
16 document
.body
.appendChild(input
);
18 input
.value
= '1999-07-31T12:59';
20 shouldBeEqualToString('getUserAgentShadowTextContent(input)', '1999-07-31 12:59');
21 openPicker(input
, function() {
22 shouldBeEqualToString('getUserAgentShadowTextContent(input)', '1999-07-31 12:59');
24 eventSender
.keyDown('rightArrow');
25 shouldBeEqualToString('highlightedValue()', '1999-08-01');
28 eventSender
.keyDown('\n');
29 shouldBeEqualToString('getUserAgentShadowTextContent(input)', '1999-08-01 12:59');