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