OLD | NEW |
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/suggestion-picker-common.js"></script> | 6 <script src="resources/suggestion-picker-common.js"></script> |
7 </head> | 7 </head> |
8 <body style="background-color: #bbbbbb;"> | 8 <body style="background-color: #bbbbbb;"> |
9 <p id="description"></p> | 9 <p id="description"></p> |
10 <div id="console"></div> | 10 <div id="console"></div> |
(...skipping 10 matching lines...) Expand all Loading... |
21 <option>2012-11-21T18:00</option> | 21 <option>2012-11-21T18:00</option> |
22 <option>2012-11-22T00:00</option> | 22 <option>2012-11-22T00:00</option> |
23 </datalist> | 23 </datalist> |
24 <script> | 24 <script> |
25 description('Tests that min/max attributes filter out suggestions as expected.')
; | 25 description('Tests that min/max attributes filter out suggestions as expected.')
; |
26 | 26 |
27 debug('Check that page popup doesn\'t exist at first.'); | 27 debug('Check that page popup doesn\'t exist at first.'); |
28 shouldBeNull('document.getElementById("mock-page-popup")'); | 28 shouldBeNull('document.getElementById("mock-page-popup")'); |
29 | 29 |
30 window.onload = function() { | 30 window.onload = function() { |
31 openPickerWithMock(document.getElementById('datetime-local'), test); | 31 openPicker(document.getElementById('datetime-local'), test); |
32 }; | 32 }; |
33 | 33 |
34 function test() { | 34 function test() { |
35 popupWindow.focus(); | 35 popupWindow.focus(); |
36 | 36 |
37 shouldBe('entryValues().length', '7'); | 37 shouldBe('entryValues().length', '7'); |
38 shouldBeEqualToString('entryValues()[0]', '2012-11-20T06:00'); | 38 shouldBeEqualToString('entryValues()[0]', '2012-11-20T06:00'); |
39 shouldBeEqualToString('entryValues()[1]', '2012-11-20T12:00'); | 39 shouldBeEqualToString('entryValues()[1]', '2012-11-20T12:00'); |
40 shouldBeEqualToString('entryValues()[2]', '2012-11-20T18:00'); | 40 shouldBeEqualToString('entryValues()[2]', '2012-11-20T18:00'); |
41 shouldBeEqualToString('entryValues()[3]', '2012-11-21T00:00'); | 41 shouldBeEqualToString('entryValues()[3]', '2012-11-21T00:00'); |
42 shouldBeEqualToString('entryValues()[4]', '2012-11-21T06:00'); | 42 shouldBeEqualToString('entryValues()[4]', '2012-11-21T06:00'); |
43 shouldBeEqualToString('entryValues()[5]', '2012-11-21T12:00'); | 43 shouldBeEqualToString('entryValues()[5]', '2012-11-21T12:00'); |
44 shouldBeEqualToString('entryValues()[6]', '@openCalendarPicker'); | 44 shouldBeEqualToString('entryValues()[6]', '@openCalendarPicker'); |
45 | 45 |
46 finishJSTest(); | 46 finishJSTest(); |
47 } | 47 } |
48 | 48 |
49 </script> | 49 </script> |
50 </body> | 50 </body> |
51 </html> | 51 </html> |
OLD | NEW |