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/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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 helper_.get(), writer_.get()); | 197 helper_.get(), writer_.get()); |
198 connection_->set_visitor(&visitor_); | 198 connection_->set_visitor(&visitor_); |
199 connection_->SetSendAlgorithm(send_algorithm_); | 199 connection_->SetSendAlgorithm(send_algorithm_); |
200 connection_->SetReceiveAlgorithm(receive_algorithm_); | 200 connection_->SetReceiveAlgorithm(receive_algorithm_); |
201 crypto_config_.SetDefaults(); | 201 crypto_config_.SetDefaults(); |
202 session_.reset( | 202 session_.reset( |
203 new QuicClientSession(connection_, | 203 new QuicClientSession(connection_, |
204 scoped_ptr<DatagramClientSocket>(socket), | 204 scoped_ptr<DatagramClientSocket>(socket), |
205 writer_.Pass(), NULL, | 205 writer_.Pass(), NULL, |
206 &crypto_client_stream_factory_, | 206 &crypto_client_stream_factory_, |
207 "www.google.com", DefaultQuicConfig(), | 207 "www.google.com", 80, DefaultQuicConfig(), |
208 &crypto_config_, NULL)); | 208 &crypto_config_, NULL)); |
209 session_->GetCryptoStream()->CryptoConnect(); | 209 session_->GetCryptoStream()->CryptoConnect(); |
210 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); | 210 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); |
211 stream_.reset(use_closing_stream_ ? | 211 stream_.reset(use_closing_stream_ ? |
212 new AutoClosingStream(session_->GetWeakPtr()) : | 212 new AutoClosingStream(session_->GetWeakPtr()) : |
213 new QuicHttpStream(session_->GetWeakPtr())); | 213 new QuicHttpStream(session_->GetWeakPtr())); |
214 } | 214 } |
215 | 215 |
216 void SetRequest(const std::string& method, | 216 void SetRequest(const std::string& method, |
217 const std::string& path, | 217 const std::string& path, |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 // Set Delegate to NULL and make sure EffectivePriority returns highest | 606 // Set Delegate to NULL and make sure EffectivePriority returns highest |
607 // priority. | 607 // priority. |
608 reliable_stream->SetDelegate(NULL); | 608 reliable_stream->SetDelegate(NULL); |
609 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, | 609 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, |
610 reliable_stream->EffectivePriority()); | 610 reliable_stream->EffectivePriority()); |
611 reliable_stream->SetDelegate(delegate); | 611 reliable_stream->SetDelegate(delegate); |
612 } | 612 } |
613 | 613 |
614 } // namespace test | 614 } // namespace test |
615 } // namespace net | 615 } // namespace net |
OLD | NEW |