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

Unified Diff: ios/chrome/browser/ui/preload_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/preload_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/preload_controller_unittest.mm b/ios/chrome/browser/ui/preload_controller_unittest.mm
index baaa904457ff499351833fa1ca4cc6148697a0b3..654aab1f8c30081d6b05d7eb6890ba913ba986cb 100644
--- a/ios/chrome/browser/ui/preload_controller_unittest.mm
+++ b/ios/chrome/browser/ui/preload_controller_unittest.mm
@@ -5,7 +5,6 @@
#include <memory>
#include "base/ios/device_util.h"
-#include "base/mac/scoped_nsobject.h"
#include "base/run_loop.h"
#include "base/strings/sys_string_conversions.h"
#include "components/prefs/pref_service.h"
@@ -17,6 +16,10 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/platform_test.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@interface PreloadController (ExposedForTesting)
- (BOOL)shouldPreloadURL:(const GURL&)url;
- (BOOL)isPrerenderingEnabled;
@@ -67,8 +70,8 @@ class PreloadControllerTest : public PlatformTest {
test_url_fetcher_factory_.reset(new net::TestURLFetcherFactory());
- controller_.reset([[PreloadController alloc]
- initWithBrowserState:chrome_browser_state_.get()]);
+ controller_ = [[PreloadController alloc]
+ initWithBrowserState:chrome_browser_state_.get()];
};
// Set the "Preload webpages" setting to "Always".
@@ -107,7 +110,7 @@ class PreloadControllerTest : public PlatformTest {
std::unique_ptr<TestChromeBrowserState> chrome_browser_state_;
std::unique_ptr<TestNetworkChangeNotifier> network_change_notifier_;
std::unique_ptr<net::TestURLFetcherFactory> test_url_fetcher_factory_;
- base::scoped_nsobject<PreloadController> controller_;
+ PreloadController* controller_;
};
// Tests that the preload controller does not try to preload non-web urls.
« no previous file with comments | « ios/chrome/browser/ui/page_not_available_controller_unittest.mm ('k') | ios/chrome/browser/ui/ui_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698