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

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

Issue 2451613003: Get rid of createVisibleSelection() taking two Position (Closed)
Patch Set: 2016-10-26T15:09:55 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/VisibleSelectionTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp b/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
index 8063d721bdf2933946627708bae48c1a43d79583..08b4238aa408db33f546d2b059607693931ec3dd 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
@@ -212,9 +212,11 @@ TEST_F(VisibleSelectionTest, ShadowCrossing) {
Element* one = body->querySelector("#one");
Element* six = shadowRoot->querySelector("#s6");
- VisibleSelection selection =
- createVisibleSelection(Position::firstPositionInNode(one),
- Position::lastPositionInNode(shadowRoot));
+ VisibleSelection selection = createVisibleSelection(
+ SelectionInDOMTree::Builder()
+ .collapse(Position::firstPositionInNode(one))
+ .extend(Position::lastPositionInNode(shadowRoot))
+ .build());
VisibleSelectionInFlatTree selectionInFlatTree = createVisibleSelection(
SelectionInFlatTree::Builder()
.collapse(PositionInFlatTree::firstPositionInNode(one))
@@ -245,8 +247,11 @@ TEST_F(VisibleSelectionTest, ShadowV0DistributedNodes) {
Element* two = body->querySelector("#two");
Element* five = shadowRoot->querySelector("#s5");
- VisibleSelection selection = createVisibleSelection(
- Position::firstPositionInNode(one), Position::lastPositionInNode(two));
+ VisibleSelection selection =
+ createVisibleSelection(SelectionInDOMTree::Builder()
+ .collapse(Position::firstPositionInNode(one))
+ .extend(Position::lastPositionInNode(two))
+ .build());
VisibleSelectionInFlatTree selectionInFlatTree = createVisibleSelection(
SelectionInFlatTree::Builder()
.collapse(PositionInFlatTree::firstPositionInNode(one))
@@ -288,9 +293,11 @@ TEST_F(VisibleSelectionTest, ShadowNested) {
Element* one = body->querySelector("#one");
Element* eight = shadowRoot2->querySelector("#s8");
- VisibleSelection selection =
- createVisibleSelection(Position::firstPositionInNode(one),
- Position::lastPositionInNode(shadowRoot2));
+ VisibleSelection selection = createVisibleSelection(
+ SelectionInDOMTree::Builder()
+ .collapse(Position::firstPositionInNode(one))
+ .extend(Position::lastPositionInNode(shadowRoot2))
+ .build());
VisibleSelectionInFlatTree selectionInFlatTree = createVisibleSelection(
SelectionInFlatTree::Builder()
.collapse(PositionInFlatTree::firstPositionInNode(one))

Powered by Google App Engine
This is Rietveld 408576698