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

Unified Diff: net/ssl/server_bound_cert_service_unittest.cc

Issue 13130004: Don't expire certs used as channel IDs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address mattm@'s comments. Created 7 years, 9 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 | « net/ssl/server_bound_cert_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/server_bound_cert_service_unittest.cc
diff --git a/net/ssl/server_bound_cert_service_unittest.cc b/net/ssl/server_bound_cert_service_unittest.cc
index 4d0c6f471452efae4e3f53bc584346070001aef7..7f8784ca26c93a6f88f84306eb198bcf7a546bab 100644
--- a/net/ssl/server_bound_cert_service_unittest.cc
+++ b/net/ssl/server_bound_cert_service_unittest.cc
@@ -528,7 +528,7 @@ TEST_F(ServerBoundCertServiceTest, Expiration) {
TestCompletionCallback callback;
ServerBoundCertService::RequestHandle request_handle;
- // Cert still valid - synchronous completion.
+ // Cert is valid - synchronous completion.
SSLClientCertType type1;
std::string private_key_info1, der_cert1;
error = service_->GetDomainBoundCert(
@@ -541,20 +541,18 @@ TEST_F(ServerBoundCertServiceTest, Expiration) {
EXPECT_STREQ("a", private_key_info1.c_str());
EXPECT_STREQ("b", der_cert1.c_str());
- // Cert expired - New cert will be generated, asynchronous completion.
+ // Expired cert is valid as well - synchronous completion.
SSLClientCertType type2;
std::string private_key_info2, der_cert2;
error = service_->GetDomainBoundCert(
"https://expired", types, &type2, &private_key_info2, &der_cert2,
callback.callback(), &request_handle);
- EXPECT_EQ(ERR_IO_PENDING, error);
- EXPECT_TRUE(request_handle.is_active());
- error = callback.WaitForResult();
EXPECT_EQ(OK, error);
+ EXPECT_FALSE(request_handle.is_active());
EXPECT_EQ(2, service_->cert_count());
EXPECT_EQ(CLIENT_CERT_ECDSA_SIGN, type2);
- EXPECT_LT(1U, private_key_info2.size());
- EXPECT_LT(1U, der_cert2.size());
+ EXPECT_STREQ("c", private_key_info2.c_str());
+ EXPECT_STREQ("d", der_cert2.c_str());
}
#endif // !defined(USE_OPENSSL)
« no previous file with comments | « net/ssl/server_bound_cert_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698