| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../../resources/js-test.js"></script> |
| </head> |
| <body> |
| <script> |
| description("Make sure we do not crash if the 'input' event listener changes the input type."); |
| |
| onload = () => { |
| testInput.addEventListener("input", () => { |
| testPassed("Input event was fired"); |
| testInput.type = "text"; |
| }); |
| testInput.addEventListener("change", () => { |
| testFailed("change event should not have fired"); |
| }); |
| testInput.click(); |
| setTimeout(finishJSTest, 0); |
| }; |
| </script> |
| <input type="checkbox" id="testInput"></input> |
| </body> |
| </html> |