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

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: Fixed comment. 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
« no previous file with comments | « no previous file | content/browser/download/base_file.h » ('j') | content/browser/download/base_file_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8bcfde12a3f3e35a3e79a08e6d83e4c650570935..4715b8a9f89b69971e16ce46aae70e07ca25f27d 100644
--- a/chrome/browser/download/download_manager_unittest.cc
+++ b/chrome/browser/download/download_manager_unittest.cc
@@ -66,8 +66,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) {
@@ -381,13 +382,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();
@@ -606,7 +607,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.
@@ -682,7 +683,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.
« no previous file with comments | « no previous file | content/browser/download/base_file.h » ('j') | content/browser/download/base_file_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698