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

Unified Diff: third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp

Issue 2764743004: Add DocumentMarker::createGrammarMarker() and createSpellingMarker() (Closed)
Patch Set: Created 3 years, 9 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/Source/core/editing/InputMethodControllerTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
index 382433bdc65d1a5df0acb92e64899cc1cac8d15f..0f1aac9ef3364a74a6aa46527a898f540698a556 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -1464,9 +1464,7 @@ TEST_F(InputMethodControllerTest,
// Add marker under "text" (use TextMatch since Composition markers don't
// persist across editing operations)
EphemeralRange markerRange = PlainTextRange(8, 12).createRange(*div);
- document().markers().addMarker(markerRange.startPosition(),
- markerRange.endPosition(),
- DocumentMarker::TextMatch);
+ document().markers().addTextMatchMarker(markerRange, false);
yosin_UTC9 2017/03/22 05:10:26 Please exclude addTextMatchmarker() changes.
// Delete "Initial"
Vector<CompositionUnderline> emptyUnderlines;
controller().setCompositionFromExistingText(emptyUnderlines, 0, 7);
@@ -1496,9 +1494,8 @@ TEST_F(InputMethodControllerTest,
// Add marker under " text" (use TextMatch since Composition markers don't
// persist across editing operations)
EphemeralRange markerRange = PlainTextRange(7, 12).createRange(*div);
- document().markers().addMarker(markerRange.startPosition(),
- markerRange.endPosition(),
- DocumentMarker::TextMatch);
+ document().markers().addTextMatchMarker(markerRange, false);
+
// Delete "Initial"
Vector<CompositionUnderline> emptyUnderlines;
controller().setCompositionFromExistingText(emptyUnderlines, 0, 7);
@@ -1524,9 +1521,8 @@ TEST_F(InputMethodControllerTest,
// Add marker under "text " (use TextMatch since Composition markers don't
// persist across editing operations)
EphemeralRange markerRange = PlainTextRange(8, 13).createRange(*div);
- document().markers().addMarker(markerRange.startPosition(),
- markerRange.endPosition(),
- DocumentMarker::TextMatch);
+ document().markers().addTextMatchMarker(markerRange, false);
+
// Delete "Initial"
Vector<CompositionUnderline> emptyUnderlines;
controller().setCompositionFromExistingText(emptyUnderlines, 0, 7);
@@ -1552,9 +1548,7 @@ TEST_F(InputMethodControllerTest,
// Add marker under " text " (use TextMatch since Composition markers don't
// persist across editing operations)
EphemeralRange markerRange = PlainTextRange(7, 13).createRange(*div);
- document().markers().addMarker(markerRange.startPosition(),
- markerRange.endPosition(),
- DocumentMarker::TextMatch);
+ document().markers().addTextMatchMarker(markerRange, false);
// Delete "Initial"
Vector<CompositionUnderline> emptyUnderlines;
@@ -1579,9 +1573,7 @@ TEST_F(InputMethodControllerTest, Marker_ReplaceStartOfMarker) {
// Add marker under "Initial text"
EphemeralRange markerRange = PlainTextRange(0, 12).createRange(*div);
- document().markers().addMarker(markerRange.startPosition(),
- markerRange.endPosition(),
- DocumentMarker::TextMatch);
+ document().markers().addTextMatchMarker(markerRange, false);
// Replace "Initial" with "Original"
Vector<CompositionUnderline> emptyUnderlines;
@@ -1602,9 +1594,7 @@ TEST_F(InputMethodControllerTest, Marker_ReplaceTextContainsStartOfMarker) {
// Add marker under "initial text"
EphemeralRange markerRange = PlainTextRange(13, 25).createRange(*div);
- document().markers().addMarker(markerRange.startPosition(),
- markerRange.endPosition(),
- DocumentMarker::TextMatch);
+ document().markers().addTextMatchMarker(markerRange, false);
// Replace "some initial" with "boring"
Vector<CompositionUnderline> emptyUnderlines;
@@ -1624,9 +1614,7 @@ TEST_F(InputMethodControllerTest, Marker_ReplaceEndOfMarker) {
// Add marker under "Initial text"
EphemeralRange markerRange = PlainTextRange(0, 12).createRange(*div);
- document().markers().addMarker(markerRange.startPosition(),
- markerRange.endPosition(),
- DocumentMarker::TextMatch);
+ document().markers().addTextMatchMarker(markerRange, false);
// Replace "text" with "string"
Vector<CompositionUnderline> emptyUnderlines;
@@ -1647,9 +1635,7 @@ TEST_F(InputMethodControllerTest, Marker_ReplaceTextContainsEndOfMarker) {
// Add marker under "some initial"
EphemeralRange markerRange = PlainTextRange(8, 20).createRange(*div);
- document().markers().addMarker(markerRange.startPosition(),
- markerRange.endPosition(),
- DocumentMarker::TextMatch);
+ document().markers().addTextMatchMarker(markerRange, false);
// Replace "initial text" with "content"
Vector<CompositionUnderline> emptyUnderlines;
@@ -1671,9 +1657,7 @@ TEST_F(InputMethodControllerTest, Marker_ReplaceEntireMarker) {
// Add marker under "text"
EphemeralRange markerRange = PlainTextRange(8, 12).createRange(*div);
- document().markers().addMarker(markerRange.startPosition(),
- markerRange.endPosition(),
- DocumentMarker::TextMatch);
+ document().markers().addTextMatchMarker(markerRange, false);
// Replace "text" with "string"
Vector<CompositionUnderline> emptyUnderlines;
@@ -1693,9 +1677,7 @@ TEST_F(InputMethodControllerTest, Marker_ReplaceTextWithMarkerAtBeginning) {
// Add marker under "Initial"
EphemeralRange markerRange = PlainTextRange(0, 7).createRange(*div);
- document().markers().addMarker(markerRange.startPosition(),
- markerRange.endPosition(),
- DocumentMarker::TextMatch);
+ document().markers().addTextMatchMarker(markerRange, false);
EXPECT_EQ(1u, document().markers().markers().size());
@@ -1714,9 +1696,7 @@ TEST_F(InputMethodControllerTest, Marker_ReplaceTextWithMarkerAtEnd) {
// Add marker under "text"
EphemeralRange markerRange = PlainTextRange(8, 12).createRange(*div);
- document().markers().addMarker(markerRange.startPosition(),
- markerRange.endPosition(),
- DocumentMarker::TextMatch);
+ document().markers().addTextMatchMarker(markerRange, false);
EXPECT_EQ(1u, document().markers().markers().size());

Powered by Google App Engine
This is Rietveld 408576698