| Index: ios/chrome/test/base/scoped_block_swizzler_unittest.mm
|
| diff --git a/ios/chrome/test/base/scoped_block_swizzler_unittest.mm b/ios/chrome/test/base/scoped_block_swizzler_unittest.mm
|
| index 9cbd66915cc1fd0b6359b5d3872fc12f6c38bbce..111cf104f95be9f0b4ba6e1aa2807694f4add133 100644
|
| --- a/ios/chrome/test/base/scoped_block_swizzler_unittest.mm
|
| +++ b/ios/chrome/test/base/scoped_block_swizzler_unittest.mm
|
| @@ -3,12 +3,15 @@
|
| // found in the LICENSE file.
|
|
|
| #include "base/mac/foundation_util.h"
|
| -#import "base/mac/scoped_nsobject.h"
|
| #include "ios/chrome/test/base/scoped_block_swizzler.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #import "testing/gtest_mac.h"
|
| #include "testing/platform_test.h"
|
|
|
| +#if !defined(__has_feature) || !__has_feature(objc_arc)
|
| +#error "This file requires ARC support."
|
| +#endif
|
| +
|
| // Class containing two methods that will be swizzled by the unittests.
|
| @interface ScopedBlockSwizzlerTestClass : NSObject
|
|
|
| @@ -45,9 +48,9 @@ ScopedBlockSwizzler swizzler([ScopedBlockSwizzlerTestClass class],
|
|
|
| // Tests that swizzling an instance method works properly.
|
| TEST(ScopedBlockSwizzlerTest, SwizzlingInstanceMethod) {
|
| - base::scoped_nsobject<ScopedBlockSwizzlerTestClass> target(
|
| - [[ScopedBlockSwizzlerTestClass alloc] init]);
|
| - target.get().value = kSwizzledInstanceValue;
|
| + ScopedBlockSwizzlerTestClass* target =
|
| + [[ScopedBlockSwizzlerTestClass alloc] init];
|
| + target.value = kSwizzledInstanceValue;
|
|
|
| EXPECT_NSEQ(kOriginalInstanceValue, [target instanceMethodToSwizzle]);
|
| EXPECT_FALSE([[target instanceMethodToSwizzle]
|
|
|