| 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 "ash/common/system/tray/size_range_layout.h" | 5 #include "ash/system/tray/size_range_layout.h" |
| 6 #include "base/memory/ptr_util.h" | 6 #include "base/memory/ptr_util.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "ui/views/test/test_layout_manager.h" | 8 #include "ui/views/test/test_layout_manager.h" |
| 9 #include "ui/views/view.h" | 9 #include "ui/views/view.h" |
| 10 | 10 |
| 11 namespace ash { | 11 namespace ash { |
| 12 | 12 |
| 13 class SizeRangeLayoutTest : public testing::Test { | 13 class SizeRangeLayoutTest : public testing::Test { |
| 14 public: | 14 public: |
| 15 SizeRangeLayoutTest(); | 15 SizeRangeLayoutTest(); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 child_layout->set_preferred_height_for_width(kHeight); | 180 child_layout->set_preferred_height_for_width(kHeight); |
| 181 | 181 |
| 182 SizeRangeLayout layout; | 182 SizeRangeLayout layout; |
| 183 EXPECT_NE(kHeight, layout.GetPreferredHeightForWidth(&host_, kWidth)); | 183 EXPECT_NE(kHeight, layout.GetPreferredHeightForWidth(&host_, kWidth)); |
| 184 | 184 |
| 185 layout.SetLayoutManager(std::move(child_layout)); | 185 layout.SetLayoutManager(std::move(child_layout)); |
| 186 EXPECT_EQ(kHeight, layout.GetPreferredHeightForWidth(&host_, kWidth)); | 186 EXPECT_EQ(kHeight, layout.GetPreferredHeightForWidth(&host_, kWidth)); |
| 187 } | 187 } |
| 188 | 188 |
| 189 } // namespace ash | 189 } // namespace ash |
| OLD | NEW |