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

Unified Diff: ios/chrome/browser/ui/settings/physical_web_collection_view_controller_unittest.mm

Issue 2806323003: [ObjC ARC] Converts ios/chrome/browser/ui/settings:unit_tests to ARC. (Closed)
Patch Set: rebase Created 3 years, 8 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
Index: ios/chrome/browser/ui/settings/physical_web_collection_view_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/settings/physical_web_collection_view_controller_unittest.mm b/ios/chrome/browser/ui/settings/physical_web_collection_view_controller_unittest.mm
index a5f2eebc95ba482d5ea0f9d54fe8b7e2a2e9eb62..e9462367c0398e6189bfa04caa04c6d40e12ce99 100644
--- a/ios/chrome/browser/ui/settings/physical_web_collection_view_controller_unittest.mm
+++ b/ios/chrome/browser/ui/settings/physical_web_collection_view_controller_unittest.mm
@@ -21,6 +21,10 @@
#include "ios/chrome/grit/ios_chromium_strings.h"
#include "ios/chrome/grit/ios_strings.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@interface PhysicalWebCollectionViewController (ExposedForTesting)
- (void)updatePhysicalWebEnabled:(BOOL)enabled;
@end
@@ -36,10 +40,10 @@ class PhysicalWebCollectionViewControllerTest
CreateController();
}
- CollectionViewController* NewController() override {
- physicalWebController_.reset([[PhysicalWebCollectionViewController alloc]
- initWithPrefs:pref_service_.get()]);
- return [physicalWebController_ retain];
+ CollectionViewController* InstantiateController() override {
+ physicalWebController_ = [[PhysicalWebCollectionViewController alloc]
+ initWithPrefs:pref_service_.get()];
+ return physicalWebController_;
}
std::unique_ptr<PrefService> CreateLocalState() {
@@ -55,8 +59,7 @@ class PhysicalWebCollectionViewControllerTest
base::MessageLoopForUI message_loop_;
std::unique_ptr<PrefService> pref_service_;
- base::scoped_nsobject<PhysicalWebCollectionViewController>
- physicalWebController_;
+ PhysicalWebCollectionViewController* physicalWebController_;
};
// Tests PhysicalWebCollectionViewController is set up with all appropriate

Powered by Google App Engine
This is Rietveld 408576698