| OLD | NEW |
| 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/chunked_upload_data_stream.h" | 9 #include "net/base/chunked_upload_data_stream.h" |
| 10 #include "net/base/elements_upload_data_stream.h" | 10 #include "net/base/elements_upload_data_stream.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 maker_(GetParam(), connection_id_, &clock_), | 138 maker_(GetParam(), connection_id_, &clock_), |
| 139 random_generator_(0) { | 139 random_generator_(0) { |
| 140 IPAddressNumber ip; | 140 IPAddressNumber ip; |
| 141 CHECK(ParseIPLiteralToNumber("192.0.2.33", &ip)); | 141 CHECK(ParseIPLiteralToNumber("192.0.2.33", &ip)); |
| 142 peer_addr_ = IPEndPoint(ip, 443); | 142 peer_addr_ = IPEndPoint(ip, 443); |
| 143 self_addr_ = IPEndPoint(ip, 8435); | 143 self_addr_ = IPEndPoint(ip, 8435); |
| 144 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20)); | 144 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20)); |
| 145 } | 145 } |
| 146 | 146 |
| 147 ~QuicHttpStreamTest() { | 147 ~QuicHttpStreamTest() { |
| 148 session_->CloseSessionOnError(ERR_ABORTED); | 148 session_->CloseSessionOnError(ERR_ABORTED, QUIC_INTERNAL_ERROR); |
| 149 for (size_t i = 0; i < writes_.size(); i++) { | 149 for (size_t i = 0; i < writes_.size(); i++) { |
| 150 delete writes_[i].packet; | 150 delete writes_[i].packet; |
| 151 } | 151 } |
| 152 } | 152 } |
| 153 | 153 |
| 154 // Adds a packet to the list of expected writes. | 154 // Adds a packet to the list of expected writes. |
| 155 void AddWrite(scoped_ptr<QuicEncryptedPacket> packet) { | 155 void AddWrite(scoped_ptr<QuicEncryptedPacket> packet) { |
| 156 writes_.push_back(PacketToWrite(SYNCHRONOUS, packet.release())); | 156 writes_.push_back(PacketToWrite(SYNCHRONOUS, packet.release())); |
| 157 } | 157 } |
| 158 | 158 |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 // Set Delegate to nullptr and make sure EffectivePriority returns highest | 751 // Set Delegate to nullptr and make sure EffectivePriority returns highest |
| 752 // priority. | 752 // priority. |
| 753 reliable_stream->SetDelegate(nullptr); | 753 reliable_stream->SetDelegate(nullptr); |
| 754 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, | 754 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, |
| 755 reliable_stream->EffectivePriority()); | 755 reliable_stream->EffectivePriority()); |
| 756 reliable_stream->SetDelegate(delegate); | 756 reliable_stream->SetDelegate(delegate); |
| 757 } | 757 } |
| 758 | 758 |
| 759 } // namespace test | 759 } // namespace test |
| 760 } // namespace net | 760 } // namespace net |
| OLD | NEW |