Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6442)

Unified Diff: chrome/browser/ui/cocoa/nsimage_cache_unittest.mm

Issue 7200045: Move app/mac/ files to ui/gfx/mac/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove more unused includes Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/nsimage_cache_unittest.mm
diff --git a/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm b/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm
index b3c336a3b8442b62288163bdbceea6309fc7261e..15175c1a325b5e4dc65dee9d0988b6bcaef91fe6 100644
--- a/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm
+++ b/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm
@@ -1,16 +1,16 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <Cocoa/Cocoa.h>
-#include "app/mac/nsimage_cache.h"
#include "base/file_path.h"
#include "base/mac/mac_util.h"
#include "base/path_service.h"
#include "chrome/common/chrome_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
+#include "ui/gfx/mac/nsimage_cache.h"
// This tests nsimage_cache, which lives in base/. The unit test is in
// chrome/ because it depends on having a built-up Chrome present.
@@ -32,30 +32,30 @@ class NSImageCacheTest : public PlatformTest {
};
TEST_F(NSImageCacheTest, LookupFound) {
- EXPECT_TRUE(app::mac::GetCachedImageWithName(@"product_logo_32.png") != nil)
+ EXPECT_TRUE(gfx::GetCachedImageWithName(@"product_logo_32.png") != nil)
<< "Failed to find the toolbar image?";
}
TEST_F(NSImageCacheTest, LookupCached) {
- EXPECT_EQ(app::mac::GetCachedImageWithName(@"product_logo_32.png"),
- app::mac::GetCachedImageWithName(@"product_logo_32.png"))
+ EXPECT_EQ(gfx::GetCachedImageWithName(@"product_logo_32.png"),
+ gfx::GetCachedImageWithName(@"product_logo_32.png"))
<< "Didn't get the same NSImage back?";
}
TEST_F(NSImageCacheTest, LookupMiss) {
- EXPECT_TRUE(app::mac::GetCachedImageWithName(@"should_not.exist") == nil)
+ EXPECT_TRUE(gfx::GetCachedImageWithName(@"should_not.exist") == nil)
<< "There shouldn't be an image with this name?";
}
TEST_F(NSImageCacheTest, LookupFoundAndClear) {
- NSImage *first = app::mac::GetCachedImageWithName(@"product_logo_32.png");
+ NSImage *first = gfx::GetCachedImageWithName(@"product_logo_32.png");
// Hang on to the first image so that the second one doesn't get allocated
// in the same location by (bad) luck.
[[first retain] autorelease];
EXPECT_TRUE(first != nil)
<< "Failed to find the toolbar image?";
- app::mac::ClearCachedImages();
- NSImage *second = app::mac::GetCachedImageWithName(@"product_logo_32.png");
+ gfx::ClearCachedImages();
+ NSImage *second = gfx::GetCachedImageWithName(@"product_logo_32.png");
EXPECT_TRUE(second != nil)
<< "Failed to find the toolbar image...again?";
EXPECT_NE(second, first)
@@ -64,11 +64,11 @@ TEST_F(NSImageCacheTest, LookupFoundAndClear) {
TEST_F(NSImageCacheTest, AutoTemplating) {
NSImage *templateImage =
- app::mac::GetCachedImageWithName(@"find_next_Template.pdf");
+ gfx::GetCachedImageWithName(@"find_next_Template.pdf");
EXPECT_TRUE([templateImage isTemplate] == YES)
<< "Image ending in 'Template' should be marked as being a template";
NSImage *nonTemplateImage =
- app::mac::GetCachedImageWithName(@"aliasCursor.png");
+ gfx::GetCachedImageWithName(@"aliasCursor.png");
EXPECT_FALSE([nonTemplateImage isTemplate] == YES)
<< "Image not ending in 'Template' should not be marked as being a "
"template";
« no previous file with comments | « chrome/browser/ui/cocoa/notifications/balloon_controller.mm ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698