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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelectionTest.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/FrameSelectionTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
index a3b1f9082724666df3aa1e877cd7249f5c215976..9fc95a618e6d1a2b8541e53edad80acd5c90ba7b 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
@@ -371,7 +371,7 @@ TEST_F(FrameSelectionTest, SelectInvalidPositionInFlatTreeDoesntCrash) {
Selection().SetSelection(SelectionInDOMTree::Builder()
.Collapse(Position(body, 0))
// SELECT@AfterAnchor is invalid in flat tree.
- .Extend(Position::AfterNode(select))
+ .Extend(Position::AfterNode(*select))
.Build());
// Should not crash inside.
const VisibleSelectionInFlatTree& selection =
@@ -974,7 +974,7 @@ TEST_F(FrameSelectionTest, InconsistentVisibleSelectionNoCrash) {
// in flat tree. They should be canonicalized to null VisiblePositions, but
// are currently not. See crbug.com/729636 for details.
const Position& start = Position::BeforeNode(*anchor);
- const Position& end = Position::AfterNode(anchor);
+ const Position& end = Position::AfterNode(*anchor);
Selection().SetSelection(
SelectionInDOMTree::Builder().Collapse(start).Extend(end).Build());
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp ('k') | third_party/WebKit/Source/core/editing/Position.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698