OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <script src="../../../resources/testharness.js"></script> | 3 <script src="../../../resources/testharness.js"></script> |
4 <script src="../../../resources/testharnessreport.js"></script> | 4 <script src="../../../resources/testharnessreport.js"></script> |
5 <div id="log"></div> | 5 <div id="log"></div> |
6 <input type="search" incremental> | 6 <input type="search" incremental> |
7 <script> | 7 <script> |
8 var input = document.querySelector('input'); | 8 var input = document.querySelector('input'); |
9 input.onsearch = function() { | 9 input.onsearch = function() { |
10 input.type = 'text'; | 10 input.type = 'text'; |
| 11 test.done(); |
11 }; | 12 }; |
12 | 13 |
13 var test = async_test('Changing the input type in search event handler should no
t crash.'); | 14 var test = async_test('Changing the input type in search event handler should no
t crash.'); |
14 test.step(function() { | 15 test.step(function() { |
15 input.offsetTop; | 16 input.focus(); |
16 input.setRangeText('', 0, 1); // Trigger 'search' event. | 17 eventSender.keyDown('a'); // Trigger 'search' event. |
17 }); | 18 }); |
18 setTimeout(function() { test.step(function() { | |
19 assert_equals(input.type, 'text'); | |
20 test.done(); | |
21 })}, 0); | |
22 </script> | 19 </script> |
23 </body> | 20 </body> |
OLD | NEW |