| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 MOCK_CONST_METHOD0(GetLastModifiedTime, const std::string&()); | 162 MOCK_CONST_METHOD0(GetLastModifiedTime, const std::string&()); |
| 163 MOCK_CONST_METHOD0(GetETag, const std::string&()); | 163 MOCK_CONST_METHOD0(GetETag, const std::string&()); |
| 164 MOCK_CONST_METHOD0(GetLastReason, DownloadInterruptReason()); | 164 MOCK_CONST_METHOD0(GetLastReason, DownloadInterruptReason()); |
| 165 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); | 165 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); |
| 166 MOCK_CONST_METHOD0(GetWebContents, WebContents*()); | 166 MOCK_CONST_METHOD0(GetWebContents, WebContents*()); |
| 167 MOCK_CONST_METHOD0(GetFileNameToReportUser, base::FilePath()); | 167 MOCK_CONST_METHOD0(GetFileNameToReportUser, base::FilePath()); |
| 168 MOCK_METHOD1(SetDisplayName, void(const base::FilePath&)); | 168 MOCK_METHOD1(SetDisplayName, void(const base::FilePath&)); |
| 169 MOCK_CONST_METHOD0(GetUserVerifiedFilePath, base::FilePath()); | 169 MOCK_CONST_METHOD0(GetUserVerifiedFilePath, base::FilePath()); |
| 170 MOCK_METHOD0(NotifyRemoved, void()); | 170 MOCK_METHOD0(NotifyRemoved, void()); |
| 171 // May be called when vlog is on. | 171 // May be called when vlog is on. |
| 172 virtual std::string DebugString(bool verbose) const OVERRIDE { return ""; } | 172 virtual std::string DebugString(bool verbose) const OVERRIDE { |
| 173 return std::string(); |
| 174 } |
| 173 }; | 175 }; |
| 174 | 176 |
| 175 class MockDownloadManagerDelegate : public DownloadManagerDelegate { | 177 class MockDownloadManagerDelegate : public DownloadManagerDelegate { |
| 176 public: | 178 public: |
| 177 MockDownloadManagerDelegate(); | 179 MockDownloadManagerDelegate(); |
| 178 virtual ~MockDownloadManagerDelegate(); | 180 virtual ~MockDownloadManagerDelegate(); |
| 179 | 181 |
| 180 MOCK_METHOD0(Shutdown, void()); | 182 MOCK_METHOD0(Shutdown, void()); |
| 181 MOCK_METHOD0(GetNextId, DownloadId()); | 183 MOCK_METHOD0(GetNextId, DownloadId()); |
| 182 MOCK_METHOD2(DetermineDownloadTarget, | 184 MOCK_METHOD2(DetermineDownloadTarget, |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 .WillOnce(Return()); | 682 .WillOnce(Return()); |
| 681 EXPECT_CALL(GetMockDownloadItem(3), Remove()) | 683 EXPECT_CALL(GetMockDownloadItem(3), Remove()) |
| 682 .Times(0); | 684 .Times(0); |
| 683 | 685 |
| 684 download_manager_->RemoveAllDownloads(); | 686 download_manager_->RemoveAllDownloads(); |
| 685 // Because we're mocking the download item, the Remove call doesn't | 687 // Because we're mocking the download item, the Remove call doesn't |
| 686 // result in them being removed from the DownloadManager list. | 688 // result in them being removed from the DownloadManager list. |
| 687 } | 689 } |
| 688 | 690 |
| 689 } // namespace content | 691 } // namespace content |
| OLD | NEW |