Index: content/browser/download/mock_download_file.cc |
diff --git a/content/browser/download/mock_download_file.cc b/content/browser/download/mock_download_file.cc |
index d5c7781c9edcd72ac58053637c7f0ba789efc370..9d023722f7d4afebd9e9af653173ab6f4e149bff 100644 |
--- a/content/browser/download/mock_download_file.cc |
+++ b/content/browser/download/mock_download_file.cc |
@@ -7,11 +7,19 @@ |
using ::testing::_; |
using ::testing::Return; |
+namespace { |
+ |
+void SuccessRun(content::DownloadFile::InitializeCallback callback) { |
+ callback.Run(content::DOWNLOAD_INTERRUPT_REASON_NONE); |
+} |
+ |
+} // namespace |
+ |
MockDownloadFile::MockDownloadFile() { |
// This is here because |Initialize()| is normally called right after |
// construction. |
- ON_CALL(*this, Initialize()) |
- .WillByDefault(Return(content::DOWNLOAD_INTERRUPT_REASON_NONE)); |
+ ON_CALL(*this, Initialize(_)) |
+ .WillByDefault(::testing::Invoke(SuccessRun)); |
} |
MockDownloadFile::~MockDownloadFile() { |