| 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=time id=time value="01:00" min="01:02" max="2012-01-04" list=suggest
ions> | |
| 12 <datalist id=suggestions> | |
| 13 <option>01:00</option> | |
| 14 <option>01:01</option> | |
| 15 <option>01:02</option> | |
| 16 <option>01:03</option> | |
| 17 <option>01:04</option> | |
| 18 <option>01:05</option> | |
| 19 <option>01:06</option> | |
| 20 </datalist> | |
| 21 <script> | |
| 22 description('Tests that min/max attributes filter out suggestions as expected.')
; | |
| 23 | |
| 24 debug('Check that page popup doesn\'t exist at first.'); | |
| 25 shouldBeNull('document.getElementById("mock-page-popup")'); | |
| 26 | |
| 27 window.onload = function() { | |
| 28 openPicker(document.getElementById('time'), test); | |
| 29 }; | |
| 30 | |
| 31 function test() { | |
| 32 popupWindow.focus(); | |
| 33 | |
| 34 shouldBe('entryValues().length', '5'); | |
| 35 shouldBeEqualToString('entryValues()[0]', '01:02'); | |
| 36 shouldBeEqualToString('entryValues()[1]', '01:03'); | |
| 37 shouldBeEqualToString('entryValues()[2]', '01:04'); | |
| 38 shouldBeEqualToString('entryValues()[3]', '01:05'); | |
| 39 shouldBeEqualToString('entryValues()[4]', '01:06'); | |
| 40 | |
| 41 finishJSTest(); | |
| 42 } | |
| 43 | |
| 44 </script> | |
| 45 <script src="../../../../../fast/js/resources/js-test-post.js"></script> | |
| 46 </body> | |
| 47 </html> | |
| OLD | NEW |