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

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

Issue 12252024: Revert 182331 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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_client_session.cc ('k') | net/quic/quic_http_stream.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/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 "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/base/capturing_net_log.h"
11 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
12 #include "net/quic/crypto/crypto_protocol.h" 11 #include "net/quic/crypto/crypto_protocol.h"
13 #include "net/quic/test_tools/quic_test_utils.h" 12 #include "net/quic/test_tools/quic_test_utils.h"
14 13
15 using testing::_; 14 using testing::_;
16 15
17 namespace net { 16 namespace net {
18 namespace test { 17 namespace test {
19 namespace { 18 namespace {
20 19
21 const char kServerHostname[] = "www.example.com"; 20 const char kServerHostname[] = "www.example.com";
22 21
23 class QuicClientSessionTest : public ::testing::Test { 22 class QuicClientSessionTest : public ::testing::Test {
24 protected: 23 protected:
25 QuicClientSessionTest() 24 QuicClientSessionTest()
26 : guid_(1), 25 : guid_(1),
27 connection_(new PacketSavingConnection(guid_, IPEndPoint())), 26 connection_(new PacketSavingConnection(guid_, IPEndPoint())),
28 session_(connection_, NULL, NULL, kServerHostname, NULL) { 27 session_(connection_, NULL, NULL, kServerHostname) {
29 } 28 }
30 29
31 QuicGuid guid_; 30 QuicGuid guid_;
32 PacketSavingConnection* connection_; 31 PacketSavingConnection* connection_;
33 QuicClientSession session_; 32 QuicClientSession session_;
34 QuicConnectionVisitorInterface* visitor_; 33 QuicConnectionVisitorInterface* visitor_;
35 TestCompletionCallback callback_; 34 TestCompletionCallback callback_;
36 }; 35 };
37 36
38 TEST_F(QuicClientSessionTest, CryptoConnectSendsCorrectData) { 37 TEST_F(QuicClientSessionTest, CryptoConnectSendsCorrectData) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 EXPECT_FALSE(session_.CreateOutgoingReliableStream()); 70 EXPECT_FALSE(session_.CreateOutgoingReliableStream());
72 71
73 // Close a stream and ensure I can now open a new one. 72 // Close a stream and ensure I can now open a new one.
74 session_.CloseStream(streams[0]->id()); 73 session_.CloseStream(streams[0]->id());
75 EXPECT_TRUE(session_.CreateOutgoingReliableStream()); 74 EXPECT_TRUE(session_.CreateOutgoingReliableStream());
76 } 75 }
77 76
78 } // namespace 77 } // namespace
79 } // namespace test 78 } // namespace test
80 } // namespace net 79 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/quic/quic_http_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698