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

Unified Diff: ios/chrome/browser/device_sharing/device_sharing_manager_unittest.mm

Issue 2623533003: [ObjC ARC] Converts ios/chrome/browser/device_sharing:unit_tests to ARC. (Closed)
Patch Set: removed_scoped_nsobject Created 3 years, 11 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 | « ios/chrome/browser/device_sharing/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/device_sharing/device_sharing_manager_unittest.mm
diff --git a/ios/chrome/browser/device_sharing/device_sharing_manager_unittest.mm b/ios/chrome/browser/device_sharing/device_sharing_manager_unittest.mm
index 4bfa5a87363dbb5c05baf35d0440cfbb430555d8..649418a7750b714e23ca7d8778f548990e5f9a4c 100644
--- a/ios/chrome/browser/device_sharing/device_sharing_manager_unittest.mm
+++ b/ios/chrome/browser/device_sharing/device_sharing_manager_unittest.mm
@@ -7,7 +7,6 @@
#include <memory>
#include "base/mac/foundation_util.h"
-#include "base/mac/scoped_nsobject.h"
#import "components/handoff/handoff_manager.h"
#include "components/handoff/pref_names_ios.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
@@ -18,6 +17,10 @@
#import "third_party/ocmock/gtest_support.h"
#include "url/gurl.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@interface TestDeviceSharingManager : DeviceSharingManager
+ (HandoffManager*)createHandoffManager;
@end
@@ -41,19 +44,19 @@ class DeviceSharingManagerTest : public PlatformTest {
PlatformTest::SetUp();
TestChromeBrowserState::Builder mainBrowserStateBuilder;
chrome_browser_state_ = mainBrowserStateBuilder.Build();
- sharing_manager_.reset([[TestDeviceSharingManager alloc] init]);
+ sharing_manager_ = [[TestDeviceSharingManager alloc] init];
}
void TearDown() override {
[sharing_manager_ updateBrowserState:NULL];
- sharing_manager_.reset();
+ sharing_manager_ = nil;
}
const GURL kTestURL1;
const GURL kTestURL2;
web::TestWebThreadBundle thread_bundle_;
std::unique_ptr<TestChromeBrowserState> chrome_browser_state_;
- base::scoped_nsobject<DeviceSharingManager> sharing_manager_;
+ DeviceSharingManager* sharing_manager_;
};
TEST_F(DeviceSharingManagerTest, NoMainBrowserState) {
« no previous file with comments | « ios/chrome/browser/device_sharing/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698