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

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

Issue 2954763002: [MarkersInter...Range #2-9] Change behavior of SpellChecker::GetSpellCheckMarkerTouchingSelection() (Closed)
Patch Set: Actually remove dependency Created 3 years, 5 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 7d96f013b0a3cab645cb20d0c68a674a98d885c3..ac439a1c889995449eb6bf1ba6e5745ffa19446e 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
@@ -128,8 +128,7 @@ TEST_F(SpellCheckerTest, MarkAndReplaceForHandlesMultipleReplacements) {
ToSpellCheckMarker(GetDocument().Markers().Markers()[0])->Description());
}
-TEST_F(SpellCheckerTest,
- GetSpellCheckMarkerTouchingSelection_FirstCharSelected) {
+TEST_F(SpellCheckerTest, GetSpellCheckMarkerUnderSelection_FirstCharSelected) {
SetBodyContent(
"<div contenteditable>"
"spllchck"
@@ -149,12 +148,11 @@ TEST_F(SpellCheckerTest,
GetDocument()
.GetFrame()
->GetSpellChecker()
- .GetSpellCheckMarkerTouchingSelection();
+ .GetSpellCheckMarkerUnderSelection();
EXPECT_TRUE(result);
}
-TEST_F(SpellCheckerTest,
- GetSpellCheckMarkerTouchingSelection_LastCharSelected) {
+TEST_F(SpellCheckerTest, GetSpellCheckMarkerUnderSelection_LastCharSelected) {
SetBodyContent(
"<div contenteditable>"
"spllchck"
@@ -174,12 +172,12 @@ TEST_F(SpellCheckerTest,
GetDocument()
.GetFrame()
->GetSpellChecker()
- .GetSpellCheckMarkerTouchingSelection();
+ .GetSpellCheckMarkerUnderSelection();
EXPECT_TRUE(result);
}
TEST_F(SpellCheckerTest,
- GetSpellCheckMarkerTouchingSelection_SingleCharWordSelected) {
+ GetSpellCheckMarkerUnderSelection_SingleCharWordSelected) {
SetBodyContent(
"<div contenteditable>"
"s"
@@ -199,12 +197,12 @@ TEST_F(SpellCheckerTest,
GetDocument()
.GetFrame()
->GetSpellChecker()
- .GetSpellCheckMarkerTouchingSelection();
+ .GetSpellCheckMarkerUnderSelection();
EXPECT_TRUE(result);
}
TEST_F(SpellCheckerTest,
- GetSpellCheckMarkerTouchingSelection_CaretLeftOfSingleCharWord) {
+ GetSpellCheckMarkerUnderSelection_CaretLeftOfSingleCharWord) {
SetBodyContent(
"<div contenteditable>"
"s"
@@ -224,12 +222,12 @@ TEST_F(SpellCheckerTest,
GetDocument()
.GetFrame()
->GetSpellChecker()
- .GetSpellCheckMarkerTouchingSelection();
- EXPECT_TRUE(result);
+ .GetSpellCheckMarkerUnderSelection();
+ EXPECT_FALSE(result);
}
TEST_F(SpellCheckerTest,
- GetSpellCheckMarkerTouchingSelection_CaretRightOfSingleCharWord) {
+ GetSpellCheckMarkerUnderSelection_CaretRightOfSingleCharWord) {
SetBodyContent(
"<div contenteditable>"
"s"
@@ -249,12 +247,12 @@ TEST_F(SpellCheckerTest,
GetDocument()
.GetFrame()
->GetSpellChecker()
- .GetSpellCheckMarkerTouchingSelection();
- EXPECT_TRUE(result);
+ .GetSpellCheckMarkerUnderSelection();
+ EXPECT_FALSE(result);
}
TEST_F(SpellCheckerTest,
- GetSpellCheckMarkerTouchingSelection_CaretLeftOfMultiCharWord) {
+ GetSpellCheckMarkerUnderSelection_CaretLeftOfMultiCharWord) {
SetBodyContent(
"<div contenteditable>"
"spllchck"
@@ -274,12 +272,12 @@ TEST_F(SpellCheckerTest,
GetDocument()
.GetFrame()
->GetSpellChecker()
- .GetSpellCheckMarkerTouchingSelection();
- EXPECT_TRUE(result);
+ .GetSpellCheckMarkerUnderSelection();
+ EXPECT_FALSE(result);
}
TEST_F(SpellCheckerTest,
- GetSpellCheckMarkerTouchingSelection_CaretRightOfMultiCharWord) {
+ GetSpellCheckMarkerUnderSelection_CaretRightOfMultiCharWord) {
SetBodyContent(
"<div contenteditable>"
"spllchck"
@@ -299,12 +297,11 @@ TEST_F(SpellCheckerTest,
GetDocument()
.GetFrame()
->GetSpellChecker()
- .GetSpellCheckMarkerTouchingSelection();
- EXPECT_TRUE(result);
+ .GetSpellCheckMarkerUnderSelection();
+ EXPECT_FALSE(result);
}
-TEST_F(SpellCheckerTest,
- GetSpellCheckMarkerTouchingSelection_CaretMiddleOfWord) {
+TEST_F(SpellCheckerTest, GetSpellCheckMarkerUnderSelection_CaretMiddleOfWord) {
SetBodyContent(
"<div contenteditable>"
"spllchck"
@@ -324,12 +321,12 @@ TEST_F(SpellCheckerTest,
GetDocument()
.GetFrame()
->GetSpellChecker()
- .GetSpellCheckMarkerTouchingSelection();
+ .GetSpellCheckMarkerUnderSelection();
EXPECT_TRUE(result);
}
TEST_F(SpellCheckerTest,
- GetSpellCheckMarkerTouchingSelection_CaretOneCharLeftOfMisspelling) {
+ GetSpellCheckMarkerUnderSelection_CaretOneCharLeftOfMisspelling) {
SetBodyContent(
"<div contenteditable>"
"a spllchck"
@@ -349,12 +346,12 @@ TEST_F(SpellCheckerTest,
GetDocument()
.GetFrame()
->GetSpellChecker()
- .GetSpellCheckMarkerTouchingSelection();
+ .GetSpellCheckMarkerUnderSelection();
EXPECT_FALSE(result);
}
TEST_F(SpellCheckerTest,
- GetSpellCheckMarkerTouchingSelection_CaretOneCharRightOfMisspelling) {
+ GetSpellCheckMarkerUnderSelection_CaretOneCharRightOfMisspelling) {
SetBodyContent(
"<div contenteditable>"
"spllchck a"
@@ -374,7 +371,7 @@ TEST_F(SpellCheckerTest,
GetDocument()
.GetFrame()
->GetSpellChecker()
- .GetSpellCheckMarkerTouchingSelection();
+ .GetSpellCheckMarkerUnderSelection();
EXPECT_FALSE(result);
}
« 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