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

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

Issue 7826016: [Mac] Enable CrZombie for all processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace, and verify merge. 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
« no previous file with comments | « chrome/common/mac/objc_method_swizzle.mm ('k') | chrome/common/mac/objc_zombie.h » ('j') | 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 "chrome/browser/ui/cocoa/objc_method_swizzle.h" 5 #import "chrome/common/mac/objc_method_swizzle.h"
6 6
7 #include "base/memory/scoped_nsobject.h" 7 #include "base/memory/scoped_nsobject.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 @interface ObjcMethodSwizzleTest : NSObject 10 @interface ObjcMethodSwizzleTest : NSObject
11 - (id)self; 11 - (id)self;
12 12
13 - (NSInteger)one; 13 - (NSInteger)one;
14 - (NSInteger)two; 14 - (NSInteger)two;
15 @end 15 @end
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 SwizzleImplementedInstanceMethods(testClass, @selector(one), @selector(two)); 67 SwizzleImplementedInstanceMethods(testClass, @selector(one), @selector(two));
68 EXPECT_EQ([object one], 2); 68 EXPECT_EQ([object one], 2);
69 EXPECT_EQ([object two], 1); 69 EXPECT_EQ([object two], 1);
70 70
71 SwizzleImplementedInstanceMethods(testClass, @selector(one), @selector(two)); 71 SwizzleImplementedInstanceMethods(testClass, @selector(one), @selector(two));
72 EXPECT_EQ([object one], 1); 72 EXPECT_EQ([object one], 1);
73 EXPECT_EQ([object two], 2); 73 EXPECT_EQ([object two], 2);
74 } 74 }
75 75
76 } // namespace ObjcEvilDoers 76 } // namespace ObjcEvilDoers
OLDNEW
« no previous file with comments | « chrome/common/mac/objc_method_swizzle.mm ('k') | chrome/common/mac/objc_zombie.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698