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