| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/base/cocoa/three_part_image.h" | 5 #include "ui/base/cocoa/three_part_image.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include <memory> |
| 8 |
| 8 #include "testing/gtest_mac.h" | 9 #include "testing/gtest_mac.h" |
| 9 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| 10 #import "ui/gfx/test/ui_cocoa_test_helper.h" | 11 #import "ui/gfx/test/ui_cocoa_test_helper.h" |
| 11 #include "ui/resources/grit/ui_resources.h" | 12 #include "ui/resources/grit/ui_resources.h" |
| 12 | 13 |
| 13 namespace ui { | 14 namespace ui { |
| 14 namespace test { | 15 namespace test { |
| 15 | 16 |
| 16 TEST(ThreePartImageTest, GetRects) { | 17 TEST(ThreePartImageTest, GetRects) { |
| 17 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 18 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 60 |
| 60 // The corners are transparent. | 61 // The corners are transparent. |
| 61 EXPECT_FALSE(image.HitTest(NSMakePoint(0, 0), bounds)); | 62 EXPECT_FALSE(image.HitTest(NSMakePoint(0, 0), bounds)); |
| 62 EXPECT_FALSE(image.HitTest(NSMakePoint(0, 127), bounds)); | 63 EXPECT_FALSE(image.HitTest(NSMakePoint(0, 127), bounds)); |
| 63 EXPECT_FALSE(image.HitTest(NSMakePoint(511, 0), bounds)); | 64 EXPECT_FALSE(image.HitTest(NSMakePoint(511, 0), bounds)); |
| 64 EXPECT_FALSE(image.HitTest(NSMakePoint(511, 127), bounds)); | 65 EXPECT_FALSE(image.HitTest(NSMakePoint(511, 127), bounds)); |
| 65 } | 66 } |
| 66 | 67 |
| 67 } // namespace test | 68 } // namespace test |
| 68 } // namespace ui | 69 } // namespace ui |
| OLD | NEW |