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/VisibleSelectionTest.cpp

Issue 2455083003: Reduce usage of VisibleSelection::setBase() and setExtent() (Closed)
Patch Set: 2016-10-31T10:31:10 Created 4 years, 2 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 08b4238aa408db33f546d2b059607693931ec3dd..c3920c06e60b584758e838afe94bcd3224a2234f 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
@@ -37,8 +37,11 @@ class VisibleSelectionTest : public EditingTestBase {
int base,
int extend) {
Node* node = document().body()->firstChild();
- selection.setBase(PositionTemplate<Strategy>(node, base));
- selection.setExtent(PositionTemplate<Strategy>(node, extend));
+ selection = createVisibleSelection(
+ typename SelectionTemplate<Strategy>::Builder(selection.asSelection())
+ .collapse(PositionTemplate<Strategy>(node, base))
+ .extend(PositionTemplate<Strategy>(node, extend))
+ .build());
}
};
« 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