| <body> |
| <script src="../../../resources/js-test.js"></script> |
| <form> |
| <input value="a" id="input1"> |
| </form> |
| <script> |
| description('Date input with invalid initial value should not dispatch a change event on disabled=true, and should not crash.'); |
| var changeEventCounter = 0; |
| var input1 = document.querySelector('#input1'); |
| input1.type = 'date'; |
| input1.addEventListener('change', function handleChange() { |
| ++changeEventCounter; |
| input1.removeEventListener('change', handleChange); |
| input1.type = 'search'; |
| }, false); |
| input1.disabled = true; |
| shouldBe('changeEventCounter', '0'); |
| </script> |
| </body> |
| </html> |