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

Unified Diff: content/browser/download/download_manager_impl_unittest.cc

Issue 11640007: Make the UI an observer of downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android clang build Created 7 years, 10 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
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_manager_impl_unittest.cc
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index 46e43d4573dfe2f5c05d703d13bc2079e7f5cdc1..c16713cef558aeb4117e8ac0b0e7192f4cc0f0ee 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -181,7 +181,6 @@ class MockDownloadManagerDelegate : public DownloadManagerDelegate {
MOCK_METHOD2(DetermineDownloadTarget,
bool(DownloadItem* item,
const DownloadTargetCallback&));
- MOCK_METHOD0(GetAlternativeWebContentsToNotifyForDownload, WebContents*());
MOCK_METHOD1(ShouldOpenFileBasedOnExtension, bool(const base::FilePath&));
MOCK_METHOD2(ShouldCompleteDownload,
bool(DownloadItem*, const base::Closure&));
@@ -248,6 +247,7 @@ class MockDownloadItemFactory
const GURL& url,
DownloadId download_id,
const std::string& mime_type,
+ scoped_ptr<DownloadRequestHandleInterface> request_handle,
const net::BoundNetLog& bound_net_log) OVERRIDE;
private:
@@ -339,6 +339,7 @@ DownloadItemImpl* MockDownloadItemFactory::CreateSavePageItem(
const GURL& url,
DownloadId download_id,
const std::string& mime_type,
+ scoped_ptr<DownloadRequestHandleInterface> request_handle,
const net::BoundNetLog& bound_net_log) {
int local_id = download_id.local();
DCHECK(items_.find(local_id) == items_.end());
@@ -550,21 +551,6 @@ class DownloadManagerTest : public testing::Test {
base::Unretained(this)));
}
- void AddItemToHistory(MockDownloadItemImpl& item, int64 db_handle) {
- // For DCHECK in AddDownloadItemToHistory. Don't want to use
- // WillRepeatedly as it may have to return true after this.
- if (DCHECK_IS_ON())
- // Null out ShowDownloadInBrowser
- EXPECT_CALL(item, GetWebContents())
- .WillOnce(Return(static_cast<WebContents*>(NULL)));
- EXPECT_CALL(GetMockDownloadManagerDelegate(),
- GetAlternativeWebContentsToNotifyForDownload())
- .WillOnce(Return(static_cast<WebContents*>(NULL)));
-
- EXPECT_CALL(item, IsInProgress())
- .WillOnce(Return(true));
- }
-
protected:
// Key test variable; we'll keep it available to sub-classes.
scoped_refptr<DownloadManagerImpl> download_manager_;
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698