| 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.
|
|
|