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

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

Issue 1009543004: Create a Perspective enum to use instead of a bool is_server to improve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NET_EXPORT_PRIVATE to fix compiler error Created 5 years, 9 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
« no previous file with comments | « net/tools/quic/quic_dispatcher_test.cc ('k') | net/tools/quic/quic_spdy_client_stream_test.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_server_session.h" 5 #include "net/tools/quic/quic_server_session.h"
6 6
7 #include "net/quic/crypto/cached_network_parameters.h" 7 #include "net/quic/crypto/cached_network_parameters.h"
8 #include "net/quic/crypto/quic_crypto_server_config.h" 8 #include "net/quic/crypto/quic_crypto_server_config.h"
9 #include "net/quic/crypto/quic_random.h" 9 #include "net/quic/crypto/quic_random.h"
10 #include "net/quic/quic_connection.h" 10 #include "net/quic/quic_connection.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 QuicServerSessionTest() 65 QuicServerSessionTest()
66 : crypto_config_(QuicCryptoServerConfig::TESTING, 66 : crypto_config_(QuicCryptoServerConfig::TESTING,
67 QuicRandom::GetInstance()) { 67 QuicRandom::GetInstance()) {
68 config_.SetMaxStreamsPerConnection(kMaxStreamsForTest, 68 config_.SetMaxStreamsPerConnection(kMaxStreamsForTest,
69 kMaxStreamsForTest); 69 kMaxStreamsForTest);
70 config_.SetInitialStreamFlowControlWindowToSend( 70 config_.SetInitialStreamFlowControlWindowToSend(
71 kInitialStreamFlowControlWindowForTest); 71 kInitialStreamFlowControlWindowForTest);
72 config_.SetInitialSessionFlowControlWindowToSend( 72 config_.SetInitialSessionFlowControlWindowToSend(
73 kInitialSessionFlowControlWindowForTest); 73 kInitialSessionFlowControlWindowForTest);
74 74
75 connection_ = 75 connection_ = new StrictMock<MockConnection>(Perspective::IS_SERVER,
76 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); 76 SupportedVersions(GetParam()));
77 session_.reset(new QuicServerSession(config_, connection_, &owner_)); 77 session_.reset(new QuicServerSession(config_, connection_, &owner_));
78 MockClock clock; 78 MockClock clock;
79 handshake_message_.reset(crypto_config_.AddDefaultConfig( 79 handshake_message_.reset(crypto_config_.AddDefaultConfig(
80 QuicRandom::GetInstance(), &clock, 80 QuicRandom::GetInstance(), &clock,
81 QuicCryptoServerConfig::ConfigOptions())); 81 QuicCryptoServerConfig::ConfigOptions()));
82 session_->InitializeSession(crypto_config_); 82 session_->InitializeSession(crypto_config_);
83 visitor_ = QuicConnectionPeer::GetVisitor(connection_); 83 visitor_ = QuicConnectionPeer::GetVisitor(connection_);
84 } 84 }
85 85
86 StrictMock<MockQuicServerSessionVisitor> owner_; 86 StrictMock<MockQuicServerSessionVisitor> owner_;
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 cached_network_params.set_serving_region(kTestServingRegion); 417 cached_network_params.set_serving_region(kTestServingRegion);
418 crypto_stream->set_previous_cached_network_params(cached_network_params); 418 crypto_stream->set_previous_cached_network_params(cached_network_params);
419 EXPECT_CALL(*connection_, ResumeConnectionState(_)).Times(1); 419 EXPECT_CALL(*connection_, ResumeConnectionState(_)).Times(1);
420 session_->OnConfigNegotiated(); 420 session_->OnConfigNegotiated();
421 } 421 }
422 422
423 } // namespace 423 } // namespace
424 } // namespace test 424 } // namespace test
425 } // namespace tools 425 } // namespace tools
426 } // namespace net 426 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher_test.cc ('k') | net/tools/quic/quic_spdy_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698