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

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

Issue 2919913002: Add SpellCheckTestBase::GetSpellChecker() (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/SpellCheckTestBase.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 6fb41144337221bbca50d37d4080c75727ed9e82..9af84332759d182b69abeb7fa1fc8b885d6253ff 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
@@ -36,7 +36,7 @@ TEST_F(SpellCheckerTest, AdvanceToNextMisspellingWithEmptyInputNoCrash) {
Element* input = GetDocument().QuerySelector("input");
input->focus();
// Do not crash in advanceToNextMisspelling.
- GetDocument().GetFrame()->GetSpellChecker().AdvanceToNextMisspelling(false);
+ GetSpellChecker().AdvanceToNextMisspelling(false);
}
// Regression test for crbug.com/701309
@@ -52,7 +52,7 @@ TEST_F(SpellCheckerTest, AdvanceToNextMisspellingWithImageInTableNoCrash) {
UpdateAllLifecyclePhases();
// Do not crash in advanceToNextMisspelling.
- GetDocument().GetFrame()->GetSpellChecker().AdvanceToNextMisspelling(false);
+ GetSpellChecker().AdvanceToNextMisspelling(false);
}
// Regression test for crbug.com/728801
@@ -66,8 +66,7 @@ TEST_F(SpellCheckerTest, AdvancedToNextMisspellingWrapSearchNoCrash) {
.Build());
UpdateAllLifecyclePhases();
- // TODO(xiaochengh): We should have SpellCheckTestBase::GetSpellChecker().
- GetFrame().GetSpellChecker().AdvanceToNextMisspelling(false);
+ GetSpellChecker().AdvanceToNextMisspelling(false);
}
TEST_F(SpellCheckerTest, SpellCheckDoesNotCauseUpdateLayout) {
@@ -88,10 +87,10 @@ TEST_F(SpellCheckerTest, SpellCheckDoesNotCauseUpdateLayout) {
SelectionInDOMTree::Builder().Collapse(new_position).Build());
ASSERT_EQ(3u, input->selectionStart());
- EXPECT_TRUE(GetFrame().GetSpellChecker().IsSpellCheckingEnabled());
+ EXPECT_TRUE(GetSpellChecker().IsSpellCheckingEnabled());
ForceLayout();
int start_count = LayoutCount();
- GetFrame().GetSpellChecker().RespondToChangedSelection(
+ GetSpellChecker().RespondToChangedSelection(
old_selection.Start(),
FrameSelection::kCloseTyping | FrameSelection::kClearTypingStyle);
EXPECT_EQ(start_count, LayoutCount());
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellCheckTestBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698