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

Unified Diff: content/browser/download/download_file_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: content/browser/download/download_file_unittest.cc
diff --git a/content/browser/download/download_file_unittest.cc b/content/browser/download/download_file_unittest.cc
index 00911250e532bdd10cd08255ba156dd9f96df081..453d70c04385cc4816fd3b089b01d0649ba2b7bf 100644
--- a/content/browser/download/download_file_unittest.cc
+++ b/content/browser/download/download_file_unittest.cc
@@ -181,10 +181,6 @@ TEST_F(DownloadFileTest, RenameFileFinal) {
EXPECT_FALSE(file_util::PathExists(path_2));
EXPECT_TRUE(file_util::PathExists(path_3));
- // Should not be able to get the hash until the file is closed.
- std::string hash;
- EXPECT_FALSE(download_file_->GetSha256Hash(&hash));
-
download_file_->Finish();
// Rename the file after downloading all the data and closing the file.
@@ -197,6 +193,7 @@ TEST_F(DownloadFileTest, RenameFileFinal) {
EXPECT_TRUE(file_util::PathExists(path_4));
// Check the hash.
+ std::string hash;
EXPECT_TRUE(download_file_->GetSha256Hash(&hash));
EXPECT_EQ(kDataHash, base::HexEncode(hash.data(), hash.size()));

Powered by Google App Engine
This is Rietveld 408576698