diff options
author | georgey@chromium.org <georgey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-30 22:51:46 +0000 |
---|---|---|
committer | georgey@chromium.org <georgey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-30 22:51:46 +0000 |
commit | 024f2f060ad0bdab9b0e8008973bde64bf04bd28 (patch) | |
tree | 7b0241021bb0731f41d387e0d42a6db6127a6008 /chrome/browser/history/history_unittest.cc | |
parent | 2afe4b18b33efe4751d04d0cfc7a512e746654ad (diff) | |
download | chromium_src-024f2f060ad0bdab9b0e8008973bde64bf04bd28.zip chromium_src-024f2f060ad0bdab9b0e8008973bde64bf04bd28.tar.gz chromium_src-024f2f060ad0bdab9b0e8008973bde64bf04bd28.tar.bz2 |
Fix for bug 37909: "Clear All" in incognito downloads window will clear all, including non-incognito downloads.
BUG=37909
TEST=Open regular and incognito download pages. "Clear all" on incognito will clear all, but pending downloads. In regular window it would clear all, but pending and incognito.
Review URL: http://codereview.chromium.org/1807007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46141 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/history_unittest.cc')
-rw-r--r-- | chrome/browser/history/history_unittest.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc index 00e9154..c0b65b3 100644 --- a/chrome/browser/history/history_unittest.cc +++ b/chrome/browser/history/history_unittest.cc @@ -382,6 +382,22 @@ TEST_F(HistoryTest, ClearBrowsingData_Downloads) { db_->RemoveDownloadsBetween(Time(), Time()); db_->QueryDownloads(&downloads); EXPECT_EQ(0U, downloads.size()); + + // Check removal of downloads stuck in IN_PROGRESS state. + EXPECT_NE(0, AddDownload(DownloadItem::COMPLETE, month_ago)); + EXPECT_NE(0, AddDownload(DownloadItem::IN_PROGRESS, month_ago)); + db_->QueryDownloads(&downloads); + EXPECT_EQ(2U, downloads.size()); + db_->RemoveDownloadsBetween(Time(), Time()); + db_->QueryDownloads(&downloads); + // IN_PROGRESS download should remain. It it indicated as "Canceled" + EXPECT_EQ(1U, downloads.size()); + db_->CleanUpInProgressEntries(); + db_->QueryDownloads(&downloads); + EXPECT_EQ(1U, downloads.size()); + db_->RemoveDownloadsBetween(Time(), Time()); + db_->QueryDownloads(&downloads); + EXPECT_EQ(0U, downloads.size()); } TEST_F(HistoryTest, AddPage) { |