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

Unified Diff: base/mac_util_unittest.mm

Issue 3560004: Refactor the code for loading icons into the PageInfoModel. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: cleanup Created 10 years, 3 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
« no previous file with comments | « base/mac_util.mm ('k') | chrome/browser/cocoa/page_info_bubble_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac_util_unittest.mm
diff --git a/base/mac_util_unittest.mm b/base/mac_util_unittest.mm
index f590ac1439d2730bad91d5458d2271a66ea2d2ec..45b3c0ebeabb4c9db22ee4ab5f67a472081cca51 100644
--- a/base/mac_util_unittest.mm
+++ b/base/mac_util_unittest.mm
@@ -180,6 +180,17 @@ TEST_F(MacUtilTest, CopyNSImageToCGImage) {
EXPECT_TRUE(cgImage.get());
}
+TEST_F(MacUtilTest, NSObjectRetainRelease) {
+ scoped_nsobject<NSArray> array([[NSArray alloc] initWithObjects:@"foo", nil]);
+ EXPECT_EQ(1U, [array retainCount]);
+
+ mac_util::NSObjectRetain(array);
+ EXPECT_EQ(2U, [array retainCount]);
+
+ mac_util::NSObjectRelease(array);
+ EXPECT_EQ(1U, [array retainCount]);
+}
+
} // namespace
} // namespace mac_util
« no previous file with comments | « base/mac_util.mm ('k') | chrome/browser/cocoa/page_info_bubble_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698