Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc |
| index bb2c8a3bfd8f09c84ee8aa63af482b8a83c76002..4818de074ad22b64a7a49d5bd227c19f93853a0d 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc |
| @@ -40,6 +40,21 @@ TEST(NGConstraintSpaceTest, WritingMode) { |
| EXPECT_EQ(FragmentNone, vert_space->BlockFragmentationType()); |
| } |
| +TEST(NGConstraintSpaceTest, LayoutOpportunities) { |
| + NGPhysicalSize physical_size; |
| + physical_size.width = LayoutUnit(600); |
| + physical_size.height = LayoutUnit(400); |
| + auto* physical_space = new NGPhysicalConstraintSpace(physical_size); |
| + auto* space = new NGConstraintSpace(HorizontalTopBottom, physical_space); |
| + |
| + bool for_inline_or_bfc = false; |
| + auto iterator = space->LayoutOpportunities(NGClearNone, for_inline_or_bfc); |
|
cbiesinger
2016/08/30 15:58:01
Should this be NGClearFragment...?
|
| + |
| + auto firstOppertunity = iterator.Next(); |
|
cbiesinger
2016/08/30 15:58:01
Since it's unclear what the type of this variable
|
| + EXPECT_EQ(LayoutUnit(600), firstOppertunity->Size().inline_size); |
| + EXPECT_EQ(LayoutUnit(400), firstOppertunity->Size().block_size); |
| +} |
| + |
| } // namespace |
| } // namespace blink |