mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Move ShadowNode::getAncestors to ShadowNodeFamily
Summary: Changelog: [internal] 1. Moves `ShadowNode::getAncestors` to `ShadowNodeFamily`. 2. Exposes shadowNode's family through `ShadowNode::getFamily()`. # Why? This is a first step in order to merge `StateCoordinator` into `ShadowNodeFamily` and use it as target for state updates. Reviewed By: shergin Differential Revision: D19465188 fbshipit-source-id: b5a3625aa21c040301259de02beedbf97e11f20e
This commit is contained in:
committed by
Facebook Github Bot
parent
8259a9d369
commit
01805636b9
@@ -222,18 +222,6 @@ TEST_F(ShadowNodeTest, handleCloneFunction) {
|
||||
EXPECT_EQ(nodeAB_->getProps(), nodeABClone->getProps());
|
||||
}
|
||||
|
||||
TEST_F(ShadowNodeTest, handleBacktracking) {
|
||||
// Negative case:
|
||||
auto ancestors1 = nodeZ_->getAncestors(*nodeA_);
|
||||
EXPECT_EQ(ancestors1.size(), 0);
|
||||
|
||||
// Positive case:
|
||||
auto ancestors2 = nodeABB_->getAncestors(*nodeA_);
|
||||
EXPECT_EQ(ancestors2.size(), 2);
|
||||
EXPECT_EQ(&ancestors2[0].first.get(), nodeA_.get());
|
||||
EXPECT_EQ(&ancestors2[1].first.get(), nodeAB_.get());
|
||||
}
|
||||
|
||||
TEST_F(ShadowNodeTest, handleState) {
|
||||
auto family = std::make_shared<ShadowNodeFamily>(
|
||||
ShadowNodeFamilyFragment{
|
||||
|
||||
Reference in New Issue
Block a user