| 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 "base/basictypes.h" | 5 #include <stddef.h> |
| 6 |
| 7 #include "base/macros.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 7 #include "ui/gfx/geometry/insets.h" | 9 #include "ui/gfx/geometry/insets.h" |
| 8 #include "ui/gfx/geometry/vector2d.h" | 10 #include "ui/gfx/geometry/vector2d.h" |
| 9 #include "ui/gfx/shadow_value.h" | 11 #include "ui/gfx/shadow_value.h" |
| 10 | 12 |
| 11 namespace gfx { | 13 namespace gfx { |
| 12 | 14 |
| 13 TEST(ShadowValueTest, GetMargin) { | 15 TEST(ShadowValueTest, GetMargin) { |
| 14 const struct TestCase { | 16 const struct TestCase { |
| 15 Insets expected_margin; | 17 Insets expected_margin; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 for (size_t i = 0; i < arraysize(kTestCases); ++i) { | 57 for (size_t i = 0; i < arraysize(kTestCases); ++i) { |
| 56 Insets margin = ShadowValue::GetMargin( | 58 Insets margin = ShadowValue::GetMargin( |
| 57 ShadowValues(kTestCases[i].shadows, | 59 ShadowValues(kTestCases[i].shadows, |
| 58 kTestCases[i].shadows + kTestCases[i].shadow_count)); | 60 kTestCases[i].shadows + kTestCases[i].shadow_count)); |
| 59 | 61 |
| 60 EXPECT_EQ(kTestCases[i].expected_margin, margin) << " i=" << i; | 62 EXPECT_EQ(kTestCases[i].expected_margin, margin) << " i=" << i; |
| 61 } | 63 } |
| 62 } | 64 } |
| 63 | 65 |
| 64 } // namespace gfx | 66 } // namespace gfx |
| OLD | NEW |