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

Unified Diff: net/tools/quic/quic_dispatcher_test.cc

Issue 2322233004: Landing Recent QUIC changes until Sun Sep 4 03:41:00 (Closed)
Patch Set: Remove simulation files from the build. Created 4 years, 3 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/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_in_memory_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_dispatcher_test.cc
diff --git a/net/tools/quic/quic_dispatcher_test.cc b/net/tools/quic/quic_dispatcher_test.cc
index bdd3f6af440081869d803fe20dd1a664c8721ca1..a88a2eadde193d4c3fa10e0281893cd483ce5366 100644
--- a/net/tools/quic/quic_dispatcher_test.cc
+++ b/net/tools/quic/quic_dispatcher_test.cc
@@ -25,7 +25,7 @@
#include "net/tools/quic/quic_epoll_alarm_factory.h"
#include "net/tools/quic/quic_epoll_connection_helper.h"
#include "net/tools/quic/quic_packet_writer_wrapper.h"
-#include "net/tools/quic/quic_simple_server_session_helper.h"
+#include "net/tools/quic/quic_simple_crypto_server_stream_helper.h"
#include "net/tools/quic/quic_time_wait_list_manager.h"
#include "net/tools/quic/stateless_rejector.h"
#include "net/tools/quic/test_tools/mock_quic_time_wait_list_manager.h"
@@ -89,7 +89,7 @@ class TestQuicSpdyServerSession : public QuicServerSessionBase {
QuicCompressedCertsCache* compressed_certs_cache) override {
return new QuicCryptoServerStream(
crypto_config, compressed_certs_cache,
- FLAGS_enable_quic_stateless_reject_support, this);
+ FLAGS_enable_quic_stateless_reject_support, this, stream_helper());
}
void SetCryptoStream(QuicCryptoServerStream* crypto_stream) {
@@ -100,6 +100,10 @@ class TestQuicSpdyServerSession : public QuicServerSessionBase {
return crypto_stream_;
}
+ QuicCryptoServerStream::Helper* stream_helper() {
+ return QuicServerSessionBase::stream_helper();
+ }
+
private:
QuicCryptoServerStreamBase* crypto_stream_;
@@ -118,8 +122,9 @@ class TestDispatcher : public QuicDispatcher {
version_manager,
std::unique_ptr<QuicEpollConnectionHelper>(
new QuicEpollConnectionHelper(eps, QuicAllocator::BUFFER_POOL)),
- std::unique_ptr<QuicServerSessionBase::Helper>(
- new QuicSimpleServerSessionHelper(QuicRandom::GetInstance())),
+ std::unique_ptr<QuicCryptoServerStream::Helper>(
+ new QuicSimpleCryptoServerStreamHelper(
+ QuicRandom::GetInstance())),
std::unique_ptr<QuicEpollAlarmFactory>(
new QuicEpollAlarmFactory(eps))) {}
@@ -528,11 +533,13 @@ class MockQuicCryptoServerStream : public QuicCryptoServerStream {
public:
MockQuicCryptoServerStream(const QuicCryptoServerConfig& crypto_config,
QuicCompressedCertsCache* compressed_certs_cache,
- QuicServerSessionBase* session)
+ QuicServerSessionBase* session,
+ QuicCryptoServerStream::Helper* helper)
: QuicCryptoServerStream(&crypto_config,
compressed_certs_cache,
FLAGS_enable_quic_stateless_reject_support,
- session) {}
+ session,
+ helper) {}
void set_handshake_confirmed_for_testing(bool handshake_confirmed) {
handshake_confirmed_ = handshake_confirmed;
}
@@ -613,7 +620,7 @@ class QuicDispatcherStatelessRejectTest
GetParam().client_supports_statelesss_rejects;
}
- // Sets up dispatcher_, sesession1_, and crypto_stream1_ based on
+ // Sets up dispatcher_, session1_, and crypto_stream1_ based on
// the test parameters.
QuicServerSessionBase* CreateSessionBasedOnTestParams(
QuicConnectionId connection_id,
@@ -624,7 +631,7 @@ class QuicDispatcherStatelessRejectTest
crypto_stream1_ = new MockQuicCryptoServerStream(
crypto_config_, QuicDispatcherPeer::GetCache(dispatcher_.get()),
- session1_);
+ session1_, session1_->stream_helper());
session1_->SetCryptoStream(crypto_stream1_);
crypto_stream1_->set_handshake_confirmed_for_testing(
GetParam().crypto_handshake_successful);
« no previous file with comments | « net/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_in_memory_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698