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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp

Issue 2428363004: Get rid of createVisibleSelection() taking PositionWithAffinity (Closed)
Patch Set: 2016-10-20T14:00:21 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
Index: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp
index 9c14cd3e9821d2a668edd123503a60e99a001f83..fc8ab49e3722e0bd6eaabca9561a61b7bbbfce7d 100644
--- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp
@@ -30,8 +30,9 @@ TEST_F(ReplaceSelectionCommandTest, pastingEmptySpan) {
setBodyContent("foo");
LocalFrame* frame = document().frame();
- frame->selection().setSelection(
- createVisibleSelection(Position(document().body(), 0)));
+ frame->selection().setSelection(SelectionInDOMTree::Builder()
+ .collapse(Position(document().body(), 0))
+ .build());
DocumentFragment* fragment = document().createDocumentFragment();
fragment->appendChild(document().createElement("span", ASSERT_NO_EXCEPTION));
@@ -55,7 +56,9 @@ TEST_F(ReplaceSelectionCommandTest, styleTagsInPastedHeadIncludedInContent) {
document().setDesignMode("on");
updateAllLifecyclePhases();
dummyPageHolder().frame().selection().setSelection(
- createVisibleSelection(Position(document().body(), 0)));
+ SelectionInDOMTree::Builder()
+ .collapse(Position(document().body(), 0))
+ .build());
DocumentFragment* fragment = document().createDocumentFragment();
fragment->parseHTML(

Powered by Google App Engine
This is Rietveld 408576698