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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelectionTest.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/SelectionAdjusterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
index ab01e8b30cc746f71f9eb97d189592f46dec43ce..27daa7e2bb3d126ad60079b99be6039a6fff997c 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
@@ -290,8 +290,10 @@ TEST_F(FrameSelectionTest, setNonDirectionalSelectionIfNeeded) {
// top to bottom
selection().setNonDirectionalSelectionIfNeeded(
- createVisibleSelection(PositionInFlatTree(top, 1),
- PositionInFlatTree(bottom, 3)),
+ createVisibleSelection(SelectionInFlatTree::Builder()
+ .collapse(PositionInFlatTree(top, 1))
+ .extend(PositionInFlatTree(bottom, 3))
+ .build()),
CharacterGranularity);
EXPECT_EQ(Position(top, 1), visibleSelectionInDOMTree().base());
EXPECT_EQ(Position::beforeNode(host), visibleSelectionInDOMTree().extent());
@@ -306,8 +308,10 @@ TEST_F(FrameSelectionTest, setNonDirectionalSelectionIfNeeded) {
// bottom to top
selection().setNonDirectionalSelectionIfNeeded(
- createVisibleSelection(PositionInFlatTree(bottom, 3),
- PositionInFlatTree(top, 1)),
+ createVisibleSelection(SelectionInFlatTree::Builder()
+ .collapse(PositionInFlatTree(bottom, 3))
+ .extend(PositionInFlatTree(top, 1))
+ .build()),
CharacterGranularity);
EXPECT_EQ(Position(bottom, 3), visibleSelectionInDOMTree().base());
EXPECT_EQ(Position::beforeNode(bottom->parentNode()),
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/SelectionAdjusterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698