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

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

Issue 1305963003: Introduce {next,previous}PositionOf() as replacement of {next,previous}() member functions in Positi (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-22T00:12:04 Rebase 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/Position.cpp ('k') | Source/core/editing/commands/ApplyBlockElementCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/PositionTest.cpp
diff --git a/Source/core/editing/PositionTest.cpp b/Source/core/editing/PositionTest.cpp
index 35c24027fea69dc6745555bc2270c86827f45217..c932b69fbaa101bf124a801b8dcade57c56475dd 100644
--- a/Source/core/editing/PositionTest.cpp
+++ b/Source/core/editing/PositionTest.cpp
@@ -26,6 +26,7 @@ TEST_F(PositionTest, downstreamAfterAnchor)
EXPECT_EQ(PositionInComposedTree::lastPositionInNode(host.get()), PositionInComposedTree::afterNode(host.get()).downstream());
}
+// TODO(yoisn) We should move |NextNodeIndex| to "EditingUtilitiesTest.cpp".
TEST_F(PositionTest, NextNodeIndex)
{
const char* bodyContent = "<p id='host'>00<b id='one'>11</b><b id='two'>22</b>33</p>";
@@ -35,8 +36,8 @@ TEST_F(PositionTest, NextNodeIndex)
Node* host = document().getElementById("host");
Node* two = document().getElementById("two");
- EXPECT_EQ(Position(host, 3), Position(two, 2).next());
- EXPECT_EQ(PositionInComposedTree(host, 1), PositionInComposedTree(two, 2).next());
+ EXPECT_EQ(Position(host, 3), nextPositionOf(Position(two, 2), PositionMoveType::CodePoint));
+ EXPECT_EQ(PositionInComposedTree(host, 1), nextPositionOf(PositionInComposedTree(two, 2), PositionMoveType::CodePoint));
}
TEST_F(PositionTest, NodeAsRangeLastNodeNull)
« no previous file with comments | « Source/core/editing/Position.cpp ('k') | Source/core/editing/commands/ApplyBlockElementCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698