Index: Source/core/editing/SurroundingTextTest.cpp |
diff --git a/Source/core/editing/SurroundingTextTest.cpp b/Source/core/editing/SurroundingTextTest.cpp |
index 69b71d05ae25596467ffc90057c4d458604bc2aa..052cdfc4a7a09456880bab79e4ecc5e0f7ae0233 100644 |
--- a/Source/core/editing/SurroundingTextTest.cpp |
+++ b/Source/core/editing/SurroundingTextTest.cpp |
@@ -116,7 +116,7 @@ TEST_F(SurroundingTextTest, BasicRangeSelection) |
{ |
VisibleSelection selection = select(0, 5); |
- SurroundingText surroundingText(*selection.firstRange(), 1); |
+ SurroundingText surroundingText(*firstRangeOf(selection), 1); |
EXPECT_EQ("Lorem ", surroundingText.content()); |
EXPECT_EQ(0u, surroundingText.startOffsetInContent()); |
@@ -125,7 +125,7 @@ TEST_F(SurroundingTextTest, BasicRangeSelection) |
{ |
VisibleSelection selection = select(0, 5); |
- SurroundingText surroundingText(*selection.firstRange(), 5); |
+ SurroundingText surroundingText(*firstRangeOf(selection), 5); |
EXPECT_EQ("Lorem ip", surroundingText.content().simplifyWhiteSpace()); |
EXPECT_EQ(1u, surroundingText.startOffsetInContent()); |
@@ -134,7 +134,7 @@ TEST_F(SurroundingTextTest, BasicRangeSelection) |
{ |
VisibleSelection selection = select(0, 5); |
- SurroundingText surroundingText(*selection.firstRange(), 42); |
+ SurroundingText surroundingText(*firstRangeOf(selection), 42); |
EXPECT_EQ("Lorem ipsum dolor sit amet", surroundingText.content().simplifyWhiteSpace()); |
EXPECT_EQ(1u, surroundingText.startOffsetInContent()); |
@@ -143,7 +143,7 @@ TEST_F(SurroundingTextTest, BasicRangeSelection) |
{ |
VisibleSelection selection = select(6, 11); |
- SurroundingText surroundingText(*selection.firstRange(), 2); |
+ SurroundingText surroundingText(*firstRangeOf(selection), 2); |
EXPECT_EQ(" ipsum ", surroundingText.content()); |
EXPECT_EQ(1u, surroundingText.startOffsetInContent()); |
@@ -152,7 +152,7 @@ TEST_F(SurroundingTextTest, BasicRangeSelection) |
{ |
VisibleSelection selection = select(6, 11); |
- SurroundingText surroundingText(*selection.firstRange(), 42); |
+ SurroundingText surroundingText(*firstRangeOf(selection), 42); |
EXPECT_EQ("Lorem ipsum dolor sit amet", surroundingText.content().simplifyWhiteSpace()); |
EXPECT_EQ(7u, surroundingText.startOffsetInContent()); |
@@ -216,7 +216,7 @@ TEST_F(SurroundingTextTest, TreeRangeSelection) |
{ |
VisibleSelection selection = select(0, 1); |
- SurroundingText surroundingText(*selection.firstRange(), 1); |
+ SurroundingText surroundingText(*firstRangeOf(selection), 1); |
EXPECT_EQ("fo", surroundingText.content().simplifyWhiteSpace()); |
EXPECT_EQ(0u, surroundingText.startOffsetInContent()); |
@@ -225,7 +225,7 @@ TEST_F(SurroundingTextTest, TreeRangeSelection) |
{ |
VisibleSelection selection = select(0, 3); |
- SurroundingText surroundingText(*selection.firstRange(), 12); |
+ SurroundingText surroundingText(*firstRangeOf(selection), 12); |
EXPECT_EQ("e of foo bar", surroundingText.content().simplifyWhiteSpace()); |
EXPECT_EQ(5u, surroundingText.startOffsetInContent()); |
@@ -234,7 +234,7 @@ TEST_F(SurroundingTextTest, TreeRangeSelection) |
{ |
VisibleSelection selection = select(0, 3); |
- SurroundingText surroundingText(*selection.firstRange(), 1337); |
+ SurroundingText surroundingText(*firstRangeOf(selection), 1337); |
EXPECT_EQ("This is outside of foo bar the selected node", surroundingText.content().simplifyWhiteSpace()); |
EXPECT_EQ(20u, surroundingText.startOffsetInContent()); |
@@ -243,7 +243,7 @@ TEST_F(SurroundingTextTest, TreeRangeSelection) |
{ |
VisibleSelection selection = select(4, 7); |
- SurroundingText surroundingText(*selection.firstRange(), 12); |
+ SurroundingText surroundingText(*firstRangeOf(selection), 12); |
EXPECT_EQ("foo bar the se", surroundingText.content().simplifyWhiteSpace()); |
EXPECT_EQ(5u, surroundingText.startOffsetInContent()); |
@@ -252,7 +252,7 @@ TEST_F(SurroundingTextTest, TreeRangeSelection) |
{ |
VisibleSelection selection = select(0, 7); |
- SurroundingText surroundingText(*selection.firstRange(), 1337); |
+ SurroundingText surroundingText(*firstRangeOf(selection), 1337); |
EXPECT_EQ("This is outside of foo bar the selected node", surroundingText.content().simplifyWhiteSpace()); |
EXPECT_EQ(20u, surroundingText.startOffsetInContent()); |