Index: chrome/browser/download/notification/download_notification_item_unittest.cc |
diff --git a/chrome/browser/download/notification/download_notification_item_unittest.cc b/chrome/browser/download/notification/download_notification_item_unittest.cc |
index 9939f14acad69814f08c3ec6e2ae896f9ddbce3c..0a586f0c04228c9bcbd0dd4253e6c8e58e2bb88c 100644 |
--- a/chrome/browser/download/notification/download_notification_item_unittest.cc |
+++ b/chrome/browser/download/notification/download_notification_item_unittest.cc |
@@ -22,6 +22,7 @@ |
using testing::NiceMock; |
using testing::Return; |
+using testing::ReturnRef; |
using testing::_; |
namespace { |
@@ -67,6 +68,9 @@ class MockDownloadNotificationItemDelegate |
size_t on_download_stopped_call_count_; |
}; |
+const base::FilePath::StringType |
Lei Zhang
2015/06/15 21:30:58
Err, sorry, I gave incorrect advice. The preproces
|
+ kDownloadItemTargetPathString = "/tmp/TITLE.bin"; |
+ |
} // anonymous namespace |
namespace test { |
@@ -90,6 +94,7 @@ class DownloadNotificationItemTest : public testing::Test { |
DownloadNotificationItem::SetStubNotificationUIManagerForTesting( |
ui_manager_.get()); |
+ base::FilePath download_item_target_path(kDownloadItemTargetPathString); |
download_item_.reset(new NiceMock<content::MockDownloadItem>()); |
ON_CALL(*download_item_, GetId()).WillByDefault(Return(12345)); |
ON_CALL(*download_item_, GetState()) |
@@ -97,6 +102,8 @@ class DownloadNotificationItemTest : public testing::Test { |
ON_CALL(*download_item_, IsDangerous()).WillByDefault(Return(false)); |
ON_CALL(*download_item_, GetFileNameToReportUser()) |
.WillByDefault(Return(base::FilePath("TITLE.bin"))); |
+ ON_CALL(*download_item_, GetTargetFilePath()) |
+ .WillByDefault(ReturnRef(download_item_target_path)); |
ON_CALL(*download_item_, GetDangerType()) |
.WillByDefault(Return(content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS)); |
ON_CALL(*download_item_, IsDone()).WillByDefault(Return(false)); |