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

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

Issue 7646025: Detect file system errors during downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
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 7e0ebf2863b0f500c3736614f0710e251aaea9d3..cfffa9ae8c982728d1f5605dc155a1d2884edbc2 100644
--- a/chrome/browser/download/download_manager_unittest.cc
+++ b/chrome/browser/download/download_manager_unittest.cc
@@ -65,8 +65,9 @@ class DownloadManagerTest : public TestingBrowserProcessTest {
file_manager()->downloads_[id] = download_file;
}
- void OnAllDataSaved(int32 download_id, int64 size, const std::string& hash) {
- download_manager_->OnAllDataSaved(download_id, size, hash);
+ void OnResponseCompleted(int32 download_id, int64 size,
+ const std::string& hash) {
+ download_manager_->OnResponseCompleted(download_id, size, hash);
}
void FileSelected(const FilePath& path, void* params) {
@@ -380,13 +381,13 @@ TEST_F(DownloadManagerTest, DownloadRenameTest) {
int32* id_ptr = new int32;
*id_ptr = i; // Deleted in FileSelected().
if (kDownloadRenameCases[i].finish_before_rename) {
- OnAllDataSaved(i, 1024, std::string("fake_hash"));
+ OnResponseCompleted(i, 1024, std::string("fake_hash"));
message_loop_.RunAllPending();
FileSelected(new_path, id_ptr);
} else {
FileSelected(new_path, id_ptr);
message_loop_.RunAllPending();
- OnAllDataSaved(i, 1024, std::string("fake_hash"));
+ OnResponseCompleted(i, 1024, std::string("fake_hash"));
}
message_loop_.RunAllPending();
@@ -605,7 +606,7 @@ TEST_F(DownloadManagerTest, DownloadOverwriteTest) {
download_file->AppendDataToFile(kTestData, kTestDataLen);
// Finish the download.
- OnAllDataSaved(0, kTestDataLen, "");
+ OnResponseCompleted(0, kTestDataLen, "");
message_loop_.RunAllPending();
// Download is complete.
@@ -681,7 +682,7 @@ TEST_F(DownloadManagerTest, DownloadRemoveTest) {
download_file->AppendDataToFile(kTestData, kTestDataLen);
// Finish the download.
- OnAllDataSaved(0, kTestDataLen, "");
+ OnResponseCompleted(0, kTestDataLen, "");
message_loop_.RunAllPending();
// Download is complete.
« chrome/browser/download/download_manager.cc ('K') | « chrome/browser/download/download_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698