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_block_layout_algorithm.h" | 5 #include "core/layout/ng/ng_block_layout_algorithm.h" |
6 | 6 |
7 #include "core/layout/ng/ng_box_iterator.h" | 7 #include "core/layout/ng/ng_box_iterator.h" |
8 #include "core/layout/ng/ng_constraint_space.h" | 8 #include "core/layout/ng/ng_constraint_space.h" |
9 #include "core/layout/ng/ng_fragment.h" | 9 #include "core/layout/ng/ng_fragment.h" |
10 #include "core/style/ComputedStyle.h" | 10 #include "core/style/ComputedStyle.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 style_->setWidth(Length(30, Fixed)); | 24 style_->setWidth(Length(30, Fixed)); |
25 style_->setHeight(Length(40, Fixed)); | 25 style_->setHeight(Length(40, Fixed)); |
26 | 26 |
27 NGLogicalSize container_size; | 27 NGLogicalSize container_size; |
28 container_size.inlineSize = LayoutUnit(100); | 28 container_size.inlineSize = LayoutUnit(100); |
29 container_size.blockSize = LayoutUnit(-1); | 29 container_size.blockSize = LayoutUnit(-1); |
30 NGConstraintSpace space(container_size); | 30 NGConstraintSpace space(container_size); |
31 | 31 |
32 NGBlockLayoutAlgorithm algorithm(style_, NGBoxIterator(NGBox())); | 32 NGBlockLayoutAlgorithm algorithm(style_, NGBoxIterator(NGBox())); |
33 NGFragment* frag = algorithm.layout(space); | 33 NGFragment* frag = algorithm.layout(space); |
34 EXPECT_EQ(frag->inlineSize(), LayoutUnit(30)); | 34 EXPECT_EQ(frag->InlineSize(), LayoutUnit(30)); |
35 EXPECT_EQ(frag->blockSize(), LayoutUnit(40)); | 35 EXPECT_EQ(frag->BlockSize(), LayoutUnit(40)); |
36 } | 36 } |
37 | 37 |
38 } // namespace | 38 } // namespace |
39 } // namespace blink | 39 } // namespace blink |
OLD | NEW |