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

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

Issue 1347313002: Don't merge adjacent composition markers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unnecessary toElement() call in the unit test Created 5 years, 3 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 | « Source/core/editing/markers/DocumentMarkerController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/markers/DocumentMarkerControllerTest.cpp
diff --git a/Source/core/editing/markers/DocumentMarkerControllerTest.cpp b/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
index 1f04a20d18c38fac8163f21aabcb8a2a79f1b0c0..fc068d6cc31c319f64e409d52cd0da855419ad81 100644
--- a/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
+++ b/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
@@ -245,4 +245,17 @@ TEST_F(DocumentMarkerControllerTest, UpdateRenderedRectsForComposition)
EXPECT_NE(renderedRects[0], newRenderedRects[0]);
}
+TEST_F(DocumentMarkerControllerTest, CompositionMarkersNotMerged)
+{
+ IntRect invalidRect(RenderedDocumentMarker::create(DocumentMarker(0, 0, false))->renderedRect());
+
+ setBodyInnerHTML("<div style='margin: 100px'>foo</div>");
+ RefPtrWillBeRawPtr<Node> text = document().body()->firstChild()->firstChild();
+ document().updateLayout();
+ markerController().addCompositionMarker(Position(text, 0), Position(text, 1), Color::black, false, Color::black);
+ markerController().addCompositionMarker(Position(text, 1), Position(text, 3), Color::black, true, Color::black);
+
+ EXPECT_EQ(2u, markerController().markers().size());
+}
+
} // namespace blink
« no previous file with comments | « Source/core/editing/markers/DocumentMarkerController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698