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

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

Issue 11571025: Initial CL for Downloads resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated Pawel's comment. Created 7 years, 11 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/base_file.cc ('k') | content/browser/download/download_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/base_file_unittest.cc
diff --git a/content/browser/download/base_file_unittest.cc b/content/browser/download/base_file_unittest.cc
index 033cd783aa3b0c773c550e2cb7ce8f942624cf73..26fbf81819e039ced549d54f9939ea9cc4114d32 100644
--- a/content/browser/download/base_file_unittest.cc
+++ b/content/browser/download/base_file_unittest.cc
@@ -389,8 +389,13 @@ TEST_F(BaseFileTest, MultipleWritesInterruptedWithHash) {
// Finish the file.
base_file_->Finish();
+ FilePath new_file_path(temp_dir_.path().Append(
+ FilePath(FILE_PATH_LITERAL("second_file"))));
+
+ ASSERT_TRUE(file_util::CopyFile(base_file_->full_path(), new_file_path));
+
// Create another file
- BaseFile second_file(FilePath(),
+ BaseFile second_file(new_file_path,
GURL(),
GURL(),
base_file_->bytes_so_far(),
@@ -399,7 +404,7 @@ TEST_F(BaseFileTest, MultipleWritesInterruptedWithHash) {
scoped_ptr<net::FileStream>(),
net::BoundNetLog());
ASSERT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
- second_file.Initialize(temp_dir_.path()));
+ second_file.Initialize(FilePath()));
std::string data(kTestData3);
EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
second_file.AppendDataToFile(data.data(), data.size()));
« no previous file with comments | « content/browser/download/base_file.cc ('k') | content/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698