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

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

Issue 2820203003: [DMC #4] Add SingletonMarkerListImpl (Closed)
Patch Set: 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 7b6148b6ed0926998089a8ff1af34c8d4c89c43b..29a348555d049a1d6f195daab1a1ab3e8f0a6bd6 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
@@ -1,3 +1,4 @@
+
/*
* Copyright (c) 2013, Google Inc. All rights reserved.
*
@@ -217,34 +218,6 @@ TEST_F(DocumentMarkerControllerTest, UpdateRenderedRects) {
EXPECT_NE(rendered_rects[0], new_rendered_rects[0]);
}
-TEST_F(DocumentMarkerControllerTest, UpdateRenderedRectsForComposition) {
- SetBodyInnerHTML("<div style='margin: 100px'>foo</div>");
- Element* div = ToElement(GetDocument().body()->FirstChild());
- MarkNodeContentsWithComposition(div);
- Vector<IntRect> rendered_rects =
- MarkerController().RenderedRectsForMarkers(DocumentMarker::kComposition);
- EXPECT_EQ(1u, rendered_rects.size());
-
- div->setAttribute(HTMLNames::styleAttr, "margin: 200px");
- GetDocument().UpdateStyleAndLayout();
- Vector<IntRect> new_rendered_rects =
- MarkerController().RenderedRectsForMarkers(DocumentMarker::kComposition);
- EXPECT_EQ(1u, new_rendered_rects.size());
- EXPECT_NE(rendered_rects[0], new_rendered_rects[0]);
-}
-
-TEST_F(DocumentMarkerControllerTest, CompositionMarkersNotMerged) {
- SetBodyInnerHTML("<div style='margin: 100px'>foo</div>");
- Node* text = GetDocument().body()->FirstChild()->firstChild();
- GetDocument().UpdateStyleAndLayout();
- MarkerController().AddCompositionMarker(Position(text, 0), Position(text, 1),
- Color::kBlack, false, Color::kBlack);
- MarkerController().AddCompositionMarker(Position(text, 1), Position(text, 3),
- Color::kBlack, true, Color::kBlack);
-
- EXPECT_EQ(2u, MarkerController().Markers().size());
-}
-
TEST_F(DocumentMarkerControllerTest, SetMarkerActiveTest) {
SetBodyInnerHTML("<b>foo</b>");
GetDocument().UpdateStyleAndLayout();

Powered by Google App Engine
This is Rietveld 408576698