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

Unified Diff: ios/chrome/browser/geolocation/location_manager_unittest.mm

Issue 2515723003: [ObjC ARC] Converts ios/chrome/browser/geolocation:unit_tests to ARC.Automatically generated ARCM… (Closed)
Patch Set: Created 4 years, 1 month 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: ios/chrome/browser/geolocation/location_manager_unittest.mm
diff --git a/ios/chrome/browser/geolocation/location_manager_unittest.mm b/ios/chrome/browser/geolocation/location_manager_unittest.mm
index 6b7e7f112b8ae3ab7ee783d0115298e1fbfbe13b..2b2ca9bc322ee1dec7c9329c9b37f318442f4c84 100644
--- a/ios/chrome/browser/geolocation/location_manager_unittest.mm
+++ b/ios/chrome/browser/geolocation/location_manager_unittest.mm
@@ -14,6 +14,10 @@
#import "third_party/ocmock/OCMock/OCMock.h"
#import "third_party/ocmock/gtest_support.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
class LocationManagerTest : public PlatformTest {
@@ -25,7 +29,7 @@ class LocationManagerTest : public PlatformTest {
PlatformTest::SetUp();
mock_geolocation_updater_.reset(
- [[OCMockObject mockForProtocol:@protocol(GeolocationUpdater)] retain]);
+ [OCMockObject mockForProtocol:@protocol(GeolocationUpdater)]);
// Set up LocationManager with a mock GeolocationUpdater.
location_manager_.reset([[LocationManager alloc] init]);
@@ -66,7 +70,7 @@ TEST_F(LocationManagerTest, StartUpdatingLocationStaleCurrentLocation) {
// Set up to return a stale mock CLLocation from -[GeolocationUpdater
// currentLocation].
base::scoped_nsobject<id> mock_location(
- [[OCMockObject mockForClass:[CLLocation class]] retain]);
+ [OCMockObject mockForClass:[CLLocation class]]);
BOOL yes = YES;
[[[mock_location expect] andReturnValue:OCMOCK_VALUE(yes)] cr_shouldRefresh];
@@ -92,7 +96,7 @@ TEST_F(LocationManagerTest, StartUpdatingLocationFreshCurrentLocation) {
// Set up to return a fresh mock CLLocation from -[GeolocationUpdater
// currentLocation].
base::scoped_nsobject<id> mock_location(
- [[OCMockObject mockForClass:[CLLocation class]] retain]);
+ [OCMockObject mockForClass:[CLLocation class]]);
BOOL no = NO;
[[[mock_location expect] andReturnValue:OCMOCK_VALUE(no)] cr_shouldRefresh];

Powered by Google App Engine
This is Rietveld 408576698