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

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

Issue 8536035: Include the full certificate chain in the download pingback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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
===================================================================
--- chrome/browser/safe_browsing/download_protection_service_unittest.cc (revision 109680)
+++ chrome/browser/safe_browsing/download_protection_service_unittest.cc (working copy)
@@ -63,7 +63,7 @@
} // namespace
ACTION_P(SetCertificateContents, contents) {
- arg1->set_certificate_contents(contents);
+ arg1->add_certificate_chain()->add_element()->set_certificate(contents);
}
// We can't call OnSafeBrowsingResult directly because SafeBrowsingCheck does
@@ -384,8 +384,11 @@
"http://www.google.com/bla.exe",
info.referrer_url.spec()));
EXPECT_TRUE(request.has_signature());
- EXPECT_TRUE(request.signature().has_certificate_contents());
- EXPECT_EQ("dummy cert data", request.signature().certificate_contents());
+ ASSERT_EQ(1, request.signature().certificate_chain_size());
+ const ClientDownloadRequest_CertificateChain& chain =
+ request.signature().certificate_chain(0);
+ ASSERT_EQ(1, chain.element_size());
+ EXPECT_EQ("dummy cert data", chain.element(0).certificate());
// Simulate the request finishing.
MessageLoop::current()->PostTask(
@@ -437,7 +440,7 @@
"http://www.google.com/bla.exe",
info.referrer_url.spec()));
EXPECT_TRUE(request.has_signature());
- EXPECT_FALSE(request.signature().has_certificate_contents());
+ EXPECT_EQ(0, request.signature().certificate_chain_size());
// Simulate the request finishing.
MessageLoop::current()->PostTask(

Powered by Google App Engine
This is Rietveld 408576698