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

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

Issue 2962473002: Make Position::LastPositionInNode() to take const Node& instead of Node* (Closed)
Patch Set: 2017-06-26T14:00:00 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/VisibleSelectionTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp b/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
index 1fa4edd23512f4ed478fa97cfb9972a7b7f014de..6fb33fc2f24b30dc729c0dbac22c02171926b3ad 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
@@ -254,7 +254,7 @@ TEST_F(VisibleSelectionTest, SelectAllWithInputElement) {
const VisibleSelection& visible_selectin_in_dom_tree = CreateVisibleSelection(
SelectionInDOMTree::Builder()
.Collapse(Position::FirstPositionInNode(*html_element))
- .Extend(Position::LastPositionInNode(html_element))
+ .Extend(Position::LastPositionInNode(*html_element))
.Build());
EXPECT_EQ(SelectionInDOMTree::Builder()
.Collapse(Position::BeforeNode(*input))
@@ -266,7 +266,7 @@ TEST_F(VisibleSelectionTest, SelectAllWithInputElement) {
CreateVisibleSelection(
SelectionInFlatTree::Builder()
.Collapse(PositionInFlatTree::FirstPositionInNode(*html_element))
- .Extend(PositionInFlatTree::LastPositionInNode(html_element))
+ .Extend(PositionInFlatTree::LastPositionInNode(*html_element))
.Build());
EXPECT_EQ(SelectionInFlatTree::Builder()
.Collapse(PositionInFlatTree::BeforeNode(*input))
@@ -293,12 +293,12 @@ TEST_F(VisibleSelectionTest, ShadowCrossing) {
VisibleSelection selection = CreateVisibleSelection(
SelectionInDOMTree::Builder()
.Collapse(Position::FirstPositionInNode(*one))
- .Extend(Position::LastPositionInNode(shadow_root))
+ .Extend(Position::LastPositionInNode(*shadow_root))
.Build());
VisibleSelectionInFlatTree selection_in_flat_tree = CreateVisibleSelection(
SelectionInFlatTree::Builder()
.Collapse(PositionInFlatTree::FirstPositionInNode(*one))
- .Extend(PositionInFlatTree::LastPositionInNode(host))
+ .Extend(PositionInFlatTree::LastPositionInNode(*host))
.Build());
EXPECT_EQ(Position(host, PositionAnchorType::kBeforeAnchor),
@@ -328,12 +328,12 @@ TEST_F(VisibleSelectionTest, ShadowV0DistributedNodes) {
VisibleSelection selection =
CreateVisibleSelection(SelectionInDOMTree::Builder()
.Collapse(Position::FirstPositionInNode(*one))
- .Extend(Position::LastPositionInNode(two))
+ .Extend(Position::LastPositionInNode(*two))
.Build());
VisibleSelectionInFlatTree selection_in_flat_tree = CreateVisibleSelection(
SelectionInFlatTree::Builder()
.Collapse(PositionInFlatTree::FirstPositionInNode(*one))
- .Extend(PositionInFlatTree::LastPositionInNode(two))
+ .Extend(PositionInFlatTree::LastPositionInNode(*two))
.Build());
EXPECT_EQ(Position(one->firstChild(), 0), selection.Start());
@@ -374,7 +374,7 @@ TEST_F(VisibleSelectionTest, ShadowNested) {
VisibleSelection selection = CreateVisibleSelection(
SelectionInDOMTree::Builder()
.Collapse(Position::FirstPositionInNode(*one))
- .Extend(Position::LastPositionInNode(shadow_root2))
+ .Extend(Position::LastPositionInNode(*shadow_root2))
.Build());
VisibleSelectionInFlatTree selection_in_flat_tree = CreateVisibleSelection(
SelectionInFlatTree::Builder()
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisiblePosition.cpp ('k') | third_party/WebKit/Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698