Index: chrome/browser/download/download_resource_throttle_unittest.cc |
diff --git a/chrome/browser/download/download_resource_throttle_unittest.cc b/chrome/browser/download/download_resource_throttle_unittest.cc |
index 03274121137cf0027ff731e279dc69175048e5ed..03dcc3069d3357a612dcff121ddebd27f0428a41 100644 |
--- a/chrome/browser/download/download_resource_throttle_unittest.cc |
+++ b/chrome/browser/download/download_resource_throttle_unittest.cc |
@@ -11,7 +11,6 @@ |
#include "chrome/test/base/chrome_render_view_host_test_harness.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/render_process_host.h" |
-#include "content/public/browser/resource_controller.h" |
#include "content/public/browser/resource_throttle.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_contents_delegate.h" |
@@ -35,7 +34,8 @@ class MockWebContentsDelegate : public content::WebContentsDelegate { |
~MockWebContentsDelegate() override {} |
}; |
-class MockResourceController : public content::ResourceController { |
+class MockResourceThrottleDelegate |
+ : public content::ResourceThrottle::Delegate { |
public: |
MOCK_METHOD0(Cancel, void()); |
MOCK_METHOD0(CancelAndIgnore, void()); |
@@ -82,7 +82,7 @@ class DownloadResourceThrottleTest : public ChromeRenderViewHostTestHarness { |
limiter_, |
base::Bind(&tab_util::GetWebContentsByID, process_id, render_view_id), |
GURL(kTestUrl), "GET"); |
- throttle_->set_controller_for_testing(&resource_controller_); |
+ throttle_->set_delegate_for_testing(&resource_throttle_delegate_); |
bool defer; |
throttle_->WillStartRequest(&defer); |
EXPECT_EQ(true, defer); |
@@ -102,7 +102,7 @@ class DownloadResourceThrottleTest : public ChromeRenderViewHostTestHarness { |
content::ResourceThrottle* throttle_; |
MockWebContentsDelegate delegate_; |
scoped_refptr<DownloadRequestLimiter> limiter_; |
- ::testing::NiceMock<MockResourceController> resource_controller_; |
+ ::testing::NiceMock<MockResourceThrottleDelegate> resource_throttle_delegate_; |
std::unique_ptr<base::RunLoop> run_loop_; |
#if BUILDFLAG(ANDROID_JAVA_UI) |
chrome::android::MockDownloadController download_controller_; |
@@ -110,7 +110,7 @@ class DownloadResourceThrottleTest : public ChromeRenderViewHostTestHarness { |
}; |
TEST_F(DownloadResourceThrottleTest, StartDownloadThrottle_Basic) { |
- EXPECT_CALL(resource_controller_, Resume()) |
+ EXPECT_CALL(resource_throttle_delegate_, Resume()) |
.WillOnce(QuitLoop(run_loop_->QuitClosure())); |
StartThrottle(); |
} |
@@ -119,7 +119,7 @@ TEST_F(DownloadResourceThrottleTest, StartDownloadThrottle_Basic) { |
TEST_F(DownloadResourceThrottleTest, DownloadWithFailedFileAcecssRequest) { |
DownloadControllerBase::Get() |
->SetApproveFileAccessRequestForTesting(false); |
- EXPECT_CALL(resource_controller_, Cancel()) |
+ EXPECT_CALL(resource_throttle_delegate_, Cancel()) |
.WillOnce(QuitLoop(run_loop_->QuitClosure())); |
StartThrottle(); |
} |