| Index: Source/core/editing/EditingUtilitiesTest.cpp
|
| diff --git a/Source/core/editing/EditingUtilitiesTest.cpp b/Source/core/editing/EditingUtilitiesTest.cpp
|
| index 17ecf820b31cbe1f3957d3b66ba23b50841f7bfc..b59de6ae640c2b9ac8576daeda2afa3a8f3bbe74 100644
|
| --- a/Source/core/editing/EditingUtilitiesTest.cpp
|
| +++ b/Source/core/editing/EditingUtilitiesTest.cpp
|
| @@ -31,6 +31,21 @@ TEST_F(EditingUtilitiesTest, firstEditablePositionAfterPositionInRoot)
|
| EXPECT_EQ(PositionInComposedTree::afterNode(host), firstEditablePositionAfterPositionInRoot(PositionInComposedTree(three, 0), host));
|
| }
|
|
|
| +TEST_F(EditingUtilitiesTest, enclosingBlock)
|
| +{
|
| + const char* bodyContent = "<p id='host'><b id='one'>11</b></p>";
|
| + const char* shadowContent = "<content select=#two></content><div id='three'><content select=#one></content></div>";
|
| + setBodyContent(bodyContent);
|
| + RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = setShadowContent(shadowContent);
|
| + updateLayoutAndStyleForPainting();
|
| + Node* host = document().getElementById("host");
|
| + Node* one = document().getElementById("one");
|
| + Node* three = shadowRoot->getElementById("three");
|
| +
|
| + EXPECT_EQ(host, enclosingBlock(Position(one, 0), CannotCrossEditingBoundary));
|
| + EXPECT_EQ(three, enclosingBlock(PositionInComposedTree(one, 0), CannotCrossEditingBoundary));
|
| +}
|
| +
|
| TEST_F(EditingUtilitiesTest, enclosingNodeOfType)
|
| {
|
| const char* bodyContent = "<p id='host'><b id='one'>11</b></p>";
|
|
|