OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/layout/ng/ng_constraint_space.h" | 5 #include "core/layout/ng/ng_constraint_space.h" |
6 | 6 |
| 7 #include "core/layout/ng/ng_layout_opportunity_iterator.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
8 | 9 |
9 namespace blink { | 10 namespace blink { |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 TEST(NGConstraintSpaceTest, WritingMode) { | 14 TEST(NGConstraintSpaceTest, WritingMode) { |
14 NGConstraintSpace* horz_space = new NGConstraintSpace( | 15 NGConstraintSpace* horz_space = new NGConstraintSpace( |
15 HorizontalTopBottom, NGLogicalSize(LayoutUnit(200), LayoutUnit(100))); | 16 HorizontalTopBottom, NGLogicalSize(LayoutUnit(200), LayoutUnit(100))); |
16 horz_space->SetOverflowTriggersScrollbar(true, false); | 17 horz_space->SetOverflowTriggersScrollbar(true, false); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 EXPECT_EQ(LayoutUnit(500), firstOpportunity->Size().inline_size); | 84 EXPECT_EQ(LayoutUnit(500), firstOpportunity->Size().inline_size); |
84 EXPECT_EQ(LayoutUnit(400), firstOpportunity->Size().block_size); | 85 EXPECT_EQ(LayoutUnit(400), firstOpportunity->Size().block_size); |
85 | 86 |
86 const NGConstraintSpace* secondOpportunity = iterator->Next(); | 87 const NGConstraintSpace* secondOpportunity = iterator->Next(); |
87 EXPECT_EQ(nullptr, secondOpportunity); | 88 EXPECT_EQ(nullptr, secondOpportunity); |
88 } | 89 } |
89 | 90 |
90 } // namespace | 91 } // namespace |
91 | 92 |
92 } // namespace blink | 93 } // namespace blink |
OLD | NEW |