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

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

Issue 1313883002: Introduce firstRangeOf() as replacement of VisibleSelection::firstRange() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-25T17:47:14 Created 5 years, 4 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 | « Source/core/editing/VisibleSelection.cpp ('k') | Source/core/editing/commands/EditorCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/VisibleSelectionTest.cpp
diff --git a/Source/core/editing/VisibleSelectionTest.cpp b/Source/core/editing/VisibleSelectionTest.cpp
index 07e1250d3cc8a52cbd56012319d3126f5ff84bad..e173c61ab19edfbce9b2982ecd759be2429202cf 100644
--- a/Source/core/editing/VisibleSelectionTest.cpp
+++ b/Source/core/editing/VisibleSelectionTest.cpp
@@ -61,7 +61,7 @@ TEST_F(VisibleSelectionTest, Initialisation)
EXPECT_FALSE(selection.isNone());
EXPECT_TRUE(selection.isCaret());
- RefPtrWillBeRawPtr<Range> range = selection.firstRange();
+ RefPtrWillBeRawPtr<Range> range = firstRangeOf(selection);
EXPECT_EQ(0, range->startOffset());
EXPECT_EQ(0, range->endOffset());
EXPECT_EQ("", range->text());
@@ -141,7 +141,7 @@ TEST_F(VisibleSelectionTest, WordGranularity)
setSelection(selection, 0);
selection.expandUsingGranularity(WordGranularity);
- RefPtrWillBeRawPtr<Range> range = selection.firstRange();
+ RefPtrWillBeRawPtr<Range> range = firstRangeOf(selection);
EXPECT_EQ(0, range->startOffset());
EXPECT_EQ(5, range->endOffset());
EXPECT_EQ("Lorem", range->text());
@@ -154,7 +154,7 @@ TEST_F(VisibleSelectionTest, WordGranularity)
setSelection(selection, 8);
selection.expandUsingGranularity(WordGranularity);
- RefPtrWillBeRawPtr<Range> range = selection.firstRange();
+ RefPtrWillBeRawPtr<Range> range = firstRangeOf(selection);
EXPECT_EQ(6, range->startOffset());
EXPECT_EQ(11, range->endOffset());
EXPECT_EQ("ipsum", range->text());
@@ -169,7 +169,7 @@ TEST_F(VisibleSelectionTest, WordGranularity)
setSelection(selection, 5);
selection.expandUsingGranularity(WordGranularity);
- RefPtrWillBeRawPtr<Range> range = selection.firstRange();
+ RefPtrWillBeRawPtr<Range> range = firstRangeOf(selection);
EXPECT_EQ(5, range->startOffset());
EXPECT_EQ(6, range->endOffset());
EXPECT_EQ(" ", range->text());
@@ -183,7 +183,7 @@ TEST_F(VisibleSelectionTest, WordGranularity)
setSelection(selection, 26);
selection.expandUsingGranularity(WordGranularity);
- RefPtrWillBeRawPtr<Range> range = selection.firstRange();
+ RefPtrWillBeRawPtr<Range> range = firstRangeOf(selection);
EXPECT_EQ(26, range->startOffset());
EXPECT_EQ(27, range->endOffset());
EXPECT_EQ(",", range->text());
@@ -195,7 +195,7 @@ TEST_F(VisibleSelectionTest, WordGranularity)
setSelection(selection, 27);
selection.expandUsingGranularity(WordGranularity);
- RefPtrWillBeRawPtr<Range> range = selection.firstRange();
+ RefPtrWillBeRawPtr<Range> range = firstRangeOf(selection);
EXPECT_EQ(27, range->startOffset());
EXPECT_EQ(28, range->endOffset());
EXPECT_EQ(" ", range->text());
@@ -207,7 +207,7 @@ TEST_F(VisibleSelectionTest, WordGranularity)
setSelection(selection, 0, 1);
selection.expandUsingGranularity(WordGranularity);
- RefPtrWillBeRawPtr<Range> range = selection.firstRange();
+ RefPtrWillBeRawPtr<Range> range = firstRangeOf(selection);
EXPECT_EQ(0, range->startOffset());
EXPECT_EQ(5, range->endOffset());
EXPECT_EQ("Lorem", range->text());
@@ -219,7 +219,7 @@ TEST_F(VisibleSelectionTest, WordGranularity)
setSelection(selection, 2, 8);
selection.expandUsingGranularity(WordGranularity);
- RefPtrWillBeRawPtr<Range> range = selection.firstRange();
+ RefPtrWillBeRawPtr<Range> range = firstRangeOf(selection);
EXPECT_EQ(0, range->startOffset());
EXPECT_EQ(11, range->endOffset());
EXPECT_EQ("Lorem ipsum", range->text());
« no previous file with comments | « Source/core/editing/VisibleSelection.cpp ('k') | Source/core/editing/commands/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698