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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionControllerTest.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/SelectionControllerTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionControllerTest.cpp b/third_party/WebKit/Source/core/editing/SelectionControllerTest.cpp
index f3862271b22c7239732751a531d631aac646da07..07311939704190426c7cbd4215af83ec1c68cb47 100644
--- a/third_party/WebKit/Source/core/editing/SelectionControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionControllerTest.cpp
@@ -67,7 +67,7 @@ TEST_F(SelectionControllerTest, setNonDirectionalSelectionIfNeeded) {
.Build(),
kCharacterGranularity);
EXPECT_EQ(Position(top, 1), VisibleSelectionInDOMTree().Base());
- EXPECT_EQ(Position::BeforeNode(host), VisibleSelectionInDOMTree().Extent());
+ EXPECT_EQ(Position::BeforeNode(*host), VisibleSelectionInDOMTree().Extent());
EXPECT_EQ(Position(top, 1), VisibleSelectionInDOMTree().Start());
EXPECT_EQ(Position(top, 3), VisibleSelectionInDOMTree().End());
@@ -87,7 +87,7 @@ TEST_F(SelectionControllerTest, setNonDirectionalSelectionIfNeeded) {
.Build(),
kCharacterGranularity);
EXPECT_EQ(Position(bottom, 3), VisibleSelectionInDOMTree().Base());
- EXPECT_EQ(Position::BeforeNode(bottom->parentNode()),
+ EXPECT_EQ(Position::BeforeNode(*bottom->parentNode()),
VisibleSelectionInDOMTree().Extent());
EXPECT_EQ(Position(bottom, 0), VisibleSelectionInDOMTree().Start());
EXPECT_EQ(Position(bottom, 3), VisibleSelectionInDOMTree().End());

Powered by Google App Engine
This is Rietveld 408576698