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

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

Issue 2950053002: Make Position::BeforeNode() to take const Node& instead of Node* (Closed)
Patch Set: 2017-06-21T17:56:36 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 3006f6dc9897112cb1199ba39ffcfe0f20451181..e573b395bd6eb8ae322131f0a63034d1b5796b64 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
@@ -84,13 +84,13 @@ TEST_F(VisibleSelectionTest, appendTrailingWhitespaceWithAfterAnchor) {
// compute selection.
VisibleSelection selection =
CreateVisibleSelection(SelectionInDOMTree::Builder()
- .Collapse(Position::BeforeNode(input))
+ .Collapse(Position::BeforeNode(*input))
.Extend(Position::AfterNode(input))
.SetGranularity(kWordGranularity)
.Build());
selection.AppendTrailingWhitespace();
- EXPECT_EQ(Position::BeforeNode(input), selection.Start());
+ EXPECT_EQ(Position::BeforeNode(*input), selection.Start());
EXPECT_EQ(Position::AfterNode(input), selection.End());
}
@@ -257,7 +257,7 @@ TEST_F(VisibleSelectionTest, SelectAllWithInputElement) {
.Extend(Position::LastPositionInNode(html_element))
.Build());
EXPECT_EQ(SelectionInDOMTree::Builder()
- .Collapse(Position::BeforeNode(input))
+ .Collapse(Position::BeforeNode(*input))
.Extend(Position(last_child, 3))
.Build(),
visible_selectin_in_dom_tree.AsSelection());
@@ -269,7 +269,7 @@ TEST_F(VisibleSelectionTest, SelectAllWithInputElement) {
.Extend(PositionInFlatTree::LastPositionInNode(html_element))
.Build());
EXPECT_EQ(SelectionInFlatTree::Builder()
- .Collapse(PositionInFlatTree::BeforeNode(input))
+ .Collapse(PositionInFlatTree::BeforeNode(*input))
.Extend(PositionInFlatTree(last_child, 3))
.Build(),
visible_selectin_in_flat_tree.AsSelection());

Powered by Google App Engine
This is Rietveld 408576698