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

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

Issue 10735089: DownloadManager::Observer::OnDownloadCreated (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cbc583852176f42d7d48e7e7ea50d7732b604998..8bdd159d1dcde3349f363a687afee24312ff8763 100644
--- a/content/browser/download/download_item_impl_unittest.cc
+++ b/content/browser/download/download_item_impl_unittest.cc
@@ -299,8 +299,8 @@ TEST_F(DownloadItemTest, NotificationAfterOnTargetPathDetermined) {
DownloadItemImpl* safe_item = CreateDownloadItem(DownloadItem::IN_PROGRESS);
MockObserver safe_observer(safe_item);
- // Calling OnTargetPathDetermined does not trigger notification if danger type
- // is NOT_DANGEROUS.
+ // Calling OnTargetPathDetermined triggers notification regardless of danger
+ // type.
safe_item->OnTargetPathDetermined(
FilePath(kDummyPath), DownloadItem::TARGET_DISPOSITION_OVERWRITE,
content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS);
@@ -315,7 +315,7 @@ TEST_F(DownloadItemTest, NotificationAfterOnTargetPathDetermined) {
dangerous_item->OnTargetPathDetermined(
FilePath(kDummyPath), DownloadItem::TARGET_DISPOSITION_OVERWRITE,
content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE);
- EXPECT_TRUE(dangerous_observer.CheckUpdated());
+ EXPECT_FALSE(dangerous_observer.CheckUpdated());
}
TEST_F(DownloadItemTest, NotificationAfterOnTargetPathSelected) {
@@ -342,7 +342,7 @@ TEST_F(DownloadItemTest, NotificationAfterOnContentCheckCompleted) {
EXPECT_TRUE(safe_observer.CheckUpdated());
safe_item->OnContentCheckCompleted(
content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS);
- EXPECT_FALSE(safe_observer.CheckUpdated());
+ EXPECT_TRUE(safe_observer.CheckUpdated());
// Setting to unsafe url or unsafe file should trigger a notification.
DownloadItemImpl* unsafeurl_item =
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698