| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "app/mac/nsimage_cache.h" | |
| 8 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 9 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
| 10 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 11 #include "chrome/common/chrome_constants.h" | 10 #include "chrome/common/chrome_constants.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "testing/platform_test.h" | 12 #include "testing/platform_test.h" |
| 13 #include "ui/gfx/mac/nsimage_cache.h" |
| 14 | 14 |
| 15 // This tests nsimage_cache, which lives in base/. The unit test is in | 15 // This tests nsimage_cache, which lives in base/. The unit test is in |
| 16 // chrome/ because it depends on having a built-up Chrome present. | 16 // chrome/ because it depends on having a built-up Chrome present. |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 class NSImageCacheTest : public PlatformTest { | 20 class NSImageCacheTest : public PlatformTest { |
| 21 public: | 21 public: |
| 22 NSImageCacheTest() { | 22 NSImageCacheTest() { |
| 23 // Look in the framework bundle for resources. | 23 // Look in the framework bundle for resources. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 EXPECT_TRUE([templateImage isTemplate] == YES) | 68 EXPECT_TRUE([templateImage isTemplate] == YES) |
| 69 << "Image ending in 'Template' should be marked as being a template"; | 69 << "Image ending in 'Template' should be marked as being a template"; |
| 70 NSImage *nonTemplateImage = | 70 NSImage *nonTemplateImage = |
| 71 app::mac::GetCachedImageWithName(@"aliasCursor.png"); | 71 app::mac::GetCachedImageWithName(@"aliasCursor.png"); |
| 72 EXPECT_FALSE([nonTemplateImage isTemplate] == YES) | 72 EXPECT_FALSE([nonTemplateImage isTemplate] == YES) |
| 73 << "Image not ending in 'Template' should not be marked as being a " | 73 << "Image not ending in 'Template' should not be marked as being a " |
| 74 "template"; | 74 "template"; |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace | 77 } // namespace |
| OLD | NEW |