| 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=month id=month value="2012-12" min="2012-02" max="2012-05" list=sugg
estions> | |
| 12 <datalist id=suggestions> | |
| 13 <option>2012-01</option> | |
| 14 <option>2012-02</option> | |
| 15 <option>2012-03</option> | |
| 16 <option>2012-04</option> | |
| 17 <option>2012-05</option> | |
| 18 <option>2012-06</option> | |
| 19 <option>2012-07</option> | |
| 20 <option>2012-08</option> | |
| 21 <option>2012-09</option> | |
| 22 <option>2012-10</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 openPicker(document.getElementById('month'), test); | |
| 31 | |
| 32 function test() { | |
| 33 popupWindow.focus(); | |
| 34 | |
| 35 shouldBe('entryValues().length', '5'); | |
| 36 shouldBeEqualToString('entryValues()[0]', '2012-02'); | |
| 37 shouldBeEqualToString('entryValues()[1]', '2012-03'); | |
| 38 shouldBeEqualToString('entryValues()[2]', '2012-04'); | |
| 39 shouldBeEqualToString('entryValues()[3]', '2012-05'); | |
| 40 shouldBeEqualToString('entryValues()[4]', '@openCalendarPicker'); | |
| 41 | |
| 42 finishJSTest(); | |
| 43 } | |
| 44 | |
| 45 </script> | |
| 46 <script src="../../../../../fast/js/resources/js-test-post.js"></script> | |
| 47 </body> | |
| 48 </html> | |
| OLD | NEW |