| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../js/resources/js-test-pre.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <p id="description"></p> | 7 <p id="description"></p> |
| 8 <div id="console"></div> | 8 <div id="console"></div> |
| 9 <script> | 9 <script> |
| 10 description('Test HTMLInputElement::valueAsDate binding.'); | 10 description('Test HTMLInputElement::valueAsDate binding.'); |
| 11 | 11 |
| 12 var input = document.createElement('input'); | 12 var input = document.createElement('input'); |
| 13 var invalidStateError = 'Error: InvalidStateError: DOM Exception 11'; | 13 var invalidStateError = 'InvalidStateError: An attempt was made to use an object
that is not, or is no longer, usable.'; |
| 14 | 14 |
| 15 debug('Unsuppported type:'); | 15 debug('Unsuppported type:'); |
| 16 input.type = 'text'; | 16 input.type = 'text'; |
| 17 shouldBe('input.valueAsDate', 'null'); | 17 shouldBe('input.valueAsDate', 'null'); |
| 18 shouldThrow('input.valueAsDate = date', 'invalidStateError'); | 18 shouldThrow('input.valueAsDate = date', 'invalidStateError'); |
| 19 | 19 |
| 20 debug(''); | 20 debug(''); |
| 21 debug('Supported type:'); | 21 debug('Supported type:'); |
| 22 input.type = 'month'; | 22 input.type = 'month'; |
| 23 input.value = '2009-12'; | 23 input.value = '2009-12'; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 43 input.value = '1970-01'; | 43 input.value = '1970-01'; |
| 44 input.valueAsDate = undefined; | 44 input.valueAsDate = undefined; |
| 45 shouldBe('input.value', '""'); | 45 shouldBe('input.value', '""'); |
| 46 input.value = '1970-01'; | 46 input.value = '1970-01'; |
| 47 input.valueAsDate = document; | 47 input.valueAsDate = document; |
| 48 shouldBe('input.value', '""'); | 48 shouldBe('input.value', '""'); |
| 49 </script> | 49 </script> |
| 50 <script src="../../js/resources/js-test-post.js"></script> | 50 <script src="../../js/resources/js-test-post.js"></script> |
| 51 </body> | 51 </body> |
| 52 </html> | 52 </html> |
| OLD | NEW |