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

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

Issue 2856243003: Revert of Landing Recent QUIC changes until Sat Apr 29 00:22:04 2017 +0000 (Closed)
Patch Set: Created 3 years, 7 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.cc ('k') | net/tools/quic/quic_client_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/end_to_end_test.cc
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index 46e1ee910f9a426114582279f150de05ee4a9eb6..8e0a816be123b6a428b09d0e0f9dab399adb9d2b 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -603,16 +603,6 @@
stream_factory_ = factory;
}
- QuicStreamId GetNthClientInitiatedId(int n) {
- return QuicSpdySessionPeer::GetNthClientInitiatedStreamId(
- *client_->client()->session(), n);
- }
-
- QuicStreamId GetNthServerInitiatedId(int n) {
- return QuicSpdySessionPeer::GetNthServerInitiatedStreamId(
- *client_->client()->session(), n);
- }
-
bool initialized_;
QuicSocketAddress server_address_;
string server_hostname_;
@@ -1207,8 +1197,7 @@
// Force the client to write with a stream ID belonging to a nonexistent
// server-side stream.
- QuicSpdySession* session = client_->client()->session();
- QuicSessionPeer::SetNextOutgoingStreamId(session, GetNthServerInitiatedId(0));
+ QuicSessionPeer::SetNextOutgoingStreamId(client_->client()->session(), 2);
client_->SendCustomSynchronousRequest(headers, body);
EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error());
@@ -1299,7 +1288,8 @@
EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed());
// Make the client misbehave after negotiation.
- const int kServerMaxStreams = kMaxStreamsMinimumIncrement + 1;
+ const int kServerMaxStreams =
+ kMaxStreamsMinimumIncrement + kServerMaxIncomingDynamicStreams;
QuicSessionPeer::SetMaxOpenOutgoingStreams(client_->client()->session(),
kServerMaxStreams + 1);
@@ -1553,7 +1543,7 @@
client_->client()->WaitForEvents();
// Transmit the cancel, and ensure the connection is torn down properly.
SetPacketLossPercentage(0);
- QuicStreamId stream_id = GetNthClientInitiatedId(0);
+ QuicStreamId stream_id = kClientDataStreamId1;
session->SendRstStream(stream_id, QUIC_STREAM_CANCELLED, 0);
// WaitForEvents waits 50ms and returns true if there are outstanding
@@ -2427,9 +2417,6 @@
return QuicMakeUnique<ClientStreamThatDropsBody>(GetNextOutgoingStreamId(),
this);
}
- std::unique_ptr<QuicStream> CreateStream(QuicStreamId id) override {
- return QuicMakeUnique<ClientStreamThatDropsBody>(id, this);
- }
};
class MockableQuicClientThatDropsBody : public MockableQuicClient {
@@ -2467,9 +2454,8 @@
config,
supported_versions) {
set_client(new MockableQuicClientThatDropsBody(
- server_address,
- QuicServerId(server_hostname, server_address.port(),
- PRIVACY_MODE_DISABLED),
+ server_address, QuicServerId(server_hostname, server_address.port(),
+ PRIVACY_MODE_DISABLED),
config, supported_versions, epoll_server()));
}
~QuicTestClientThatDropsBody() override {}
@@ -2580,8 +2566,8 @@
EXPECT_EQ("500", client_->response_headers()->find(":status")->second);
// Receive the reset stream from server on early response.
- QuicStream* stream = client_->client()->session()->GetOrCreateStream(
- GetNthClientInitiatedId(0));
+ QuicStream* stream =
+ client_->client()->session()->GetOrCreateStream(kClientDataStreamId1);
// The stream is reset by server's reset stream.
EXPECT_EQ(stream, nullptr);
}
« no previous file with comments | « net/quic/test_tools/quic_test_utils.cc ('k') | net/tools/quic/quic_client_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698