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

Unified Diff: remoting/host/token_validator_base_unittest.cc

Issue 2838243002: Remove client_certs from SSLCertRequestInfo. (Closed)
Patch Set: revert stray whitespace change Created 3 years, 8 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 | « remoting/host/token_validator_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/token_validator_base_unittest.cc
diff --git a/remoting/host/token_validator_base_unittest.cc b/remoting/host/token_validator_base_unittest.cc
index ddff75575d3d7bcfa7c1975775450b1c71a346fe..4404771e2c851838acbe5dca265e3b913d2bd884 100644
--- a/remoting/host/token_validator_base_unittest.cc
+++ b/remoting/host/token_validator_base_unittest.cc
@@ -39,7 +39,7 @@ class TestTokenValidator : TokenValidatorBase {
explicit TestTokenValidator(const ThirdPartyAuthConfig& config);
~TestTokenValidator() override;
- void SelectCertificates(net::CertificateList* selected_certs);
+ void SelectCertificates(net::CertificateList selected_certs);
void ExpectContinueWithCertificate(net::X509Certificate* client_cert);
@@ -60,8 +60,8 @@ TestTokenValidator::TestTokenValidator(const ThirdPartyAuthConfig& config) :
TestTokenValidator::~TestTokenValidator() {}
void TestTokenValidator::SelectCertificates(
- net::CertificateList* selected_certs) {
- OnCertificatesSelected(selected_certs, nullptr);
+ net::CertificateList selected_certs) {
+ OnCertificatesSelected(nullptr, std::move(selected_certs));
}
void TestTokenValidator::ExpectContinueWithCertificate(
@@ -116,43 +116,43 @@ TEST_F(TokenValidatorBaseTest, TestSelectCertificate) {
// No certificate.
net::CertificateList certificates {};
token_validator_->ExpectContinueWithCertificate(nullptr);
- token_validator_->SelectCertificates(&certificates);
+ token_validator_->SelectCertificates(std::move(certificates));
// One invalid certificate.
certificates = { cert_expired_5_minutes_ago };
token_validator_->ExpectContinueWithCertificate(nullptr);
- token_validator_->SelectCertificates(&certificates);
+ token_validator_->SelectCertificates(std::move(certificates));
// One valid certificate.
certificates = { cert_start_5min_expire_5min };
token_validator_->ExpectContinueWithCertificate(
cert_start_5min_expire_5min.get());
- token_validator_->SelectCertificates(&certificates);
+ token_validator_->SelectCertificates(std::move(certificates));
// One valid one invalid.
certificates = { cert_expired_5_minutes_ago, cert_start_5min_expire_5min };
token_validator_->ExpectContinueWithCertificate(
cert_start_5min_expire_5min.get());
- token_validator_->SelectCertificates(&certificates);
+ token_validator_->SelectCertificates(std::move(certificates));
// Two valid certs. Choose latest created.
certificates = { cert_start_10min_expire_5min, cert_start_5min_expire_5min };
token_validator_->ExpectContinueWithCertificate(
cert_start_5min_expire_5min.get());
- token_validator_->SelectCertificates(&certificates);
+ token_validator_->SelectCertificates(std::move(certificates));
// Two valid certs. Choose latest expires.
certificates = { cert_start_5min_expire_5min, cert_start_5min_expire_10min };
token_validator_->ExpectContinueWithCertificate(
cert_start_5min_expire_10min.get());
- token_validator_->SelectCertificates(&certificates);
+ token_validator_->SelectCertificates(std::move(certificates));
// Pick the best given all certificates.
certificates = { cert_expired_5_minutes_ago, cert_start_5min_expire_5min,
cert_start_5min_expire_10min, cert_start_10min_expire_5min };
token_validator_->ExpectContinueWithCertificate(
cert_start_5min_expire_10min.get());
- token_validator_->SelectCertificates(&certificates);
+ token_validator_->SelectCertificates(std::move(certificates));
}
} // namespace remoting
« no previous file with comments | « remoting/host/token_validator_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698