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

Unified Diff: ios/web/net/crw_cert_verification_controller_unittest.mm

Issue 2933383002: [ObjC ARC] Converts ios/web:ios_web_net_unittests to ARC. (Closed)
Patch Set: import -> include 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
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/net/crw_ssl_status_updater_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/net/crw_cert_verification_controller_unittest.mm
diff --git a/ios/web/net/crw_cert_verification_controller_unittest.mm b/ios/web/net/crw_cert_verification_controller_unittest.mm
index 5414b54be7a2878c0f3ddb52af3276f2aedb1824..f092383e798171e804e241ae5c5980c19e9b1558 100644
--- a/ios/web/net/crw_cert_verification_controller_unittest.mm
+++ b/ios/web/net/crw_cert_verification_controller_unittest.mm
@@ -5,7 +5,7 @@
#import "ios/web/net/crw_cert_verification_controller.h"
#import "base/mac/bind_objc_block.h"
-#import "base/mac/scoped_nsobject.h"
+#include "base/mac/foundation_util.h"
#include "base/message_loop/message_loop.h"
#import "base/test/ios/wait_util.h"
#include "ios/web/public/test/web_test.h"
@@ -16,6 +16,10 @@
#include "net/test/cert_test_util.h"
#include "net/test/test_data_directory.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace web {
namespace {
@@ -31,8 +35,8 @@ class CRWCertVerificationControllerTest : public web::WebTest {
void SetUp() override {
web::WebTest::SetUp();
- controller_.reset([[CRWCertVerificationController alloc]
- initWithBrowserState:GetBrowserState()]);
+ controller_ = [[CRWCertVerificationController alloc]
+ initWithBrowserState:GetBrowserState()];
cert_ =
net::ImportCertFromFile(net::GetTestCertsDirectory(), kCertFileName);
ASSERT_TRUE(cert_);
@@ -42,10 +46,10 @@ class CRWCertVerificationControllerTest : public web::WebTest {
cert_.get()));
ASSERT_TRUE(chain);
valid_trust_ = web::CreateServerTrustFromChain(
- static_cast<NSArray*>(chain.get()), kHostName);
+ base::mac::CFToNSCast(chain.get()), kHostName);
web::EnsureFutureTrustEvaluationSucceeds(valid_trust_.get());
invalid_trust_ = web::CreateServerTrustFromChain(
- static_cast<NSArray*>(chain.get()), kHostName);
+ base::mac::CFToNSCast(chain.get()), kHostName);
}
// Synchronously returns result of
@@ -96,7 +100,7 @@ class CRWCertVerificationControllerTest : public web::WebTest {
scoped_refptr<net::X509Certificate> cert_;
base::ScopedCFTypeRef<SecTrustRef> valid_trust_;
base::ScopedCFTypeRef<SecTrustRef> invalid_trust_;
- base::scoped_nsobject<CRWCertVerificationController> controller_;
+ CRWCertVerificationController* controller_;
};
// Tests cert policy with a valid trust.
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/net/crw_ssl_status_updater_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698