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

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

Issue 2953683004: Make Position::AfterNode() to take const Node& instead of Node* (Closed)
Patch Set: 2017-06-22T12:37:16 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 e573b395bd6eb8ae322131f0a63034d1b5796b64..868b1b216f12043ce375203e55b1c51a6eb66773 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
@@ -85,13 +85,13 @@ TEST_F(VisibleSelectionTest, appendTrailingWhitespaceWithAfterAnchor) {
VisibleSelection selection =
CreateVisibleSelection(SelectionInDOMTree::Builder()
.Collapse(Position::BeforeNode(*input))
- .Extend(Position::AfterNode(input))
+ .Extend(Position::AfterNode(*input))
.SetGranularity(kWordGranularity)
.Build());
selection.AppendTrailingWhitespace();
EXPECT_EQ(Position::BeforeNode(*input), selection.Start());
- EXPECT_EQ(Position::AfterNode(input), selection.End());
+ EXPECT_EQ(Position::AfterNode(*input), selection.End());
}
TEST_F(VisibleSelectionTest, expandUsingGranularity) {
@@ -379,7 +379,7 @@ TEST_F(VisibleSelectionTest, ShadowNested) {
VisibleSelectionInFlatTree selection_in_flat_tree = CreateVisibleSelection(
SelectionInFlatTree::Builder()
.Collapse(PositionInFlatTree::FirstPositionInNode(one))
- .Extend(PositionInFlatTree::AfterNode(eight))
+ .Extend(PositionInFlatTree::AfterNode(*eight))
.Build());
EXPECT_EQ(Position(host, PositionAnchorType::kBeforeAnchor),
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleSelection.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