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

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

Issue 15937012: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small bug fixes Created 7 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 unified diff | Download patch | Annotate | Revision Log
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_client_session.h" 5 #include "net/quic/quic_client_session.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "net/base/capturing_net_log.h" 9 #include "net/base/capturing_net_log.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 12 matching lines...) Expand all
23 namespace { 23 namespace {
24 24
25 const char kServerHostname[] = "www.example.com"; 25 const char kServerHostname[] = "www.example.com";
26 26
27 class QuicClientSessionTest : public ::testing::Test { 27 class QuicClientSessionTest : public ::testing::Test {
28 protected: 28 protected:
29 QuicClientSessionTest() 29 QuicClientSessionTest()
30 : guid_(1), 30 : guid_(1),
31 connection_(new PacketSavingConnection(guid_, IPEndPoint(), false)), 31 connection_(new PacketSavingConnection(guid_, IPEndPoint(), false)),
32 session_(connection_, NULL, NULL, NULL, kServerHostname, 32 session_(connection_, NULL, NULL, NULL, kServerHostname,
33 QuicConfig(), &crypto_config_, &net_log_) { 33 DefaultQuicConfig(), &crypto_config_, &net_log_) {
34 session_.config()->SetDefaults(); 34 session_.config()->SetDefaults();
35 crypto_config_.SetDefaults(); 35 crypto_config_.SetDefaults();
36 QuicClientSessionPeer::SetMaxOpenStreams(&session_, 1, 1); 36 QuicClientSessionPeer::SetMaxOpenStreams(&session_, 1, 1);
37 } 37 }
38 38
39 void CompleteCryptoHandshake() { 39 void CompleteCryptoHandshake() {
40 ASSERT_EQ(ERR_IO_PENDING, 40 ASSERT_EQ(ERR_IO_PENDING,
41 session_.CryptoConnect(callback_.callback())); 41 session_.CryptoConnect(callback_.callback()));
42 CryptoTestUtils::HandshakeWithFakeServer( 42 CryptoTestUtils::HandshakeWithFakeServer(
43 connection_, session_.GetCryptoStream()); 43 connection_, session_.GetCryptoStream());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 // After receiving a GoAway, I should no longer be able to create outgoing 96 // After receiving a GoAway, I should no longer be able to create outgoing
97 // streams. 97 // streams.
98 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); 98 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away."));
99 EXPECT_EQ(NULL, session_.CreateOutgoingReliableStream()); 99 EXPECT_EQ(NULL, session_.CreateOutgoingReliableStream());
100 } 100 }
101 101
102 } // namespace 102 } // namespace
103 } // namespace test 103 } // namespace test
104 } // namespace net 104 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698