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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionAdjusterTest.cpp

Issue 2432383002: Get rid of flat tree version of createVisibleSelection() taking two PositionInFlatTree (Closed)
Patch Set: 2016-10-20T15:59:37 Created 4 years, 2 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/SelectionAdjusterTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionAdjusterTest.cpp b/third_party/WebKit/Source/core/editing/SelectionAdjusterTest.cpp
index c643c2cef0bbdd9f2da1d9d664a780f59c07e2e5..b15506626927185b952a4264d19438562cca42ce 100644
--- a/third_party/WebKit/Source/core/editing/SelectionAdjusterTest.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionAdjusterTest.cpp
@@ -31,8 +31,11 @@ TEST_F(SelectionAdjusterTest, adjustSelectionInDOMTree) {
Node* const sample = document().getElementById("sample");
Node* const foo = sample->firstChild();
// Select "foo"
- VisibleSelectionInFlatTree selectionInFlatTree = createVisibleSelection(
- PositionInFlatTree(foo, 0), PositionInFlatTree(foo, 3));
+ VisibleSelectionInFlatTree selectionInFlatTree =
+ createVisibleSelection(SelectionInFlatTree::Builder()
+ .collapse(PositionInFlatTree(foo, 0))
+ .extend(PositionInFlatTree(foo, 3))
+ .build());
SelectionAdjuster::adjustSelectionInDOMTree(&selection, selectionInFlatTree);
EXPECT_EQ(Position(foo, 0), selection.start());
EXPECT_EQ(Position(foo, 3), selection.end());

Powered by Google App Engine
This is Rietveld 408576698