diff options
author | noelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-17 22:47:40 +0000 |
---|---|---|
committer | noelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-17 22:47:40 +0000 |
commit | 3ab4c0af18aa95289f7d97da690e112a0cba8c77 (patch) | |
tree | 3caa5cf3362a7025254a95c01d57f288902dffdb /chrome/browser/download/download_item_unittest.cc | |
parent | b5703e977ae3c4ee693e233fb0d2de6ccc87d4b5 (diff) | |
download | chromium_src-3ab4c0af18aa95289f7d97da690e112a0cba8c77.zip chromium_src-3ab4c0af18aa95289f7d97da690e112a0cba8c77.tar.gz chromium_src-3ab4c0af18aa95289f7d97da690e112a0cba8c77.tar.bz2 |
Propagate the SafeBrowsing download protection verdict to the DownloadItem.
This is where the UI will be notified when a malicious binary is being
downloaded. The UI currently does not support displaying a warning after
the download started. We'll fix that in a separate CL.
BUG=102540
TEST=No visible changes.
Review URL: http://codereview.chromium.org/8468020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110583 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_item_unittest.cc')
-rw-r--r-- | chrome/browser/download/download_item_unittest.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/chrome/browser/download/download_item_unittest.cc b/chrome/browser/download/download_item_unittest.cc index 85edae9..1a0a4f0 100644 --- a/chrome/browser/download/download_item_unittest.cc +++ b/chrome/browser/download/download_item_unittest.cc @@ -192,8 +192,7 @@ TEST_F(DownloadItemTest, NotificationAfterSetFileCheckResults) { MockObserver safe_observer(safe_item); DownloadStateInfo state = safe_item->state_info();; - state.is_dangerous_file = false; - state.is_dangerous_url = false; + state.danger = DownloadStateInfo::NOT_DANGEROUS; safe_item->SetFileCheckResults(state); ASSERT_FALSE(safe_observer.CheckUpdated()); @@ -202,8 +201,7 @@ TEST_F(DownloadItemTest, NotificationAfterSetFileCheckResults) { MockObserver unsafeurl_observer(unsafeurl_item); state = unsafeurl_item->state_info();; - state.is_dangerous_file = false; - state.is_dangerous_url = true; + state.danger = DownloadStateInfo::DANGEROUS_URL; unsafeurl_item->SetFileCheckResults(state); ASSERT_TRUE(unsafeurl_observer.CheckUpdated()); @@ -214,8 +212,7 @@ TEST_F(DownloadItemTest, NotificationAfterSetFileCheckResults) { MockObserver unsafefile_observer(unsafefile_item); state = unsafefile_item->state_info();; - state.is_dangerous_file = true; - state.is_dangerous_url = false; + state.danger = DownloadStateInfo::DANGEROUS_FILE; unsafefile_item->SetFileCheckResults(state); ASSERT_TRUE(unsafefile_observer.CheckUpdated()); |