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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/search/search-setrangetext-noevents.html

Issue 1577243002: setRangeText shouldn't dispatch 'search' event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/forms/search/search-setrangetext-noevents.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/search/search-setrangetext-noevents.html b/third_party/WebKit/LayoutTests/fast/forms/search/search-setrangetext-noevents.html
new file mode 100644
index 0000000000000000000000000000000000000000..84abaacde2afd6801737616bd8403a2a1959b8cd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/forms/search/search-setrangetext-noevents.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<body>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<div id="log"></div>
+<input type="search" incremental value="abcdef">
+<script>
+var input = document.querySelector('input');
+
+var test = async_test('Changing the input type in search event handler should not crash.');
+test.step(function() {
+ input.onsearch = function() {
+ assert_unreached();
+ };
+ input.oninput = function() {
+ assert_unreached();
+ };
+ // A search event would have 0.2s delay in this case.
+ setTimeout(function() {
+ test.done();
+ }, 300);
+
+ input.focus();
+ input.setRangeText('a', 6, 6);
+});
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698