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

Unified Diff: ios/chrome/browser/web/auto_reload_controller_unittest.mm

Issue 2813503003: [ObjC ARC] Converts ios/chrome/browser/web:unit_tests_internal to ARC. (Closed)
Patch Set: 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
« no previous file with comments | « ios/chrome/browser/web/BUILD.gn ('k') | ios/chrome/browser/web/blocked_popup_tab_helper_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/web/auto_reload_controller_unittest.mm
diff --git a/ios/chrome/browser/web/auto_reload_controller_unittest.mm b/ios/chrome/browser/web/auto_reload_controller_unittest.mm
index a3a5bba8909d8eb0f0336dd09e037887f9c285a6..1174227266ef06aabe918153379cf110e83d0a4e 100644
--- a/ios/chrome/browser/web/auto_reload_controller_unittest.mm
+++ b/ios/chrome/browser/web/auto_reload_controller_unittest.mm
@@ -6,12 +6,15 @@
#include <memory>
-#include "base/mac/scoped_nsobject.h"
#include "base/timer/mock_timer.h"
#include "base/timer/timer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gtest_mac.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@interface AutoReloadController (Testing)
- (void)setTimerForTesting:(std::unique_ptr<base::Timer>)timer;
@@ -42,10 +45,9 @@ class AutoReloadControllerTest : public testing::Test {
protected:
void SetUp() override {
testing::Test::SetUp();
- delegate_.reset([[TestAutoReloadDelegate alloc] init]);
- controller_.reset([[AutoReloadController alloc]
- initWithDelegate:delegate_.get()
- onlineStatus:YES]);
+ delegate_ = [[TestAutoReloadDelegate alloc] init];
+ controller_ = [[AutoReloadController alloc] initWithDelegate:delegate_
+ onlineStatus:YES];
// Note: even though setTimerForTesting theoretically passes ownership of
// the timer to the controller, this class retains a weak pointer to the
// timer so it can query or fire it for testing. The only reason this is
@@ -66,8 +68,8 @@ class AutoReloadControllerTest : public testing::Test {
[controller_ loadFinishedForURL:url wasPost:NO];
}
- base::scoped_nsobject<TestAutoReloadDelegate> delegate_;
- base::scoped_nsobject<AutoReloadController> controller_;
+ TestAutoReloadDelegate* delegate_;
+ AutoReloadController* controller_;
base::MockTimer* timer_; // weak
};
« no previous file with comments | « ios/chrome/browser/web/BUILD.gn ('k') | ios/chrome/browser/web/blocked_popup_tab_helper_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698