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

Unified Diff: third_party/WebKit/LayoutTests/editing/spelling/check_after_consecutive_inserttext_commands.html

Issue 2221783004: TypingCommand should not cancel previous spellcheck request if no new request in initiated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/spelling/check_after_consecutive_inserttext_commands.html
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/check_after_consecutive_inserttext_commands.html b/third_party/WebKit/LayoutTests/editing/spelling/check_after_consecutive_inserttext_commands.html
new file mode 100644
index 0000000000000000000000000000000000000000..1fc9ac17cc2ca11320148def0be2446b1081e764
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/spelling/check_after_consecutive_inserttext_commands.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<div id="div" contenteditable></div>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+// Regression test for crbug.com/635452
+
+if (window.internals)
+ internals.settings.setUnifiedTextCheckerEnabled(true);
+
+async_test(function(t) {
+ var div = document.getElementById('div');
+ div.focus();
+ document.execCommand("InsertText", false, 'z');
+ document.execCommand("InsertText", false, 'z');
+ document.execCommand("InsertText", false, ' ');
+ document.execCommand("InsertText", false, 'a');
+ document.execCommand("InsertText", false, 'p');
+ document.execCommand("InsertText", false, 'p');
+ document.execCommand("InsertText", false, 'l');
+ document.execCommand("InsertText", false, 'e');
+ step_timeout(() => {
+ assert_true(window.internals !== undefined, 'window.internals is required to inspect markers');
+ assert_true(internals.hasSpellingMarker(document, 0, 2), '"zz" should be marked');
+ t.done();
+ }, 50);
+}, 'Misspelled words should be marked after consecutive InsertText commands.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698