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

Unified Diff: chrome/browser/safe_browsing/download_protection_service_unittest.cc

Issue 2029903002: Add token field to ClientSafeBrowsingReportReqeust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit in test 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: chrome/browser/safe_browsing/download_protection_service_unittest.cc
diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
index c3ccd7178c2e567d9bf3d9aedb20e0f984379ca4..f48fb8ea7d0953bf31453477e887e88b7153886a 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -1853,6 +1853,17 @@ TEST_F(DownloadProtectionServiceTest, ShowDetailsForDownloadHasContext) {
&mock_page_navigator);
}
+TEST_F(DownloadProtectionServiceTest, GetAndSetDownloadPingToken) {
+ content::MockDownloadItem item;
+ EXPECT_TRUE(DownloadProtectionService::GetDownloadPingToken(&item).empty());
+ std::string token = "download_ping_token";
+ DownloadProtectionService::SetDownloadPingToken(&item, token);
+ EXPECT_EQ(token, DownloadProtectionService::GetDownloadPingToken(&item));
+
+ DownloadProtectionService::SetDownloadPingToken(&item, std::string());
+ EXPECT_TRUE(DownloadProtectionService::GetDownloadPingToken(&item).empty());
+}
+
TEST_F(DownloadProtectionServiceTest, PPAPIDownloadRequest_Unsupported) {
base::FilePath default_file_path(FILE_PATH_LITERAL("/foo/bar/test.txt"));
std::vector<base::FilePath::StringType> alternate_extensions{

Powered by Google App Engine
This is Rietveld 408576698