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_length_utils.h" | 5 #include "core/layout/ng/ng_length_utils.h" |
6 | 6 |
7 #include "core/layout/ng/ng_box_fragment.h" | 7 #include "core/layout/ng/ng_box_fragment.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_constraint_space_builder.h" | 9 #include "core/layout/ng/ng_constraint_space_builder.h" |
10 #include "core/layout/ng/ng_fragment_builder.h" | 10 #include "core/layout/ng/ng_fragment_builder.h" |
11 #include "core/layout/ng/ng_physical_box_fragment.h" | 11 #include "core/layout/ng/ng_physical_box_fragment.h" |
12 #include "core/style/ComputedStyle.h" | 12 #include "core/style/ComputedStyle.h" |
13 #include "platform/CalculationValue.h" | 13 #include "platform/CalculationValue.h" |
14 #include "platform/LayoutUnit.h" | 14 #include "platform/LayoutUnit.h" |
15 #include "platform/Length.h" | 15 #include "platform/Length.h" |
| 16 #include "platform/wtf/RefPtr.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "wtf/RefPtr.h" | |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 namespace { | 20 namespace { |
21 | 21 |
22 class NGLengthUtilsTest : public ::testing::Test { | 22 class NGLengthUtilsTest : public ::testing::Test { |
23 protected: | 23 protected: |
24 void SetUp() override { style_ = ComputedStyle::Create(); } | 24 void SetUp() override { style_ = ComputedStyle::Create(); } |
25 | 25 |
26 static RefPtr<NGConstraintSpace> ConstructConstraintSpace( | 26 static RefPtr<NGConstraintSpace> ConstructConstraintSpace( |
27 int inline_size, | 27 int inline_size, |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 EXPECT_EQ(125, GetUsedColumnWidth(4, 100, 10, 530)); | 496 EXPECT_EQ(125, GetUsedColumnWidth(4, 100, 10, 530)); |
497 EXPECT_EQ(4, GetUsedColumnCount(4, 100, 10, 530)); | 497 EXPECT_EQ(4, GetUsedColumnCount(4, 100, 10, 530)); |
498 EXPECT_EQ(100, GetUsedColumnWidth(6, 100, 10, 540)); | 498 EXPECT_EQ(100, GetUsedColumnWidth(6, 100, 10, 540)); |
499 EXPECT_EQ(5, GetUsedColumnCount(6, 100, 10, 540)); | 499 EXPECT_EQ(5, GetUsedColumnCount(6, 100, 10, 540)); |
500 EXPECT_EQ(100, GetUsedColumnWidth(0, 100, 10, 540)); | 500 EXPECT_EQ(100, GetUsedColumnWidth(0, 100, 10, 540)); |
501 EXPECT_EQ(5, GetUsedColumnCount(0, 100, 10, 540)); | 501 EXPECT_EQ(5, GetUsedColumnCount(0, 100, 10, 540)); |
502 } | 502 } |
503 | 503 |
504 } // namespace | 504 } // namespace |
505 } // namespace blink | 505 } // namespace blink |
OLD | NEW |