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 d566ff080c633599465f68c011d17a0b816a22cf..e32a97a4237c6da5cf308df69fcab7e3b01b5485 100644 |
--- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp |
+++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp |
@@ -56,7 +56,7 @@ Text* FrameSelectionTest::appendTextNode(const String& data) { |
return text; |
} |
-TEST_F(FrameSelectionTest, FirstRange) { |
+TEST_F(FrameSelectionTest, FirstEphemeralRangeOf) { |
setBodyContent("<div id=sample>0123456789</div>abc"); |
Element* const sample = document().getElementById("sample"); |
Node* const text = sample->firstChild(); |
@@ -66,10 +66,11 @@ TEST_F(FrameSelectionTest, FirstRange) { |
sample->setAttribute(HTMLNames::styleAttr, "display:none"); |
// Move |VisibleSelection| before "abc". |
updateAllLifecyclePhases(); |
- Range* const range = selection().firstRange(); |
- EXPECT_EQ(Position(sample->nextSibling(), 0), range->startPosition()) |
+ const EphemeralRange& range = |
+ firstEphemeralRangeOf(selection().computeVisibleSelectionInDOMTree()); |
+ EXPECT_EQ(Position(sample->nextSibling(), 0), range.startPosition()) |
<< "firstRagne() should return current selection value"; |
- EXPECT_EQ(Position(sample->nextSibling(), 0), range->endPosition()); |
+ EXPECT_EQ(Position(sample->nextSibling(), 0), range.endPosition()); |
} |
TEST_F(FrameSelectionTest, SetValidSelection) { |