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

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

Issue 2292963004: Make verdict optional in csd proto. (Closed)
Patch Set: Update the unit test to use SAFE as the default value when encountering an invalid value. Created 4 years, 4 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 | « no previous file | chrome/common/safe_browsing/csd.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 22c9bae31b25eb536a8b6d62f18570ebee0c3996..06d100c3d46ceaaa272f7240aab759daa4ba9ef7 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -1079,7 +1079,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadSuccess) {
ClearClientDownloadRequest();
}
{
- // Invalid response should result in UNKNOWN.
+ // Invalid response should result in SAFE (default value in proto).
ClientDownloadResponse invalid_response;
factory.SetFakeResponse(DownloadProtectionService::GetDownloadRequestUrl(),
invalid_response.SerializePartialAsString(),
@@ -1089,7 +1089,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadSuccess) {
&item, base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback,
base::Unretained(this), run_loop.QuitClosure()));
run_loop.Run();
- EXPECT_TRUE(IsResult(DownloadProtectionService::UNKNOWN));
+ EXPECT_TRUE(IsResult(DownloadProtectionService::SAFE));
EXPECT_TRUE(HasClientDownloadRequest());
ClearClientDownloadRequest();
EXPECT_FALSE(DownloadFeedbackService::GetPingsForDownloadForTesting(
« no previous file with comments | « no previous file | chrome/common/safe_browsing/csd.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698