mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add comments to a test case in LayoutableShadowNodeTest
Summary: Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D21500371 fbshipit-source-id: daec07f82f43aae9cdc31f67599e30873ca108b9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
dd7b67168f
commit
cde82b55fc
@@ -192,15 +192,21 @@ TEST_F(LayoutableShadowNodeTest, relativeLayourMetricsOnClonedNode) {
|
||||
EXPECT_EQ(newRelativeLayoutMetrics.frame.size.height, 600);
|
||||
}
|
||||
|
||||
TEST_F(LayoutableShadowNodeTest, relativeLayoutMetricsOnSameNode2) {
|
||||
TEST_F(
|
||||
LayoutableShadowNodeTest,
|
||||
relativeLayoutMetricsOnNodesCrossingRootKindNode) {
|
||||
auto layoutMetrics = EmptyLayoutMetrics;
|
||||
nodeA_->setLayoutMetrics(layoutMetrics);
|
||||
layoutMetrics.frame.origin = {10, 10};
|
||||
// nodeAA_ is a RootKindNode. Please check
|
||||
// ShadowNodeTraits::Traits::RootNodeKind for details.
|
||||
nodeAA_->setLayoutMetrics(layoutMetrics);
|
||||
nodeAAA_->setLayoutMetrics(layoutMetrics);
|
||||
|
||||
auto relativeLayoutMetrics = nodeAAA_->getRelativeLayoutMetrics(*nodeA_, {});
|
||||
|
||||
// relativeLayoutMetrics do not include offsset of nodeAA_ because it is a
|
||||
// RootKindNode.
|
||||
EXPECT_EQ(relativeLayoutMetrics.frame.origin.x, 10);
|
||||
EXPECT_EQ(relativeLayoutMetrics.frame.origin.y, 10);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user