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

Side by Side Diff: LayoutTests/fast/forms/calendar-picker/calendar-picker-should-not-change-datetimelocal-time.html

Issue 618193003: Rename page-popup helper functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../forms/resources/picker-common.js"></script> 5 <script src="../../forms/resources/picker-common.js"></script>
6 <script src="../resources/common.js"></script> 6 <script src="../resources/common.js"></script>
7 <script src="resources/calendar-picker-common.js"></script> 7 <script src="resources/calendar-picker-common.js"></script>
8 </head> 8 </head>
9 <body> 9 <body>
10 <script> 10 <script>
11 description('Test for crbug.com/271451. The calendar picker should not change th e time part of datetime-local field.'); 11 description('Test for crbug.com/271451. The calendar picker should not change th e time part of datetime-local field.');
12 12
13 var input = document.createElement('input'); 13 var input = document.createElement('input');
14 input.type = 'datetime-local'; 14 input.type = 'datetime-local';
15 getElementByPseudoId(internals.youngestShadowRoot(input), '-webkit-datetime-edit ').setAttribute('pattern', 'yyyy-MM-dd HH:mm'); 15 getElementByPseudoId(internals.youngestShadowRoot(input), '-webkit-datetime-edit ').setAttribute('pattern', 'yyyy-MM-dd HH:mm');
16 document.body.appendChild(input); 16 document.body.appendChild(input);
17 17
18 input.value = '1999-07-31T12:59'; 18 input.value = '1999-07-31T12:59';
19 19
20 shouldBeEqualToString('getUserAgentShadowTextContent(input)', '1999-07-31 12:59' ); 20 shouldBeEqualToString('getUserAgentShadowTextContent(input)', '1999-07-31 12:59' );
21 openPicker(input, function() { 21 openPickerWithMock(input, function() {
22 shouldBeEqualToString('getUserAgentShadowTextContent(input)', '1999-07-31 12 :59'); 22 shouldBeEqualToString('getUserAgentShadowTextContent(input)', '1999-07-31 12 :59');
23 23
24 eventSender.keyDown('rightArrow'); 24 eventSender.keyDown('rightArrow');
25 shouldBeEqualToString('highlightedValue()', '1999-08-01'); 25 shouldBeEqualToString('highlightedValue()', '1999-08-01');
26 26
27 removeCommitDelay(); 27 removeCommitDelay();
28 eventSender.keyDown('\n'); 28 eventSender.keyDown('\n');
29 shouldBeEqualToString('selectedValue()', '1999-08-01'); 29 shouldBeEqualToString('selectedValue()', '1999-08-01');
30 30
31 shouldBeEqualToString('getUserAgentShadowTextContent(input)', '1999-08-01 12 :59'); 31 shouldBeEqualToString('getUserAgentShadowTextContent(input)', '1999-08-01 12 :59');
32 finishJSTest(); 32 finishJSTest();
33 }); 33 });
34 34
35 </script> 35 </script>
36 </body> 36 </body>
37 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698