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

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

Issue 102313005: Remove the is_server argument from the QuicSession constructor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_server_session.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/tools/quic/quic_dispatcher.h" 5 #include "net/tools/quic/quic_dispatcher.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/string_piece.h" 9 #include "base/strings/string_piece.h"
10 #include "net/quic/crypto/crypto_handshake.h" 10 #include "net/quic/crypto/crypto_handshake.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 private: 69 private:
70 QuicDispatcher* dispatcher_; 70 QuicDispatcher* dispatcher_;
71 }; 71 };
72 72
73 QuicSession* CreateSession(QuicDispatcher* dispatcher, 73 QuicSession* CreateSession(QuicDispatcher* dispatcher,
74 QuicGuid guid, 74 QuicGuid guid,
75 const IPEndPoint& addr, 75 const IPEndPoint& addr,
76 MockSession** session) { 76 MockSession** session) {
77 MockServerConnection* connection = new MockServerConnection(guid, dispatcher); 77 MockServerConnection* connection = new MockServerConnection(guid, dispatcher);
78 *session = new MockSession(connection, true); 78 *session = new MockSession(connection);
79 ON_CALL(*connection, SendConnectionClose(_)).WillByDefault( 79 ON_CALL(*connection, SendConnectionClose(_)).WillByDefault(
80 WithoutArgs(Invoke( 80 WithoutArgs(Invoke(
81 connection, &MockServerConnection::UnregisterOnConnectionClosed))); 81 connection, &MockServerConnection::UnregisterOnConnectionClosed)));
82 EXPECT_CALL(*reinterpret_cast<MockConnection*>((*session)->connection()), 82 EXPECT_CALL(*reinterpret_cast<MockConnection*>((*session)->connection()),
83 ProcessUdpPacket(_, addr, _)); 83 ProcessUdpPacket(_, addr, _));
84 84
85 return *session; 85 return *session;
86 } 86 }
87 87
88 class QuicDispatcherTest : public ::testing::Test { 88 class QuicDispatcherTest : public ::testing::Test {
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 // And we'll resume where we left off when we get another call. 380 // And we'll resume where we left off when we get another call.
381 EXPECT_CALL(*connection2(), OnCanWrite()); 381 EXPECT_CALL(*connection2(), OnCanWrite());
382 dispatcher_.OnCanWrite(); 382 dispatcher_.OnCanWrite();
383 } 383 }
384 384
385 } // namespace 385 } // namespace
386 } // namespace test 386 } // namespace test
387 } // namespace tools 387 } // namespace tools
388 } // namespace net 388 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client_session.cc ('k') | net/tools/quic/quic_server_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698