summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_manager_unittest.cc
diff options
context:
space:
mode:
authorahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-15 15:51:44 +0000
committerahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-15 15:51:44 +0000
commit5b1c5dfa0b6d584b9be886f8fea43191cee027c8 (patch)
tree988004d430db86d5382765ab5f021099cac7a312 /chrome/browser/download/download_manager_unittest.cc
parent0a5e8fcc656dfe29af67cc7f0bb0922a4b236a19 (diff)
downloadchromium_src-5b1c5dfa0b6d584b9be886f8fea43191cee027c8.zip
chromium_src-5b1c5dfa0b6d584b9be886f8fea43191cee027c8.tar.gz
chromium_src-5b1c5dfa0b6d584b9be886f8fea43191cee027c8.tar.bz2
Refactoring DownloadFile.
Removed dead code (DeleteCrDownload method), and unnecessary parameter. BUG=None TEST=DownloadFile unit tests still pass. Review URL: http://codereview.chromium.org/6485008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_manager_unittest.cc')
-rw-r--r--chrome/browser/download/download_manager_unittest.cc9
1 files changed, 0 insertions, 9 deletions
diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc
index 74a21ac..28c56f7 100644
--- a/chrome/browser/download/download_manager_unittest.cc
+++ b/chrome/browser/download/download_manager_unittest.cc
@@ -144,7 +144,6 @@ const struct {
FilePath::StringType suggested_path;
bool is_dangerous;
bool finish_before_rename;
- bool will_delete_crdownload;
int expected_rename_count;
} kDownloadRenameCases[] = {
// Safe download, download finishes BEFORE file name determined.
@@ -153,28 +152,24 @@ const struct {
{ FILE_PATH_LITERAL("foo.zip"),
false,
true,
- false,
2, },
// Dangerous download, download finishes BEFORE file name determined.
// Needs to be renamed only once.
{ FILE_PATH_LITERAL("Unconfirmed xxx.crdownload"),
true,
true,
- false,
1, },
// Safe download, download finishes AFTER file name determined.
// Needs to be renamed twice.
{ FILE_PATH_LITERAL("foo.zip"),
false,
false,
- false,
2, },
// Dangerous download, download finishes AFTER file name determined.
// Needs to be renamed only once.
{ FILE_PATH_LITERAL("Unconfirmed xxx.crdownload"),
true,
false,
- false,
1, },
};
@@ -184,7 +179,6 @@ class MockDownloadFile : public DownloadFile {
: DownloadFile(info, NULL), renamed_count_(0) { }
virtual ~MockDownloadFile() { Destructed(); }
MOCK_METHOD2(Rename, bool(const FilePath&, bool));
- MOCK_METHOD0(DeleteCrDownload, bool());
MOCK_METHOD0(Destructed, void());
bool TestMultipleRename(
@@ -240,9 +234,6 @@ TEST_F(DownloadManagerTest, DownloadRenameTest) {
2, true, new_path))));
}
- if (kDownloadRenameCases[i].will_delete_crdownload)
- EXPECT_CALL(*download, DeleteCrDownload()).Times(1);
-
download_manager_->CreateDownloadItem(info);
if (kDownloadRenameCases[i].finish_before_rename) {