| Index: third_party/WebKit/LayoutTests/fast/forms/search/search-change-type-onsearch.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/forms/search/search-change-type-onsearch.html b/third_party/WebKit/LayoutTests/fast/forms/search/search-change-type-onsearch.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..166553441529071f6e90eed35acf4c4764ba78a5
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/forms/search/search-change-type-onsearch.html
|
| @@ -0,0 +1,23 @@
|
| +<!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>
|
|
|