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

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

Issue 146033003: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 6 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/crypto/quic_crypto_server_config.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 19 matching lines...) Expand all
30 30
31 class TestPacketWriter : public QuicDefaultPacketWriter { 31 class TestPacketWriter : public QuicDefaultPacketWriter {
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) OVERRIDE {
41 QuicBlockedWriterInterface* blocked_writer) OVERRIDE {
42 QuicFramer framer(QuicSupportedVersions(), QuicTime::Zero(), true); 41 QuicFramer framer(QuicSupportedVersions(), QuicTime::Zero(), true);
43 FramerVisitorCapturingFrames visitor; 42 FramerVisitorCapturingFrames visitor;
44 framer.set_visitor(&visitor); 43 framer.set_visitor(&visitor);
45 QuicEncryptedPacket packet(buffer, buf_len); 44 QuicEncryptedPacket packet(buffer, buf_len);
46 EXPECT_TRUE(framer.ProcessPacket(packet)); 45 EXPECT_TRUE(framer.ProcessPacket(packet));
47 header_ = *visitor.header(); 46 header_ = *visitor.header();
48 return WriteResult(WRITE_STATUS_OK, packet.length()); 47 return WriteResult(WRITE_STATUS_OK, packet.length());
49 } 48 }
50 49
51 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE { 50 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 157
159 // After receiving a GoAway, I should no longer be able to create outgoing 158 // After receiving a GoAway, I should no longer be able to create outgoing
160 // streams. 159 // streams.
161 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); 160 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away."));
162 EXPECT_EQ(NULL, session_.CreateOutgoingDataStream()); 161 EXPECT_EQ(NULL, session_.CreateOutgoingDataStream());
163 } 162 }
164 163
165 } // namespace 164 } // namespace
166 } // namespace test 165 } // namespace test
167 } // namespace net 166 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698