Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/search/search-change-type-onsearch.html

Issue 1537313002: Fix a crash by search event handler for <input type=search incremental>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <body>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
5 <div id="log"></div>
6 <input type="search" incremental>
7 <script>
8 var input = document.querySelector('input');
9 input.onsearch = function() {
10 input.type = 'text';
11 };
12
13 var test = async_test('Changing the input type in search event handler should no t crash.');
14 test.step(function() {
15 input.offsetTop;
16 input.setRangeText('', 0, 1); // Trigger 'search' event.
17 });
18 setTimeout(function() { test.step(function() {
19 assert_equals(input.type, 'text');
20 test.done();
21 })}, 0);
22 </script>
23 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698