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

Side by Side Diff: chrome/common/mac/objc_zombie_unittest.mm

Issue 7826016: [Mac] Enable CrZombie for all processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DEPS change. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« chrome/common/mac/DEPS ('K') | « chrome/common/mac/objc_zombie.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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 #include <dlfcn.h> 6 #include <dlfcn.h>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #import "base/memory/scoped_nsobject.h" 9 #import "base/memory/scoped_nsobject.h"
10 #import "chrome/browser/ui/cocoa/objc_zombie.h" 10 #import "chrome/common/mac/objc_zombie.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/platform_test.h" 12 #include "testing/platform_test.h"
13 13
14 namespace { 14 namespace {
15 15
16 // Dynamically look up |objc_setAssociatedObject()|, which isn't 16 // Dynamically look up |objc_setAssociatedObject()|, which isn't
17 // available until the 10.6 SDK. 17 // available until the 10.6 SDK.
18 18
19 typedef void objc_setAssociatedObjectFn(id object, void *key, id value, 19 typedef void objc_setAssociatedObjectFn(id object, void *key, id value,
20 int policy); 20 int policy);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // should be released. 125 // should be released.
126 soonInfected.reset(); 126 soonInfected.reset();
127 EXPECT_EQ(1u, [anObject retainCount]); 127 EXPECT_EQ(1u, [anObject retainCount]);
128 128
129 // The local reference should remain (associated objects not re-released). 129 // The local reference should remain (associated objects not re-released).
130 ObjcEvilDoers::ZombieDisable(); 130 ObjcEvilDoers::ZombieDisable();
131 EXPECT_EQ(1u, [anObject retainCount]); 131 EXPECT_EQ(1u, [anObject retainCount]);
132 } 132 }
133 133
134 } // namespace 134 } // namespace
OLDNEW
« chrome/common/mac/DEPS ('K') | « chrome/common/mac/objc_zombie.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698