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

Unified Diff: ios/chrome/browser/ui/open_in_controller_unittest.mm

Issue 2936833002: [ObjC ARC] Converts ios/chrome/browser/ui:unit_tests to ARC. (Closed)
Patch Set: Fix bad ARC guard. Created 3 years, 6 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/open_in_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/open_in_controller_unittest.mm b/ios/chrome/browser/ui/open_in_controller_unittest.mm
index 848242294d0865f66a6cfe1c88462d2ee027ac7a..77abe37bef962fb6a39efe543893bd07e3b95117 100644
--- a/ios/chrome/browser/ui/open_in_controller_unittest.mm
+++ b/ios/chrome/browser/ui/open_in_controller_unittest.mm
@@ -19,6 +19,10 @@
#import "third_party/ocmock/OCMock/OCMock.h"
#include "third_party/ocmock/gtest_support.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
class OpenInControllerTest : public PlatformTest {
@@ -33,11 +37,11 @@ class OpenInControllerTest : public PlatformTest {
void SetUp() override {
PlatformTest::SetUp();
GURL documentURL = GURL("http://www.test.com/doc.pdf");
- parent_view_.reset([[UIView alloc] init]);
+ parent_view_ = [[UIView alloc] init];
id webController = [OCMockObject niceMockForClass:[CRWWebController class]];
- open_in_controller_.reset([[OpenInController alloc]
- initWithRequestContext:nil
- webController:webController]);
+ open_in_controller_ =
+ [[OpenInController alloc] initWithRequestContext:nil
+ webController:webController];
[open_in_controller_ enableWithDocumentURL:documentURL
suggestedFilename:@"doc.pdf"];
}
@@ -49,8 +53,8 @@ class OpenInControllerTest : public PlatformTest {
// Creates a |TestURLFetcherFactory|, which automatically sets itself as
// |URLFetcher|'s factory.
net::TestURLFetcherFactory factory_;
- base::scoped_nsobject<OpenInController> open_in_controller_;
- base::scoped_nsobject<UIView> parent_view_;
+ OpenInController* open_in_controller_;
+ UIView* parent_view_;
};
TEST_F(OpenInControllerTest, DISABLED_TestDisplayOpenInMenu) {

Powered by Google App Engine
This is Rietveld 408576698