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

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

Issue 2953183004: Comment/test for DocumentMarkerList::MarkersIntersectingRange() with collapsed range (Closed)
Patch Set: Rebase Created 3 years, 5 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 | « third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d8231181e3ed92a20c96a3c7065fa44df80bb353..0dcb40bf294ba02d311d0b2dd1e69cece017079a 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditorTest.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditorTest.cpp
@@ -524,6 +524,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));
« no previous file with comments | « third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698