| <!DOCTYPE html> |
| <body> |
| <script src="../../../resources/testharness.js"></script> |
| <script src="../../../resources/testharnessreport.js"></script> |
| <div id="log"></div> |
| <input type="search" incremental> |
| <script> |
| var input = document.querySelector('input'); |
| input.onsearch = function() { |
| input.type = 'text'; |
| }; |
| |
| var test = async_test('Changing the input type in search event handler should not crash.'); |
| test.step(function() { |
| input.offsetTop; |
| input.setRangeText('', 0, 1); // Trigger 'search' event. |
| }); |
| setTimeout(function() { test.step(function() { |
| assert_equals(input.type, 'text'); |
| test.done(); |
| })}, 0); |
| </script> |
| </body> |