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

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

Issue 2720613002: Downloads: Added transient flag to download item and download database (Closed)
Patch Set: Fixed migration unit test Created 3 years, 10 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_history_unittest.cc
diff --git a/chrome/browser/download/download_history_unittest.cc b/chrome/browser/download/download_history_unittest.cc
index 05007cf2ac9fa0f4985f18676f9c491d6b84556f..116a56c68a49bd456676b43b22814e5e318e6837 100644
--- a/chrome/browser/download/download_history_unittest.cc
+++ b/chrome/browser/download/download_history_unittest.cc
@@ -235,7 +235,7 @@ class DownloadHistoryTest : public testing::Test {
history::ToContentDownloadState(row.state),
history::ToContentDownloadDangerType(row.danger_type),
history::ToContentDownloadInterruptReason(row.interrupt_reason),
- row.opened, row.last_access_time,
+ row.opened, row.last_access_time, row.visible,
history::ToContentReceivedSlices(row.download_slice_info));
EXPECT_CALL(manager(), MockCreateDownloadItem(adapter))
.WillOnce(DoAll(
@@ -348,7 +348,7 @@ class DownloadHistoryTest : public testing::Test {
"abc", 100, 100, state,
content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
content::DOWNLOAD_INTERRUPT_REASON_NONE, false, base::Time::Now(),
- std::string(), std::string(),
+ true, std::string(), std::string(),
std::vector<content::DownloadItem::ReceivedSlice>(), info);
}
@@ -375,6 +375,7 @@ class DownloadHistoryTest : public testing::Test {
content::DownloadInterruptReason interrupt_reason,
bool opened,
const base::Time& last_access_time,
+ bool visible,
const std::string& by_extension_id,
const std::string& by_extension_name,
const std::vector<content::DownloadItem::ReceivedSlice>& received_slices,
@@ -407,6 +408,7 @@ class DownloadHistoryTest : public testing::Test {
info->guid = guid;
info->opened = opened;
info->last_access_time = last_access_time;
+ info->visible = visible;
info->by_ext_id = by_extension_id;
info->by_ext_name = by_extension_name;
@@ -451,6 +453,7 @@ class DownloadHistoryTest : public testing::Test {
EXPECT_CALL(item(index), GetOpened()).WillRepeatedly(Return(opened));
EXPECT_CALL(item(index), GetLastAccessTime())
.WillRepeatedly(Return(last_access_time));
+ EXPECT_CALL(item(index), IsVisible()).WillRepeatedly(Return(visible));
EXPECT_CALL(item(index), GetTargetDisposition())
.WillRepeatedly(
Return(content::DownloadItem::TARGET_DISPOSITION_OVERWRITE));

Powered by Google App Engine
This is Rietveld 408576698