OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gfx/size_base.h" | |
6 | |
7 #include "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "ui/gfx/size.h" | 6 #include "ui/gfx/geometry/size.h" |
9 #include "ui/gfx/size_conversions.h" | 7 #include "ui/gfx/geometry/size_base.h" |
10 #include "ui/gfx/size_f.h" | 8 #include "ui/gfx/geometry/size_conversions.h" |
| 9 #include "ui/gfx/geometry/size_f.h" |
11 | 10 |
12 namespace gfx { | 11 namespace gfx { |
13 | 12 |
14 namespace { | 13 namespace { |
15 | 14 |
16 int TestSizeF(const SizeF& s) { | 15 int TestSizeF(const SizeF& s) { |
17 return s.width(); | 16 return s.width(); |
18 } | 17 } |
19 | 18 |
20 } // namespace | 19 } // namespace |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 EXPECT_EQ(SizeF(8.5f, 10.5f).ToString(), a.ToString()); | 118 EXPECT_EQ(SizeF(8.5f, 10.5f).ToString(), a.ToString()); |
120 a.SetToMin(SizeF(11.5f, 9.5f)); | 119 a.SetToMin(SizeF(11.5f, 9.5f)); |
121 EXPECT_EQ(SizeF(8.5f, 9.5f).ToString(), a.ToString()); | 120 EXPECT_EQ(SizeF(8.5f, 9.5f).ToString(), a.ToString()); |
122 a.SetToMin(SizeF(7.5f, 11.5f)); | 121 a.SetToMin(SizeF(7.5f, 11.5f)); |
123 EXPECT_EQ(SizeF(7.5f, 9.5f).ToString(), a.ToString()); | 122 EXPECT_EQ(SizeF(7.5f, 9.5f).ToString(), a.ToString()); |
124 a.SetToMin(SizeF(3.5f, 5.5f)); | 123 a.SetToMin(SizeF(3.5f, 5.5f)); |
125 EXPECT_EQ(SizeF(3.5f, 5.5f).ToString(), a.ToString()); | 124 EXPECT_EQ(SizeF(3.5f, 5.5f).ToString(), a.ToString()); |
126 } | 125 } |
127 | 126 |
128 } // namespace gfx | 127 } // namespace gfx |
OLD | NEW |