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

Side by Side Diff: net/quic/quic_http_stream_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/quic_framer_test.cc ('k') | net/quic/quic_network_transaction_unittest.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/quic/quic_http_stream.h" 5 #include "net/quic/quic_http_stream.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 namespace { 47 namespace {
48 48
49 const char kUploadData[] = "hello world!"; 49 const char kUploadData[] = "hello world!";
50 50
51 class TestQuicConnection : public QuicConnection { 51 class TestQuicConnection : public QuicConnection {
52 public: 52 public:
53 TestQuicConnection(QuicGuid guid, 53 TestQuicConnection(QuicGuid guid,
54 IPEndPoint address, 54 IPEndPoint address,
55 QuicConnectionHelper* helper, 55 QuicConnectionHelper* helper,
56 QuicPacketWriter* writer) 56 QuicPacketWriter* writer)
57 : QuicConnection(guid, address, helper, writer, false, QuicVersionMax()) { 57 : QuicConnection(guid, address, helper, writer, false,
58 QuicSupportedVersions()) {
58 } 59 }
59 60
60 void SetSendAlgorithm(SendAlgorithmInterface* send_algorithm) { 61 void SetSendAlgorithm(SendAlgorithmInterface* send_algorithm) {
61 QuicConnectionPeer::SetSendAlgorithm(this, send_algorithm); 62 QuicConnectionPeer::SetSendAlgorithm(this, send_algorithm);
62 } 63 }
63 64
64 void SetReceiveAlgorithm(ReceiveAlgorithmInterface* receive_algorithm) { 65 void SetReceiveAlgorithm(ReceiveAlgorithmInterface* receive_algorithm) {
65 QuicConnectionPeer::SetReceiveAlgorithm(this, receive_algorithm); 66 QuicConnectionPeer::SetReceiveAlgorithm(this, receive_algorithm);
66 } 67 }
67 }; 68 };
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 128 }
128 IoMode mode; 129 IoMode mode;
129 QuicEncryptedPacket* packet; 130 QuicEncryptedPacket* packet;
130 }; 131 };
131 132
132 QuicHttpStreamTest() 133 QuicHttpStreamTest()
133 : net_log_(BoundNetLog()), 134 : net_log_(BoundNetLog()),
134 use_closing_stream_(false), 135 use_closing_stream_(false),
135 read_buffer_(new IOBufferWithSize(4096)), 136 read_buffer_(new IOBufferWithSize(4096)),
136 guid_(2), 137 guid_(2),
137 framer_(QuicVersionMax(), QuicTime::Zero(), false), 138 framer_(QuicSupportedVersions(), QuicTime::Zero(), false),
138 creator_(guid_, &framer_, &random_, false) { 139 creator_(guid_, &framer_, &random_, false) {
139 IPAddressNumber ip; 140 IPAddressNumber ip;
140 CHECK(ParseIPLiteralToNumber("192.0.2.33", &ip)); 141 CHECK(ParseIPLiteralToNumber("192.0.2.33", &ip));
141 peer_addr_ = IPEndPoint(ip, 443); 142 peer_addr_ = IPEndPoint(ip, 443);
142 self_addr_ = IPEndPoint(ip, 8435); 143 self_addr_ = IPEndPoint(ip, 8435);
143 } 144 }
144 145
145 ~QuicHttpStreamTest() { 146 ~QuicHttpStreamTest() {
146 session_->CloseSessionOnError(ERR_ABORTED); 147 session_->CloseSessionOnError(ERR_ABORTED);
147 for (size_t i = 0; i < writes_.size(); i++) { 148 for (size_t i = 0; i < writes_.size(); i++) {
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 // priority. 724 // priority.
724 reliable_stream->SetDelegate(NULL); 725 reliable_stream->SetDelegate(NULL);
725 DCHECK_EQ(static_cast<QuicPriority>(kHighestPriority), 726 DCHECK_EQ(static_cast<QuicPriority>(kHighestPriority),
726 reliable_stream->EffectivePriority()); 727 reliable_stream->EffectivePriority());
727 reliable_stream->SetDelegate(delegate); 728 reliable_stream->SetDelegate(delegate);
728 } 729 }
729 730
730 } // namespace test 731 } // namespace test
731 732
732 } // namespace net 733 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_framer_test.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698