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

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: Incorporated Randy's comments. 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 a85fb3efebcc5a9b6295b7ca1953985fb39b3d10..489b50c2156baae522c2db76e4cd3a93f098a1e4 100644
--- a/chrome/browser/download/download_manager_unittest.cc
+++ b/chrome/browser/download/download_manager_unittest.cc
@@ -114,8 +114,10 @@ class DownloadManagerTest : public testing::Test {
}
void OnDownloadInterrupted(int32 download_id, int64 size,
+ const std::string partial_hash,
InterruptReason reason) {
- download_manager_->OnDownloadInterrupted(download_id, size, reason);
+ download_manager_->OnDownloadInterrupted(download_id, size,
+ partial_hash, reason);
}
// Get the download item with ID |id|.
@@ -185,7 +187,7 @@ DownloadFileWithMockStream::DownloadFileWithMockStream(
DownloadCreateInfo* info,
DownloadManager* manager,
net::testing::MockFileStream* stream)
- : DownloadFile(info, new DownloadRequestHandle(), manager) {
+ : DownloadFile(info, new DownloadRequestHandle(), manager, "") {
DCHECK(file_stream_ == NULL);
file_stream_.reset(stream);
}
@@ -283,7 +285,7 @@ const struct {
class MockDownloadFile : public DownloadFile {
public:
MockDownloadFile(DownloadCreateInfo* info, DownloadManager* manager)
- : DownloadFile(info, new DownloadRequestHandle(), manager),
+ : DownloadFile(info, new DownloadRequestHandle(), manager, ""),
renamed_count_(0) { }
virtual ~MockDownloadFile() { Destructed(); }
MOCK_METHOD1(Rename, net::Error(const FilePath&));
@@ -400,7 +402,7 @@ TEST_F(DownloadManagerTest, StartDownload) {
DownloadFile* download_file(
new DownloadFile(info.get(), new DownloadRequestHandle(),
- download_manager_));
+ download_manager_, ""));
AddDownloadToFileManager(info->download_id.local(), download_file);
download_file->Initialize(false);
download_manager_->StartDownload(info->download_id.local());
@@ -522,7 +524,7 @@ TEST_F(DownloadManagerTest, DownloadInterruptTest) {
EXPECT_TRUE(GetActiveDownloadItem(0) != NULL);
int64 error_size = 3;
- OnDownloadInterrupted(0, error_size,
+ OnDownloadInterrupted(0, error_size, "",
DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED);
message_loop_.RunAllPending();
@@ -761,7 +763,7 @@ TEST_F(DownloadManagerTest, DownloadOverwriteTest) {
// properly.
DownloadFile* download_file(
new DownloadFile(info.get(), new DownloadRequestHandle(),
- download_manager_));
+ download_manager_, ""));
download_file->Rename(cr_path);
// This creates the .crdownload version of the file.
download_file->Initialize(false);
@@ -838,7 +840,7 @@ TEST_F(DownloadManagerTest, DownloadRemoveTest) {
// properly.
DownloadFile* download_file(
new DownloadFile(info.get(), new DownloadRequestHandle(),
- download_manager_));
+ download_manager_, ""));
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