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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelectionTest.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/FrameSelectionTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
index 6d5a5dac219497a5f3955e60337335a0314e012c..a3b1f9082724666df3aa1e877cd7249f5c215976 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
@@ -249,12 +249,12 @@ TEST_F(FrameSelectionTest, SelectAllWithInputElement) {
const SelectionInFlatTree& result_in_flat_tree =
Selection().ComputeVisibleSelectionInFlatTree().AsSelection();
EXPECT_EQ(SelectionInDOMTree::Builder(result_in_dom_tree)
- .Collapse(Position::BeforeNode(input))
+ .Collapse(Position::BeforeNode(*input))
.Extend(Position(last_child, 3))
.Build(),
result_in_dom_tree);
EXPECT_EQ(SelectionInFlatTree::Builder(result_in_flat_tree)
- .Collapse(PositionInFlatTree::BeforeNode(input))
+ .Collapse(PositionInFlatTree::BeforeNode(*input))
.Extend(PositionInFlatTree(last_child, 3))
.Build(),
result_in_flat_tree);
@@ -973,7 +973,7 @@ TEST_F(FrameSelectionTest, InconsistentVisibleSelectionNoCrash) {
// |start| and |end| are valid Positions in DOM tree, but do not participate
// 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& start = Position::BeforeNode(*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/EditingUtilities.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