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

Unified Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp

Issue 2919883002: Use ExpandToParagraphBoundary in SpellChecker::FindFirstMisspelling (Closed)
Patch Set: Created 3 years, 7 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 | « third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
index 3e393d9debebb8b2f0359a5b99e6cb2aaf27f42e..6fb41144337221bbca50d37d4080c75727ed9e82 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
@@ -55,6 +55,21 @@ TEST_F(SpellCheckerTest, AdvanceToNextMisspellingWithImageInTableNoCrash) {
GetDocument().GetFrame()->GetSpellChecker().AdvanceToNextMisspelling(false);
}
+// Regression test for crbug.com/728801
+TEST_F(SpellCheckerTest, AdvancedToNextMisspellingWrapSearchNoCrash) {
+ SetBodyContent("<div contenteditable> zz zz zz </div>");
+
+ Element* div = GetDocument().QuerySelector("div");
+ div->focus();
+ Selection().SetSelection(SelectionInDOMTree::Builder()
+ .Collapse(Position::LastPositionInNode(div))
+ .Build());
+ UpdateAllLifecyclePhases();
+
+ // TODO(xiaochengh): We should have SpellCheckTestBase::GetSpellChecker().
+ GetFrame().GetSpellChecker().AdvanceToNextMisspelling(false);
+}
+
TEST_F(SpellCheckerTest, SpellCheckDoesNotCauseUpdateLayout) {
SetBodyContent("<input>");
HTMLInputElement* input =
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698