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

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

Issue 2964893002: Make VisibleSelection::AppendTrailingWhitespace() as const function (Closed)
Patch Set: 2017-07-04T15:32:18 Created 3 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleSelection.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6fb33fc2f24b30dc729c0dbac22c02171926b3ad..4077327dc41f99cc19d2e69e094e41712aa9ad51 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
@@ -82,16 +82,16 @@ TEST_F(VisibleSelectionTest, appendTrailingWhitespaceWithAfterAnchor) {
// TODO(editing-dev): We should remove above comment once we fix [1].
// [1] http://crbug.com/701657 double-click on user-select:none should not
// compute selection.
- VisibleSelection selection =
+ const VisibleSelection selection =
CreateVisibleSelection(SelectionInDOMTree::Builder()
.Collapse(Position::BeforeNode(*input))
.Extend(Position::AfterNode(*input))
.SetGranularity(kWordGranularity)
.Build());
- selection.AppendTrailingWhitespace();
+ const VisibleSelection result = selection.AppendTrailingWhitespace();
- EXPECT_EQ(Position::BeforeNode(*input), selection.Start());
- EXPECT_EQ(Position::AfterNode(*input), selection.End());
+ EXPECT_EQ(Position::BeforeNode(*input), result.Start());
+ EXPECT_EQ(Position::AfterNode(*input), result.End());
}
TEST_F(VisibleSelectionTest, expandUsingGranularity) {
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698