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

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

Issue 47283002: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compilation error Created 7 years, 1 month 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/congestion_control/tcp_cubic_sender_test.cc ('k') | net/quic/quic_connection.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/rand_util.h" 9 #include "base/rand_util.h"
10 #include "net/base/capturing_net_log.h" 10 #include "net/base/capturing_net_log.h"
(...skipping 21 matching lines...) Expand all
32 public: 32 public:
33 TestPacketWriter() { 33 TestPacketWriter() {
34 } 34 }
35 35
36 // QuicPacketWriter 36 // QuicPacketWriter
37 virtual WriteResult WritePacket( 37 virtual WriteResult WritePacket(
38 const char* buffer, size_t buf_len, 38 const char* buffer, size_t buf_len,
39 const IPAddressNumber& self_address, 39 const IPAddressNumber& self_address,
40 const IPEndPoint& peer_address, 40 const IPEndPoint& peer_address,
41 QuicBlockedWriterInterface* blocked_writer) OVERRIDE { 41 QuicBlockedWriterInterface* blocked_writer) OVERRIDE {
42 QuicFramer framer(QuicVersionMax(), QuicTime::Zero(), true); 42 QuicFramer framer(QuicSupportedVersions(), QuicTime::Zero(), true);
43 FramerVisitorCapturingFrames visitor; 43 FramerVisitorCapturingFrames visitor;
44 framer.set_visitor(&visitor); 44 framer.set_visitor(&visitor);
45 QuicEncryptedPacket packet(buffer, buf_len); 45 QuicEncryptedPacket packet(buffer, buf_len);
46 EXPECT_TRUE(framer.ProcessPacket(packet)); 46 EXPECT_TRUE(framer.ProcessPacket(packet));
47 header_ = *visitor.header(); 47 header_ = *visitor.header();
48 return WriteResult(WRITE_STATUS_OK, packet.length()); 48 return WriteResult(WRITE_STATUS_OK, packet.length());
49 } 49 }
50 50
51 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE { 51 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE {
52 // Chrome sockets' Write() methods buffer the data until the Write is 52 // Chrome sockets' Write() methods buffer the data until the Write is
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 // After receiving a GoAway, I should no longer be able to create outgoing 157 // After receiving a GoAway, I should no longer be able to create outgoing
158 // streams. 158 // streams.
159 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); 159 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away."));
160 EXPECT_EQ(NULL, session_.CreateOutgoingReliableStream()); 160 EXPECT_EQ(NULL, session_.CreateOutgoingReliableStream());
161 } 161 }
162 162
163 } // namespace 163 } // namespace
164 } // namespace test 164 } // namespace test
165 } // namespace net 165 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_test.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698