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

Side by Side Diff: net/tools/quic/test_tools/quic_test_client.cc

Issue 2611613003: Add quic_logging (Closed)
Patch Set: fix failed test? Created 3 years, 11 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
« no previous file with comments | « net/tools/quic/test_tools/packet_dropping_test_writer.cc ('k') | no next file » | 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/tools/quic/test_tools/quic_test_client.h" 5 #include "net/tools/quic/test_tools/quic_test_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "net/base/completion_callback.h" 13 #include "net/base/completion_callback.h"
14 #include "net/base/net_errors.h" 14 #include "net/base/net_errors.h"
15 #include "net/cert/cert_verify_result.h" 15 #include "net/cert/cert_verify_result.h"
16 #include "net/cert/x509_certificate.h" 16 #include "net/cert/x509_certificate.h"
17 #include "net/quic/core/crypto/proof_verifier.h" 17 #include "net/quic/core/crypto/proof_verifier.h"
18 #include "net/quic/core/quic_flags.h" 18 #include "net/quic/core/quic_flags.h"
19 #include "net/quic/core/quic_server_id.h" 19 #include "net/quic/core/quic_server_id.h"
20 #include "net/quic/core/quic_utils.h" 20 #include "net/quic/core/quic_utils.h"
21 #include "net/quic/core/spdy_utils.h" 21 #include "net/quic/core/spdy_utils.h"
22 #include "net/quic/platform/api/quic_logging.h"
22 #include "net/quic/platform/api/quic_text_utils.h" 23 #include "net/quic/platform/api/quic_text_utils.h"
23 #include "net/quic/test_tools/crypto_test_utils.h" 24 #include "net/quic/test_tools/crypto_test_utils.h"
24 #include "net/quic/test_tools/quic_connection_peer.h" 25 #include "net/quic/test_tools/quic_connection_peer.h"
25 #include "net/quic/test_tools/quic_spdy_session_peer.h" 26 #include "net/quic/test_tools/quic_spdy_session_peer.h"
26 #include "net/quic/test_tools/quic_stream_peer.h" 27 #include "net/quic/test_tools/quic_stream_peer.h"
27 #include "net/quic/test_tools/quic_test_utils.h" 28 #include "net/quic/test_tools/quic_test_utils.h"
28 #include "net/tools/quic/quic_epoll_connection_helper.h" 29 #include "net/tools/quic/quic_epoll_connection_helper.h"
29 #include "net/tools/quic/quic_packet_writer_wrapper.h" 30 #include "net/tools/quic/quic_packet_writer_wrapper.h"
30 #include "net/tools/quic/quic_spdy_client_stream.h" 31 #include "net/tools/quic/quic_spdy_client_stream.h"
31 #include "net/tools/quic/test_tools/quic_client_peer.h" 32 #include "net/tools/quic/test_tools/quic_client_peer.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 400 }
400 401
401 const string& QuicTestClient::response_body() { 402 const string& QuicTestClient::response_body() {
402 return response_; 403 return response_;
403 } 404 }
404 405
405 string QuicTestClient::SendCustomSynchronousRequest( 406 string QuicTestClient::SendCustomSynchronousRequest(
406 const SpdyHeaderBlock& headers, 407 const SpdyHeaderBlock& headers,
407 const string& body) { 408 const string& body) {
408 if (SendMessage(headers, body) == 0) { 409 if (SendMessage(headers, body) == 0) {
409 DLOG(ERROR) << "Failed the request for: " << headers.DebugString(); 410 QUIC_DLOG(ERROR) << "Failed the request for: " << headers.DebugString();
410 // Set the response_ explicitly. Otherwise response_ will contain the 411 // Set the response_ explicitly. Otherwise response_ will contain the
411 // response from the previously successful request. 412 // response from the previously successful request.
412 response_ = ""; 413 response_ = "";
413 } else { 414 } else {
414 WaitForResponse(); 415 WaitForResponse();
415 } 416 }
416 return response_; 417 return response_;
417 } 418 }
418 419
419 string QuicTestClient::SendSynchronousRequest(const string& uri) { 420 string QuicTestClient::SendSynchronousRequest(const string& uri) {
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 } else if (uri[0] == '/') { 708 } else if (uri[0] == '/') {
708 url = "https://" + client_->server_id().host() + uri; 709 url = "https://" + client_->server_id().host() + uri;
709 } else { 710 } else {
710 url = "https://" + uri; 711 url = "https://" + uri;
711 } 712 }
712 return SpdyUtils::PopulateHeaderBlockFromUrl(url, headers); 713 return SpdyUtils::PopulateHeaderBlockFromUrl(url, headers);
713 } 714 }
714 715
715 } // namespace test 716 } // namespace test
716 } // namespace net 717 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/packet_dropping_test_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698