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

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

Issue 13976007: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated copyright notice Created 7 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/tools/quic/quic_client_session.cc ('k') | net/tools/quic/quic_dispatcher.h » ('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/tools/quic/quic_client_session.h" 5 #include "net/tools/quic/quic_client_session.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "net/base/ip_endpoint.h" 9 #include "net/base/ip_endpoint.h"
10 #include "net/quic/test_tools/crypto_test_utils.h" 10 #include "net/quic/test_tools/crypto_test_utils.h"
(...skipping 10 matching lines...) Expand all
21 namespace test { 21 namespace test {
22 namespace { 22 namespace {
23 23
24 const char kServerHostname[] = "www.example.com"; 24 const char kServerHostname[] = "www.example.com";
25 25
26 class QuicClientSessionTest : public ::testing::Test { 26 class QuicClientSessionTest : public ::testing::Test {
27 protected: 27 protected:
28 QuicClientSessionTest() 28 QuicClientSessionTest()
29 : guid_(1), 29 : guid_(1),
30 connection_(new PacketSavingConnection(guid_, IPEndPoint(), false)), 30 connection_(new PacketSavingConnection(guid_, IPEndPoint(), false)),
31 session_(kServerHostname, connection_) { 31 session_(kServerHostname, config_, connection_, &crypto_config_) {
32 config_.SetDefaults(); 32 config_.SetDefaults();
33 crypto_config_.SetDefaults(); 33 crypto_config_.SetDefaults();
34 } 34 }
35 35
36 void CompleteCryptoHandshake() { 36 void CompleteCryptoHandshake() {
37 ASSERT_TRUE(session_.CryptoConnect()); 37 ASSERT_TRUE(session_.CryptoConnect());
38 CryptoTestUtils::HandshakeWithFakeServer( 38 CryptoTestUtils::HandshakeWithFakeServer(
39 connection_, session_.GetCryptoStream()); 39 connection_, session_.GetCryptoStream());
40 } 40 }
41 41
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // After receiving a GoAway, I should no longer be able to create outgoing 77 // After receiving a GoAway, I should no longer be able to create outgoing
78 // streams. 78 // streams.
79 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); 79 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away."));
80 EXPECT_EQ(NULL, session_.CreateOutgoingReliableStream()); 80 EXPECT_EQ(NULL, session_.CreateOutgoingReliableStream());
81 } 81 }
82 82
83 } // namespace 83 } // namespace
84 } // namespace test 84 } // namespace test
85 } // namespace tools 85 } // namespace tools
86 } // namespace net 86 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client_session.cc ('k') | net/tools/quic/quic_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698