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

Side by Side Diff: net/quic/quic_stream_factory_test.cc

Issue 242593002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Use uint32 instead of int Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/quic_stream_sequencer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_stream_factory.h" 5 #include "net/quic/quic_stream_factory.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "net/base/test_data_directory.h" 9 #include "net/base/test_data_directory.h"
10 #include "net/cert/cert_verifier.h" 10 #include "net/cert/cert_verifier.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 factory_.OnSessionClosed(session); 164 factory_.OnSessionClosed(session);
165 EXPECT_EQ(NULL, CreateIfSessionExists(destination, net_log_).get()); 165 EXPECT_EQ(NULL, CreateIfSessionExists(destination, net_log_).get());
166 EXPECT_TRUE(socket_data.at_read_eof()); 166 EXPECT_TRUE(socket_data.at_read_eof());
167 EXPECT_TRUE(socket_data.at_write_eof()); 167 EXPECT_TRUE(socket_data.at_write_eof());
168 return port; 168 return port;
169 } 169 }
170 170
171 scoped_ptr<QuicEncryptedPacket> ConstructRstPacket() { 171 scoped_ptr<QuicEncryptedPacket> ConstructRstPacket() {
172 QuicStreamId stream_id = 5; 172 QuicStreamId stream_id = 5;
173 return maker_.MakeRstPacket(1, true, stream_id, QUIC_STREAM_NO_ERROR); 173 return maker_.MakeRstPacket(
174 1, true, stream_id,
175 AdjustErrorForVersion(QUIC_RST_FLOW_CONTROL_ACCOUNTING, GetParam()));
174 } 176 }
175 177
176 MockHostResolver host_resolver_; 178 MockHostResolver host_resolver_;
177 DeterministicMockClientSocketFactory socket_factory_; 179 DeterministicMockClientSocketFactory socket_factory_;
178 MockCryptoClientStreamFactory crypto_client_stream_factory_; 180 MockCryptoClientStreamFactory crypto_client_stream_factory_;
179 MockRandom random_generator_; 181 MockRandom random_generator_;
180 QuicTestPacketMaker maker_; 182 QuicTestPacketMaker maker_;
181 MockClock* clock_; // Owned by factory_. 183 MockClock* clock_; // Owned by factory_.
182 scoped_ptr<CertVerifier> cert_verifier_; 184 scoped_ptr<CertVerifier> cert_verifier_;
183 QuicStreamFactory factory_; 185 QuicStreamFactory factory_;
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 QuicCryptoClientConfig::CachedState* cached2 = 1144 QuicCryptoClientConfig::CachedState* cached2 =
1143 crypto_config->LookupOrCreate(server_id2); 1145 crypto_config->LookupOrCreate(server_id2);
1144 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); 1146 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token());
1145 EXPECT_TRUE(cached2->source_address_token().empty()); 1147 EXPECT_TRUE(cached2->source_address_token().empty());
1146 EXPECT_FALSE(cached2->proof_valid()); 1148 EXPECT_FALSE(cached2->proof_valid());
1147 } 1149 }
1148 } 1150 }
1149 1151
1150 } // namespace test 1152 } // namespace test
1151 } // namespace net 1153 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/quic_stream_sequencer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698