Index: third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp |
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp b/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp |
index e5f731250be9231f725dfb76fb37d0432287b059..eb1a159bfc277f5004eb96f0e28b6292c947db53 100644 |
--- a/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp |
+++ b/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp |
@@ -22,7 +22,7 @@ TEST_F(EditingUtilitiesTest, directionOfEnclosingBlock) |
Node* one = document().getElementById("one"); |
EXPECT_EQ(LTR, directionOfEnclosingBlock(Position(one, 0))); |
- EXPECT_EQ(RTL, directionOfEnclosingBlock(PositionInComposedTree(one, 0))); |
+ EXPECT_EQ(RTL, directionOfEnclosingBlock(PositionInFlatTree(one, 0))); |
} |
TEST_F(EditingUtilitiesTest, firstEditablePositionAfterPositionInRoot) |
@@ -40,13 +40,13 @@ TEST_F(EditingUtilitiesTest, firstEditablePositionAfterPositionInRoot) |
EXPECT_EQ(Position(one, 0), firstEditablePositionAfterPositionInRoot(Position(one, 0), *host)); |
EXPECT_EQ(Position(one->firstChild(), 0), firstEditableVisiblePositionAfterPositionInRoot(Position(one, 0), *host).deepEquivalent()); |
- EXPECT_EQ(PositionInComposedTree(one, 0), firstEditablePositionAfterPositionInRoot(PositionInComposedTree(one, 0), *host)); |
- EXPECT_EQ(PositionInComposedTree(two->firstChild(), 2), firstEditableVisiblePositionAfterPositionInRoot(PositionInComposedTree(one, 0), *host).deepEquivalent()); |
+ EXPECT_EQ(PositionInFlatTree(one, 0), firstEditablePositionAfterPositionInRoot(PositionInFlatTree(one, 0), *host)); |
+ EXPECT_EQ(PositionInFlatTree(two->firstChild(), 2), firstEditableVisiblePositionAfterPositionInRoot(PositionInFlatTree(one, 0), *host).deepEquivalent()); |
EXPECT_EQ(Position::firstPositionInNode(host), firstEditablePositionAfterPositionInRoot(Position(three, 0), *host)); |
EXPECT_EQ(Position(one->firstChild(), 0), firstEditableVisiblePositionAfterPositionInRoot(Position(three, 0), *host).deepEquivalent()); |
- EXPECT_EQ(PositionInComposedTree::afterNode(host), firstEditablePositionAfterPositionInRoot(PositionInComposedTree(three, 0), *host)); |
- EXPECT_EQ(PositionInComposedTree::lastPositionInNode(host), firstEditableVisiblePositionAfterPositionInRoot(PositionInComposedTree(three, 0), *host).deepEquivalent()); |
+ EXPECT_EQ(PositionInFlatTree::afterNode(host), firstEditablePositionAfterPositionInRoot(PositionInFlatTree(three, 0), *host)); |
+ EXPECT_EQ(PositionInFlatTree::lastPositionInNode(host), firstEditableVisiblePositionAfterPositionInRoot(PositionInFlatTree(three, 0), *host).deepEquivalent()); |
} |
TEST_F(EditingUtilitiesTest, enclosingBlock) |
@@ -61,7 +61,7 @@ TEST_F(EditingUtilitiesTest, enclosingBlock) |
Node* three = shadowRoot->getElementById("three"); |
EXPECT_EQ(host, enclosingBlock(Position(one, 0), CannotCrossEditingBoundary)); |
- EXPECT_EQ(three, enclosingBlock(PositionInComposedTree(one, 0), CannotCrossEditingBoundary)); |
+ EXPECT_EQ(three, enclosingBlock(PositionInFlatTree(one, 0), CannotCrossEditingBoundary)); |
} |
TEST_F(EditingUtilitiesTest, enclosingNodeOfType) |
@@ -76,7 +76,7 @@ TEST_F(EditingUtilitiesTest, enclosingNodeOfType) |
Node* three = shadowRoot->getElementById("three"); |
EXPECT_EQ(host, enclosingNodeOfType(Position(one, 0), isEnclosingBlock)); |
- EXPECT_EQ(three, enclosingNodeOfType(PositionInComposedTree(one, 0), isEnclosingBlock)); |
+ EXPECT_EQ(three, enclosingNodeOfType(PositionInFlatTree(one, 0), isEnclosingBlock)); |
} |
TEST_F(EditingUtilitiesTest, isEditablePositionWithTable) |
@@ -108,19 +108,19 @@ TEST_F(EditingUtilitiesTest, isFirstPositionAfterTable) |
Node* table = document().getElementById("table"); |
EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(Position::afterNode(table)))); |
- EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInComposedTree::afterNode(table)))); |
+ EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInFlatTree::afterNode(table)))); |
EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(Position::lastPositionInNode(table)))); |
- EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInComposedTree::lastPositionInNode(table)))); |
+ EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInFlatTree::lastPositionInNode(table)))); |
EXPECT_EQ(nullptr, isFirstPositionAfterTable(createVisiblePosition(Position(host, 2)))); |
- EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInComposedTree(host, 2)))); |
+ EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInFlatTree(host, 2)))); |
EXPECT_EQ(nullptr, isFirstPositionAfterTable(createVisiblePosition(Position::afterNode(host)))); |
- EXPECT_EQ(nullptr, isFirstPositionAfterTable(createVisiblePosition(PositionInComposedTree::afterNode(host)))); |
+ EXPECT_EQ(nullptr, isFirstPositionAfterTable(createVisiblePosition(PositionInFlatTree::afterNode(host)))); |
EXPECT_EQ(nullptr, isFirstPositionAfterTable(createVisiblePosition(Position::lastPositionInNode(host)))); |
- EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInComposedTree::lastPositionInNode(host)))); |
+ EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInFlatTree::lastPositionInNode(host)))); |
} |
TEST_F(EditingUtilitiesTest, lastEditablePositionBeforePositionInRoot) |
@@ -138,13 +138,13 @@ TEST_F(EditingUtilitiesTest, lastEditablePositionBeforePositionInRoot) |
EXPECT_EQ(Position(one, 0), lastEditablePositionBeforePositionInRoot(Position(one, 0), *host)); |
EXPECT_EQ(Position(one->firstChild(), 0), lastEditableVisiblePositionBeforePositionInRoot(Position(one, 0), *host).deepEquivalent()); |
- EXPECT_EQ(PositionInComposedTree(one, 0), lastEditablePositionBeforePositionInRoot(PositionInComposedTree(one, 0), *host)); |
- EXPECT_EQ(PositionInComposedTree(two->firstChild(), 2), lastEditableVisiblePositionBeforePositionInRoot(PositionInComposedTree(one, 0), *host).deepEquivalent()); |
+ EXPECT_EQ(PositionInFlatTree(one, 0), lastEditablePositionBeforePositionInRoot(PositionInFlatTree(one, 0), *host)); |
+ EXPECT_EQ(PositionInFlatTree(two->firstChild(), 2), lastEditableVisiblePositionBeforePositionInRoot(PositionInFlatTree(one, 0), *host).deepEquivalent()); |
EXPECT_EQ(Position::firstPositionInNode(host), lastEditablePositionBeforePositionInRoot(Position(three, 0), *host)); |
EXPECT_EQ(Position(one->firstChild(), 0), lastEditableVisiblePositionBeforePositionInRoot(Position(three, 0), *host).deepEquivalent()); |
- EXPECT_EQ(PositionInComposedTree::firstPositionInNode(host), lastEditablePositionBeforePositionInRoot(PositionInComposedTree(three, 0), *host)); |
- EXPECT_EQ(PositionInComposedTree(two->firstChild(), 0), lastEditableVisiblePositionBeforePositionInRoot(PositionInComposedTree(three, 0), *host).deepEquivalent()); |
+ EXPECT_EQ(PositionInFlatTree::firstPositionInNode(host), lastEditablePositionBeforePositionInRoot(PositionInFlatTree(three, 0), *host)); |
+ EXPECT_EQ(PositionInFlatTree(two->firstChild(), 0), lastEditableVisiblePositionBeforePositionInRoot(PositionInFlatTree(three, 0), *host).deepEquivalent()); |
} |
TEST_F(EditingUtilitiesTest, NextNodeIndex) |
@@ -157,7 +157,7 @@ TEST_F(EditingUtilitiesTest, NextNodeIndex) |
Node* two = document().getElementById("two"); |
EXPECT_EQ(Position(host, 3), nextPositionOf(Position(two, 2), PositionMoveType::CodePoint)); |
- EXPECT_EQ(PositionInComposedTree(host, 1), nextPositionOf(PositionInComposedTree(two, 2), PositionMoveType::CodePoint)); |
+ EXPECT_EQ(PositionInFlatTree(host, 1), nextPositionOf(PositionInFlatTree(two, 2), PositionMoveType::CodePoint)); |
} |
TEST_F(EditingUtilitiesTest, NextVisuallyDistinctCandidate) |
@@ -172,7 +172,7 @@ TEST_F(EditingUtilitiesTest, NextVisuallyDistinctCandidate) |
Node* three = document().getElementById("three"); |
EXPECT_EQ(Position(two->firstChild(), 1), nextVisuallyDistinctCandidate(Position(one, 1))); |
- EXPECT_EQ(PositionInComposedTree(three->firstChild(), 1), nextVisuallyDistinctCandidate(PositionInComposedTree(one, 1))); |
+ EXPECT_EQ(PositionInFlatTree(three->firstChild(), 1), nextVisuallyDistinctCandidate(PositionInFlatTree(one, 1))); |
} |
TEST_F(EditingUtilitiesTest, AreaIdenticalElements) |