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

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

Issue 2764783004: Add DocumentMarker::createTextMatchMarker() (Closed)
Patch Set: Rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bd1ef3ef1f9190d976b53c649df4d32823989d6d..7ed50ad1dd6a0869527d4f4ffb96bc34bf1815e3 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -1522,9 +1522,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);
// Delete "Initial"
Vector<CompositionUnderline> emptyUnderlines;
controller().setCompositionFromExistingText(emptyUnderlines, 0, 7);
@@ -1554,9 +1552,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);
@@ -1582,9 +1579,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);
@@ -1610,9 +1606,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;
@@ -1637,9 +1631,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;
@@ -1660,9 +1652,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;
@@ -1682,9 +1672,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;
@@ -1705,9 +1693,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;
@@ -1729,9 +1715,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;
@@ -1751,9 +1735,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());
@@ -1772,9 +1754,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());
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698