| Index: Source/core/editing/VisibleUnitsTest.cpp
|
| diff --git a/Source/core/editing/VisibleUnitsTest.cpp b/Source/core/editing/VisibleUnitsTest.cpp
|
| index b353f78d5a77adf138ec9897b2d9bdd433cd2e95..7ab1afcfa5054e4fd1b50b15cc7a08c67ca26820 100644
|
| --- a/Source/core/editing/VisibleUnitsTest.cpp
|
| +++ b/Source/core/editing/VisibleUnitsTest.cpp
|
| @@ -74,6 +74,25 @@ TEST_F(VisibleUnitsTest, characterAfter)
|
| EXPECT_EQ('1', characterAfter(createVisiblePositionInComposedTree(*two->firstChild(), 2)));
|
| }
|
|
|
| +TEST_F(VisibleUnitsTest, endOfParagraph)
|
| +{
|
| + const char* bodyContent = "<a id=host><b id=one>1</b><b id=two>22</b></a><b id=three>333</b>";
|
| + const char* shadowContent = "<p><content select=#two></content></p><p><content select=#one></content></p>";
|
| + setBodyContent(bodyContent);
|
| + setShadowContent(shadowContent, "host");
|
| + updateLayoutAndStyleForPainting();
|
| +
|
| + Element* one = document().getElementById("one");
|
| + Element* two = document().getElementById("two");
|
| + Element* three = document().getElementById("three");
|
| +
|
| + EXPECT_EQ(Position(three->firstChild(), 3), endOfParagraph(createVisiblePositionInDOMTree(*one->firstChild(), 1)).deepEquivalent());
|
| + EXPECT_EQ(PositionInComposedTree(one->firstChild(), 1), endOfParagraph(createVisiblePositionInComposedTree(*one->firstChild(), 1)).deepEquivalent());
|
| +
|
| + EXPECT_EQ(Position(three->firstChild(), 3), endOfParagraph(createVisiblePositionInDOMTree(*two->firstChild(), 2)).deepEquivalent());
|
| + EXPECT_EQ(PositionInComposedTree(two->firstChild(), 2), endOfParagraph(createVisiblePositionInComposedTree(*two->firstChild(), 2)).deepEquivalent());
|
| +}
|
| +
|
| TEST_F(VisibleUnitsTest, inSameLine)
|
| {
|
| const char* bodyContent = "<p id='host'>00<b id='one'>11</b><b id='two'>22</b>33</p>";
|
|
|