Fix issue in gentest where border-<edge> would add a border to test (#1496)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1496 Gentest code has a problem where we try to apply a border in our test when the web browser is not actually adding one. This happens when we do something like `border-top: 10px`. This will actually set the style of the border to `initial` which is just `none`, so nothing renders. This is causing at least 1 test to pass when it actually fails. I changed it so we ignore setting this value if the style is one of these values. I then re-ran the gentest code and excluded the now failing test (which gets fixed in my static stack). Reviewed By: NickGerleman Differential Revision: D51831754 fbshipit-source-id: a325e4a42b2d7cd6f19efc6cd5a2445574467fb7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7b3b66d288
commit
c93734f579
@@ -1124,6 +1124,7 @@ public class YGAbsolutePositionTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void test_absolute_layout_percentage_height_based_on_padded_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
@@ -1149,9 +1150,9 @@ public class YGAbsolutePositionTest {
|
||||
assertEquals(100f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(20f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0.getLayoutHeight(), 0.0f);
|
||||
assertEquals(45f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
|
||||
@@ -1162,9 +1163,9 @@ public class YGAbsolutePositionTest {
|
||||
assertEquals(100f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(20f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0.getLayoutHeight(), 0.0f);
|
||||
assertEquals(45f, root_child0.getLayoutHeight(), 0.0f);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user