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

Unified Diff: content/browser/download/download_item_impl_unittest.cc

Issue 10915180: Make DownloadHistory observe manager, items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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: content/browser/download/download_item_impl_unittest.cc
diff --git a/content/browser/download/download_item_impl_unittest.cc b/content/browser/download/download_item_impl_unittest.cc
index d2ce5dd6066c8cd731cace1dcc1488facab3c159..6ab4e838e27f77e94b4ccfa0702e7c9a83e7e697 100644
--- a/content/browser/download/download_item_impl_unittest.cc
+++ b/content/browser/download/download_item_impl_unittest.cc
@@ -48,7 +48,6 @@ class MockDelegate : public DownloadItemImplDelegate {
MOCK_METHOD1(DownloadRemoved, void(DownloadItemImpl* download));
MOCK_METHOD1(DownloadRenamedToIntermediateName,
void(DownloadItemImpl* download));
- MOCK_METHOD1(DownloadRenamedToFinalName, void(DownloadItemImpl* download));
MOCK_CONST_METHOD1(AssertStateConsistent, void(DownloadItemImpl* download));
virtual DownloadFileManager* GetDownloadFileManager() OVERRIDE {
return file_manager_;
@@ -448,8 +447,6 @@ TEST_F(DownloadItemTest, DisplayName) {
// Test that the delegate is invoked after the download file is renamed.
// Delegate::DownloadRenamedToIntermediateName() should be invoked when the
// download is renamed to the intermediate name.
-// Delegate::DownloadRenamedToFinalName() should be invoked after the final
-// rename.
TEST_F(DownloadItemTest, CallbackAfterRename) {
DownloadItemImpl* item = CreateDownloadItem(DownloadItem::IN_PROGRESS);
FilePath final_path(FilePath(kDummyPath).AppendASCII("foo.bar"));
@@ -484,15 +481,6 @@ TEST_F(DownloadItemTest, CallbackAfterRename) {
EXPECT_CALL(*mock_file_manager(),
CompleteDownload(item->GetGlobalId(), _))
.WillOnce(ScheduleCompleteCallback());
- // DownloadItemImpl should invoke this callback on the delegate after the
- // final rename has completed. Also check that GetFullPath() and
- // GetTargetFilePath() return the final path at the time of the call.
- EXPECT_CALL(*mock_delegate(),
- DownloadRenamedToFinalName(
- AllOf(item,
- Property(&DownloadItem::GetFullPath, final_path),
- Property(&DownloadItem::GetTargetFilePath,
- final_path))));
EXPECT_CALL(*mock_delegate(), DownloadCompleted(item));
EXPECT_CALL(*mock_delegate(), ShouldOpenDownload(item))
.WillOnce(Return(true));

Powered by Google App Engine
This is Rietveld 408576698