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

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

Issue 2029903002: Add token field to ClientSafeBrowsingReportReqeust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak comments Created 4 years, 6 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: 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 4fd8b8756b07fd95757adb511626788242e9d613..118e5734fd0c7b1dd44b3b47cae6b4f0fb432bfa 100644
--- a/content/browser/download/download_item_impl_unittest.cc
+++ b/content/browser/download/download_item_impl_unittest.cc
@@ -15,6 +15,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/stl_util.h"
+#include "base/strings/string_util.h"
#include "base/threading/thread.h"
#include "content/browser/byte_stream.h"
#include "content/browser/download/download_create_info.h"
@@ -756,7 +757,8 @@ TEST_F(DownloadItemTest, NotificationAfterOnContentCheckCompleted) {
safe_item->OnAllDataSaved(0, std::unique_ptr<crypto::SecureHash>());
EXPECT_TRUE(safe_observer.CheckAndResetDownloadUpdated());
- safe_item->OnContentCheckCompleted(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS);
+ safe_item->OnContentCheckCompleted(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
+ base::EmptyString());
EXPECT_TRUE(safe_observer.CheckAndResetDownloadUpdated());
CleanupItem(safe_item, download_file, DownloadItem::IN_PROGRESS);
@@ -769,7 +771,8 @@ TEST_F(DownloadItemTest, NotificationAfterOnContentCheckCompleted) {
unsafeurl_item->OnAllDataSaved(0, std::unique_ptr<crypto::SecureHash>());
EXPECT_TRUE(unsafeurl_observer.CheckAndResetDownloadUpdated());
- unsafeurl_item->OnContentCheckCompleted(DOWNLOAD_DANGER_TYPE_DANGEROUS_URL);
+ unsafeurl_item->OnContentCheckCompleted(DOWNLOAD_DANGER_TYPE_DANGEROUS_URL,
+ base::EmptyString());
EXPECT_TRUE(unsafeurl_observer.CheckAndResetDownloadUpdated());
EXPECT_CALL(*mock_delegate(), ShouldCompleteDownload(_, _))
@@ -787,7 +790,8 @@ TEST_F(DownloadItemTest, NotificationAfterOnContentCheckCompleted) {
unsafefile_item->OnAllDataSaved(0, std::unique_ptr<crypto::SecureHash>());
EXPECT_TRUE(unsafefile_observer.CheckAndResetDownloadUpdated());
- unsafefile_item->OnContentCheckCompleted(DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE);
+ unsafefile_item->OnContentCheckCompleted(DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE,
+ base::EmptyString());
EXPECT_TRUE(unsafefile_observer.CheckAndResetDownloadUpdated());
EXPECT_CALL(*mock_delegate(), ShouldCompleteDownload(_, _))
@@ -1470,7 +1474,8 @@ TEST_F(DownloadItemTest, CompleteDelegate_SetDanger) {
delegate_callback.Reset();
EXPECT_FALSE(item->IsDangerous());
item->OnContentCheckCompleted(
- content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE);
+ content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE,
+ base::EmptyString());
EXPECT_EQ(DownloadItem::IN_PROGRESS, item->GetState());
copy_delegate_callback.Run();
ASSERT_TRUE(delegate_callback.is_null());

Powered by Google App Engine
This is Rietveld 408576698