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

Unified Diff: ios/web/web_state/crw_pass_kit_downloader_unittest.mm

Issue 2935933003: [ObjC ARC] Converts ios/web:ios_web_web_state_unittests to ARC. (Closed)
Patch Set: Review fixes. 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/web/web_state/crw_pass_kit_downloader_unittest.mm
diff --git a/ios/web/web_state/crw_pass_kit_downloader_unittest.mm b/ios/web/web_state/crw_pass_kit_downloader_unittest.mm
index 3a14e2ebd15d6bb1673499b2b50976ef9963fafc..cf460094e645cb42035dcc25a42d772d6d0dbe01 100644
--- a/ios/web/web_state/crw_pass_kit_downloader_unittest.mm
+++ b/ios/web/web_state/crw_pass_kit_downloader_unittest.mm
@@ -8,7 +8,6 @@
#include <memory>
-#import "base/mac/scoped_nsobject.h"
#include "ios/web/public/test/web_test.h"
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
@@ -18,6 +17,10 @@
#import "testing/gtest_mac.h"
#include "url/gurl.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
using net::HttpResponseHeaders;
using net::URLRequestStatus;
@@ -38,14 +41,14 @@ class CRWPassKitDownloaderTest : public WebTest {
WebTest::SetUp();
completion_handler_success_ = false;
fetcher_factory_.reset(new net::TestURLFetcherFactory());
- downloader_.reset([[CRWPassKitDownloader alloc]
+ downloader_ = [[CRWPassKitDownloader alloc]
initWithContextGetter:GetBrowserState()->GetRequestContext()
completionHandler:^(NSData* data) {
NSData* expected_data =
[NSData dataWithBytes:kExpectedString
length:strlen(kExpectedString)];
completion_handler_success_ = [data isEqualToData:expected_data];
- }]);
+ }];
}
// Sets up |fetcher|'s request status, HTTP response code, HTTP headers, and
@@ -67,7 +70,7 @@ class CRWPassKitDownloaderTest : public WebTest {
std::unique_ptr<net::TestURLFetcherFactory> fetcher_factory_;
// The CRWPassKitDownloader that is being tested.
- base::scoped_nsobject<CRWPassKitDownloader> downloader_;
+ CRWPassKitDownloader* downloader_;
// Indicates whether or not the downloader successfully downloaded data. It is
// set from the completion handler based on whether actual data is equal to
« no previous file with comments | « ios/web/web_state/context_menu_params_utils_unittest.mm ('k') | ios/web/web_state/error_translation_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698