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

Unified Diff: webrtc/p2p/quic/quicsession_unittest.cc

Issue 1910633003: Update QuicTransportChannel to latest version of libquic (Chromium: f03d2c62) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Sync to upstream Created 4 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 | « webrtc/p2p/quic/quicsession.cc ('k') | webrtc/p2p/quic/quictransportchannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/quic/quicsession_unittest.cc
diff --git a/webrtc/p2p/quic/quicsession_unittest.cc b/webrtc/p2p/quic/quicsession_unittest.cc
index eae0a2b451b0ca69a708134dbb1f8db89e74be89..2f3aaae332220588931ea2064f9d81168900e0a7 100644
--- a/webrtc/p2p/quic/quicsession_unittest.cc
+++ b/webrtc/p2p/quic/quicsession_unittest.cc
@@ -37,6 +37,7 @@ using net::ProofVerifyContext;
using net::ProofVerifyDetails;
using net::QuicByteCount;
using net::QuicClock;
+using net::QuicCompressedCertsCache;
using net::QuicConfig;
using net::QuicConnection;
using net::QuicCryptoClientConfig;
@@ -112,11 +113,14 @@ class FakeProofVerifier : public net::ProofVerifier {
// ProofVerifier override
net::QuicAsyncStatus VerifyProof(
const std::string& hostname,
+ const uint16_t port,
const std::string& server_config,
+ net::QuicVersion quic_version,
+ base::StringPiece chlo_hash,
const std::vector<std::string>& certs,
const std::string& cert_sct,
const std::string& signature,
- const net::ProofVerifyContext* verify_context,
+ const ProofVerifyContext* context,
std::string* error_details,
std::unique_ptr<net::ProofVerifyDetails>* verify_details,
net::ProofVerifierCallback* callback) override {
@@ -231,7 +235,10 @@ class QuicSessionForTest : public QuicSession {
class QuicSessionTest : public ::testing::Test,
public QuicCryptoClientStream::ProofHandler {
public:
- QuicSessionTest() : quic_helper_(rtc::Thread::Current()) {}
+ QuicSessionTest()
+ : quic_helper_(rtc::Thread::Current()),
+ quic_compressed_certs_cache_(
+ QuicCompressedCertsCache::kQuicCompressedCertsCacheSize) {}
// Instantiates |client_peer_| and |server_peer_|.
void CreateClientAndServerSessions();
@@ -268,6 +275,7 @@ class QuicSessionTest : public ::testing::Test,
QuicConnectionHelper quic_helper_;
QuicConfig config_;
QuicClock clock_;
+ QuicCompressedCertsCache quic_compressed_certs_cache_;
std::unique_ptr<QuicSessionForTest> client_peer_;
std::unique_ptr<QuicSessionForTest> server_peer_;
@@ -324,7 +332,10 @@ QuicCryptoServerStream* QuicSessionTest::CreateCryptoServerStream(
QuicServerConfigProtobuf* primary_config = server_config->GenerateConfig(
QuicRandom::GetInstance(), &clock_, options);
server_config->AddConfig(primary_config, clock_.WallNow());
- return new QuicCryptoServerStream(server_config, session);
+ bool use_stateless_rejects_if_peer_supported = false;
+ return new QuicCryptoServerStream(
+ server_config, &quic_compressed_certs_cache_,
+ use_stateless_rejects_if_peer_supported, session);
}
std::unique_ptr<QuicConnection> QuicSessionTest::CreateConnection(
@@ -358,8 +369,8 @@ void QuicSessionTest::TestStreamConnection(QuicSessionForTest* from_session,
ASSERT_TRUE(from_session->IsEncryptionEstablished());
ASSERT_TRUE(to_session->IsEncryptionEstablished());
- string from_key;
- string to_key;
+ std::string from_key;
+ std::string to_key;
bool from_success = from_session->ExportKeyingMaterial(
kExporterLabel, kExporterContext, kExporterContextLen, &from_key);
« no previous file with comments | « webrtc/p2p/quic/quicsession.cc ('k') | webrtc/p2p/quic/quictransportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698