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

Unified Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp

Issue 2829543002: [DMC #5] Add SpellCheckMarkerListImpl (Closed)
Patch Set: Clean up DocumentMarkerList/GenericDMLImpl Created 3 years, 8 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/markers/DocumentMarkerControllerTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
index 0e23593766962c11d7b8bb844db704ffee0dff20..88cacf5d5d3680e1f4ed43481ab0ae568d7039f3 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
@@ -72,8 +72,8 @@ void DocumentMarkerControllerTest::MarkNodeContents(Node* node) {
// DocumentMarkerControllerTest::addMarker(), needs them.
GetDocument().UpdateStyleAndLayout();
auto range = EphemeralRange::RangeOfContents(*node);
- MarkerController().AddMarker(range.StartPosition(), range.EndPosition(),
- DocumentMarker::kSpelling);
+ MarkerController().AddTextMatchMarker(range,
+ DocumentMarker::MatchStatus::kInactive);
}
void DocumentMarkerControllerTest::SetBodyInnerHTML(const char* body_content) {
@@ -195,13 +195,13 @@ TEST_F(DocumentMarkerControllerTest, UpdateRenderedRects) {
Element* div = ToElement(GetDocument().body()->firstChild());
MarkNodeContents(div);
Vector<IntRect> rendered_rects =
- MarkerController().RenderedRectsForMarkers(DocumentMarker::kSpelling);
+ MarkerController().RenderedRectsForMarkers(DocumentMarker::kTextMatch);
EXPECT_EQ(1u, rendered_rects.size());
div->setAttribute(HTMLNames::styleAttr, "margin: 200px");
GetDocument().UpdateStyleAndLayout();
Vector<IntRect> new_rendered_rects =
- MarkerController().RenderedRectsForMarkers(DocumentMarker::kSpelling);
+ MarkerController().RenderedRectsForMarkers(DocumentMarker::kTextMatch);
EXPECT_EQ(1u, new_rendered_rects.size());
EXPECT_NE(rendered_rects[0], new_rendered_rects[0]);
}

Powered by Google App Engine
This is Rietveld 408576698