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

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

Issue 2953183004: Comment/test for DocumentMarkerList::MarkersIntersectingRange() with collapsed range (Closed)
Patch Set: Update comment, Empty => Collapsed Created 3 years, 6 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/DocumentMarkerListEditorTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditorTest.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditorTest.cpp
index 8c6b8a062b25794cb452982a99e69df9ca06eacf..a64dca4ac30c5c54acf6e7e2fc71a5f9de0aa442 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditorTest.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditorTest.cpp
@@ -452,6 +452,18 @@ TEST_F(DocumentMarkerListEditorTest,
EXPECT_EQ(10u, markers_intersecting_range[0]->EndOffset());
}
+TEST_F(DocumentMarkerListEditorTest, MarkersIntersectingRange_CollapsedRange) {
+ DocumentMarkerListEditor::MarkerList markers;
+ markers.push_back(CreateMarker(5, 10));
+
+ DocumentMarkerListEditor::MarkerList markers_intersecting_range =
+ DocumentMarkerListEditor::MarkersIntersectingRange(markers, 7, 7);
+ EXPECT_EQ(1u, markers_intersecting_range.size());
+
+ EXPECT_EQ(5u, markers_intersecting_range[0]->StartOffset());
+ EXPECT_EQ(10u, markers_intersecting_range[0]->EndOffset());
+}
+
TEST_F(DocumentMarkerListEditorTest, MarkersIntersectingRange_MultipleMarkers) {
DocumentMarkerListEditor::MarkerList markers;
markers.push_back(CreateMarker(0, 5));

Powered by Google App Engine
This is Rietveld 408576698