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

Unified Diff: chrome/browser/download/download_manager_unittest.cc

Issue 8404049: Added member data to classes to support download resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with trunk Created 9 years, 1 month 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
Index: chrome/browser/download/download_manager_unittest.cc
diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc
index b794cd2203a615ea0b13aace68187b267bfadceb..07cd3e35204105749a67f98c74622bdaae18ae5b 100644
--- a/chrome/browser/download/download_manager_unittest.cc
+++ b/chrome/browser/download/download_manager_unittest.cc
@@ -10,6 +10,7 @@
#include "base/i18n/number_formatting.h"
#include "base/i18n/rtl.h"
#include "base/memory/scoped_ptr.h"
+#include "base/pickle.h"
#include "base/stl_util.h"
#include "base/string16.h"
#include "base/string_util.h"
@@ -114,8 +115,10 @@ class DownloadManagerTest : public testing::Test {
}
void OnDownloadInterrupted(int32 download_id, int64 size,
+ const Pickle& hash_state,
InterruptReason reason) {
- download_manager_->OnDownloadInterrupted(download_id, size, reason);
+ download_manager_->OnDownloadInterrupted(download_id, size,
+ hash_state, reason);
}
// Get the download item with ID |id|.
@@ -181,7 +184,7 @@ class DownloadFileWithErrors : public DownloadFileImpl {
DownloadFileWithErrors::DownloadFileWithErrors(DownloadCreateInfo* info,
DownloadManager* manager)
- : DownloadFileImpl(info, new DownloadRequestHandle(), manager),
+ : DownloadFileImpl(info, new DownloadRequestHandle(), manager, Pickle()),
forced_error_(net::OK) {
}
@@ -374,7 +377,7 @@ TEST_F(DownloadManagerTest, StartDownload) {
DownloadFile* download_file(
new DownloadFileImpl(info.get(), new DownloadRequestHandle(),
- download_manager_));
+ download_manager_, Pickle()));
AddDownloadToFileManager(info->download_id.local(), download_file);
download_file->Initialize(false);
download_manager_->StartDownload(info->download_id.local());
@@ -493,7 +496,7 @@ TEST_F(DownloadManagerTest, DownloadInterruptTest) {
EXPECT_TRUE(GetActiveDownloadItem(0) != NULL);
int64 error_size = 3;
- OnDownloadInterrupted(0, error_size,
+ OnDownloadInterrupted(0, error_size, Pickle(),
DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED);
message_loop_.RunAllPending();
@@ -733,7 +736,7 @@ TEST_F(DownloadManagerTest, DownloadOverwriteTest) {
// properly.
DownloadFile* download_file(
new DownloadFileImpl(info.get(), new DownloadRequestHandle(),
- download_manager_));
+ download_manager_, Pickle()));
download_file->Rename(cr_path);
// This creates the .crdownload version of the file.
download_file->Initialize(false);
@@ -810,7 +813,7 @@ TEST_F(DownloadManagerTest, DownloadRemoveTest) {
// properly.
DownloadFile* download_file(
new DownloadFileImpl(info.get(), new DownloadRequestHandle(),
- download_manager_));
+ download_manager_, Pickle()));
download_file->Rename(cr_path);
// This creates the .crdownload version of the file.
download_file->Initialize(false);

Powered by Google App Engine
This is Rietveld 408576698