Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / calendar-picker / calendar-picker-datetimelocal.html
blob418f7244030c5289d0b0002e4da3385438c7ce9b
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../forms/resources/picker-common.js"></script>
6 <script src="resources/calendar-picker-common.js"></script>
7 </head>
8 <body>
9 <p id="description"></p>
10 <div id="console"></div>
11 <input type=datetime-local id=datetimelocal value="2011-12-31T12:53:45">
12 <script>
13 description("Tests if calendar picker works for datetime-local as expected.");
15 debug('Check that page popup doesn\'t exist at first.');
16 shouldBeNull('document.getElementById("mock-page-popup")');
18 openPicker(document.getElementById('datetimelocal'), test);
20 function test() {
21 shouldBeEqualToString('selectedValue()', '2011-12-31');
22 shouldBeEqualToString('highlightedValue()', '2011-12-31');
24 eventSender.keyDown('rightArrow');
25 shouldBeEqualToString('highlightedValue()', '2012-01-01');
27 removeCommitDelay();
28 eventSender.keyDown('\n');
29 shouldBeEqualToString('document.getElementById("datetimelocal").value', '2012-01-01T12:53:45');
31 finishJSTest();
34 </script>
35 </body>
36 </html>