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

Unified Diff: chrome/browser/history/history_unittest.cc

Issue 8008021: Add new UMA stats to get a handle on Downloads UI Usage (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix windows auto_closed_ Created 9 years, 2 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/history/history_unittest.cc
diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc
index 2cd7a2d6fa88edcee12de0bfaa72c070164509c2..b58f40ff0a560b4a4a5552cd1dfc0da443eee3f7 100644
--- a/chrome/browser/history/history_unittest.cc
+++ b/chrome/browser/history/history_unittest.cc
@@ -193,9 +193,11 @@ class HistoryTest : public testing::Test {
GURL("foo-url"),
GURL(""),
time,
+ time,
0,
512,
state,
+ 0,
0);
return db_->CreateDownload(download);
}
@@ -368,8 +370,16 @@ TEST_F(HistoryTest, ClearBrowsingData_Downloads) {
downloads[2].start_time.ToInternalValue());
// Change state so we can delete the downloads.
- EXPECT_TRUE(db_->UpdateDownload(512, DownloadItem::COMPLETE, in_progress));
- EXPECT_TRUE(db_->UpdateDownload(512, DownloadItem::CANCELLED, removing));
+ DownloadPersistentStoreInfo data;
+ data.received_bytes = 512;
+ data.state = DownloadItem::COMPLETE;
+ data.end_time = base::Time::Now();
+ data.opened = false;
+ data.db_handle = in_progress;
+ EXPECT_TRUE(db_->UpdateDownload(data));
+ data.state = DownloadItem::CANCELLED;
+ data.db_handle = removing;
+ EXPECT_TRUE(db_->UpdateDownload(data));
// Try removing from Time=0. This should delete all.
db_->RemoveDownloadsBetween(Time(), Time());

Powered by Google App Engine
This is Rietveld 408576698