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

Unified Diff: net/quic/test_tools/quic_test_utils.cc

Issue 1190823003: Remove dependency on headers stream from QuicSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0616
Patch Set: deleted an include Created 5 years, 6 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/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_test_utils.cc
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index 05784f5b6415fc40de4a26d831c75007e8a0201b..c38be577b7e1e515762796543a21975b501ea69a 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -338,37 +338,38 @@ void PacketSavingConnection::SendOrQueuePacket(QueuedPacket packet) {
NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA);
}
-MockSession::MockSession(QuicConnection* connection)
- : QuicSession(connection, DefaultQuicConfig()) {
+MockQuicSpdySession::MockQuicSpdySession(QuicConnection* connection)
+ : QuicSpdySession(connection, DefaultQuicConfig()) {
crypto_stream_.reset(new QuicCryptoStream(this));
Initialize();
ON_CALL(*this, WritevData(_, _, _, _, _, _))
.WillByDefault(testing::Return(QuicConsumedData(0, false)));
}
-MockSession::~MockSession() {
+MockQuicSpdySession::~MockQuicSpdySession() {
}
-TestServerSession::TestServerSession(
+TestQuicSpdyServerSession::TestQuicSpdyServerSession(
QuicConnection* connection,
const QuicConfig& config,
const QuicCryptoServerConfig* crypto_config)
- : QuicSession(connection, config) {
+ : QuicSpdySession(connection, config) {
crypto_stream_.reset(new QuicCryptoServerStream(crypto_config, this));
Initialize();
}
-TestServerSession::~TestServerSession() {
+TestQuicSpdyServerSession::~TestQuicSpdyServerSession() {
}
-QuicCryptoServerStream* TestServerSession::GetCryptoStream() {
+QuicCryptoServerStream* TestQuicSpdyServerSession::GetCryptoStream() {
return crypto_stream_.get();
}
-TestClientSession::TestClientSession(QuicConnection* connection,
- const QuicConfig& config,
- const QuicServerId& server_id,
- QuicCryptoClientConfig* crypto_config)
+TestQuicSpdyClientSession::TestQuicSpdyClientSession(
+ QuicConnection* connection,
+ const QuicConfig& config,
+ const QuicServerId& server_id,
+ QuicCryptoClientConfig* crypto_config)
: QuicClientSessionBase(connection, config) {
crypto_stream_.reset(new QuicCryptoClientStream(
server_id, this, CryptoTestUtils::ProofVerifyContextForTesting(),
@@ -376,9 +377,10 @@ TestClientSession::TestClientSession(QuicConnection* connection,
Initialize();
}
-TestClientSession::~TestClientSession() {}
+TestQuicSpdyClientSession::~TestQuicSpdyClientSession() {
+}
-QuicCryptoClientStream* TestClientSession::GetCryptoStream() {
+QuicCryptoClientStream* TestQuicSpdyClientSession::GetCryptoStream() {
return crypto_stream_.get();
}
@@ -793,7 +795,7 @@ void CreateClientSessionForTest(QuicServerId server_id,
QuicTime::Delta connection_start_time,
QuicCryptoClientConfig* crypto_client_config,
PacketSavingConnection** client_connection,
- TestClientSession** client_session) {
+ TestQuicSpdyClientSession** client_session) {
CHECK(crypto_client_config);
CHECK(client_connection);
CHECK(client_session);
@@ -805,8 +807,8 @@ void CreateClientSessionForTest(QuicServerId server_id,
? DefaultQuicConfigStatelessRejects()
: DefaultQuicConfig();
*client_connection = new PacketSavingConnection(Perspective::IS_CLIENT);
- *client_session = new TestClientSession(*client_connection, config, server_id,
- crypto_client_config);
+ *client_session = new TestQuicSpdyClientSession(
+ *client_connection, config, server_id, crypto_client_config);
(*client_connection)->AdvanceTime(connection_start_time);
}
@@ -814,7 +816,7 @@ void CreateServerSessionForTest(QuicServerId server_id,
QuicTime::Delta connection_start_time,
QuicCryptoServerConfig* server_crypto_config,
PacketSavingConnection** server_connection,
- TestServerSession** server_session) {
+ TestQuicSpdyServerSession** server_session) {
CHECK(server_crypto_config);
CHECK(server_connection);
CHECK(server_session);
@@ -823,7 +825,7 @@ void CreateServerSessionForTest(QuicServerId server_id,
<< "strike-register will be unhappy.";
*server_connection = new PacketSavingConnection(Perspective::IS_SERVER);
- *server_session = new TestServerSession(
+ *server_session = new TestQuicSpdyServerSession(
*server_connection, DefaultQuicConfig(), server_crypto_config);
// We advance the clock initially because the default time is zero and the
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698