| 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 6d6edc74e1d6efb113358ba0c520ff1c8056ddf8..eda97dac7d1f07b0fcf9cf3cb3d0665c346f7154 100644
|
| --- a/content/browser/download/base_file_unittest.cc
|
| +++ b/content/browser/download/base_file_unittest.cc
|
| @@ -251,8 +251,12 @@ TEST_F(BaseFileTest, MultipleWrites) {
|
|
|
| // Write data to the file once and calculate its sha256 hash.
|
| TEST_F(BaseFileTest, SingleWriteWithHash) {
|
| + std::string partial_hash;
|
| ASSERT_EQ(net::OK, base_file_->Initialize(true));
|
| + // Can get partial hashes before Finish() is called.
|
| + EXPECT_TRUE(base_file_->GetSha256Hash(&partial_hash));
|
| ASSERT_EQ(net::OK, AppendDataToFile(kTestData1));
|
| + EXPECT_TRUE(base_file_->GetSha256Hash(&partial_hash));
|
| base_file_->Finish();
|
|
|
| std::string hash;
|
| @@ -269,8 +273,6 @@ TEST_F(BaseFileTest, MultipleWritesWithHash) {
|
| ASSERT_EQ(net::OK, AppendDataToFile(kTestData1));
|
| ASSERT_EQ(net::OK, AppendDataToFile(kTestData2));
|
| ASSERT_EQ(net::OK, AppendDataToFile(kTestData3));
|
| - // no hash before Finish() is called either.
|
| - EXPECT_FALSE(base_file_->GetSha256Hash(&hash));
|
| base_file_->Finish();
|
|
|
| EXPECT_TRUE(base_file_->GetSha256Hash(&hash));
|
|
|