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

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

Issue 1305293004: Notfiy NQE of QUIC RTT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed a test Created 5 years, 3 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
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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/thread_task_runner_handle.h" 11 #include "base/thread_task_runner_handle.h"
12 #include "net/base/chunked_upload_data_stream.h" 12 #include "net/base/chunked_upload_data_stream.h"
13 #include "net/base/elements_upload_data_stream.h" 13 #include "net/base/elements_upload_data_stream.h"
14 #include "net/base/net_errors.h" 14 #include "net/base/net_errors.h"
15 #include "net/base/socket_performance_watcher.h"
15 #include "net/base/test_completion_callback.h" 16 #include "net/base/test_completion_callback.h"
16 #include "net/base/upload_bytes_element_reader.h" 17 #include "net/base/upload_bytes_element_reader.h"
17 #include "net/http/http_response_headers.h" 18 #include "net/http/http_response_headers.h"
18 #include "net/http/transport_security_state.h" 19 #include "net/http/transport_security_state.h"
19 #include "net/quic/congestion_control/send_algorithm_interface.h" 20 #include "net/quic/congestion_control/send_algorithm_interface.h"
20 #include "net/quic/crypto/crypto_protocol.h" 21 #include "net/quic/crypto/crypto_protocol.h"
21 #include "net/quic/crypto/quic_decrypter.h" 22 #include "net/quic/crypto/quic_decrypter.h"
22 #include "net/quic/crypto/quic_encrypter.h" 23 #include "net/quic/crypto/quic_encrypter.h"
23 #include "net/quic/crypto/quic_server_info.h" 24 #include "net/quic/crypto/quic_server_info.h"
24 #include "net/quic/quic_chromium_client_session.h" 25 #include "net/quic/quic_chromium_client_session.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 connection_->set_visitor(&visitor_); 216 connection_->set_visitor(&visitor_);
216 connection_->SetSendAlgorithm(send_algorithm_); 217 connection_->SetSendAlgorithm(send_algorithm_);
217 session_.reset(new QuicChromiumClientSession( 218 session_.reset(new QuicChromiumClientSession(
218 connection_, scoped_ptr<DatagramClientSocket>(socket), 219 connection_, scoped_ptr<DatagramClientSocket>(socket),
219 /*stream_factory=*/nullptr, &crypto_client_stream_factory_, 220 /*stream_factory=*/nullptr, &crypto_client_stream_factory_,
220 &transport_security_state_, make_scoped_ptr((QuicServerInfo*)nullptr), 221 &transport_security_state_, make_scoped_ptr((QuicServerInfo*)nullptr),
221 QuicServerId(kDefaultServerHostName, kDefaultServerPort, 222 QuicServerId(kDefaultServerHostName, kDefaultServerPort,
222 /*is_secure=*/false, PRIVACY_MODE_DISABLED), 223 /*is_secure=*/false, PRIVACY_MODE_DISABLED),
223 /*cert_verify_flags=*/0, DefaultQuicConfig(), &crypto_config_, 224 /*cert_verify_flags=*/0, DefaultQuicConfig(), &crypto_config_,
224 "CONNECTION_UNKNOWN", base::TimeTicks::Now(), 225 "CONNECTION_UNKNOWN", base::TimeTicks::Now(),
225 base::ThreadTaskRunnerHandle::Get().get(), nullptr)); 226 base::ThreadTaskRunnerHandle::Get().get(),
227 /*socket_performance_watcher=*/nullptr, nullptr));
226 session_->Initialize(); 228 session_->Initialize();
227 session_->GetCryptoStream()->CryptoConnect(); 229 session_->GetCryptoStream()->CryptoConnect();
228 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); 230 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed());
229 stream_.reset(use_closing_stream_ ? 231 stream_.reset(use_closing_stream_ ?
230 new AutoClosingStream(session_->GetWeakPtr()) : 232 new AutoClosingStream(session_->GetWeakPtr()) :
231 new QuicHttpStream(session_->GetWeakPtr())); 233 new QuicHttpStream(session_->GetWeakPtr()));
232 } 234 }
233 235
234 void SetRequest(const std::string& method, 236 void SetRequest(const std::string& method,
235 const std::string& path, 237 const std::string& path,
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 reliable_stream->SetDelegate(delegate); 831 reliable_stream->SetDelegate(delegate);
830 832
831 // QuicHttpStream::GetTotalSent/ReceivedBytes currently only includes the 833 // QuicHttpStream::GetTotalSent/ReceivedBytes currently only includes the
832 // payload. 834 // payload.
833 EXPECT_EQ(0, stream_->GetTotalSentBytes()); 835 EXPECT_EQ(0, stream_->GetTotalSentBytes());
834 EXPECT_EQ(0, stream_->GetTotalReceivedBytes()); 836 EXPECT_EQ(0, stream_->GetTotalReceivedBytes());
835 } 837 }
836 838
837 } // namespace test 839 } // namespace test
838 } // namespace net 840 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_logger_unittest.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698