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

Unified Diff: net/tools/quic/test_tools/quic_test_client.h

Issue 2470353002: Remove any use of BalsaHeaders and HttpMessage from QuicTestClient. (Closed)
Patch Set: Fix Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_client.h
diff --git a/net/tools/quic/test_tools/quic_test_client.h b/net/tools/quic/test_tools/quic_test_client.h
index cb76d56683f74daf5107b06727bd04d04dfb88e8..dcc73a0c95da528780b8470e7ce5f65061609f89 100644
--- a/net/tools/quic/test_tools/quic_test_client.h
+++ b/net/tools/quic/test_tools/quic_test_client.h
@@ -19,7 +19,6 @@
#include "net/quic/core/quic_framer.h"
#include "net/quic/core/quic_packet_creator.h"
#include "net/quic/core/quic_protocol.h"
-#include "net/tools/balsa/balsa_frame.h"
#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_client.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -129,8 +128,21 @@ class QuicTestClient : public QuicSpdyStream::Visitor,
// set the response_listener on the client().
void SendRequestsAndWaitForResponses(
const std::vector<std::string>& url_list);
- ssize_t SendMessage(const HTTPMessage& message);
- std::string SendCustomSynchronousRequest(const HTTPMessage& message);
+ // Sends a request containing |headers| and |body| and returns the number of
+ // bytes sent (the size of the serialized request headers and body).
+ ssize_t SendMessage(const SpdyHeaderBlock& headers, base::StringPiece body);
+ // Sends a request containing |headers| and |body| with the fin bit set to
+ // |fin| and returns the number of bytes sent (the size of the serialized
+ // request headers and body).
+ ssize_t SendMessage(const SpdyHeaderBlock& headers,
+ base::StringPiece body,
+ bool fin);
+ // Sends a request containing |headers| and |body|, waits for the response,
+ // and returns the response body.
+ std::string SendCustomSynchronousRequest(const SpdyHeaderBlock& headers,
+ const std::string& body);
+ // Sends a GET request for |uri|, waits for the response, and returns the
+ // response body.
std::string SendSynchronousRequest(const std::string& uri);
void Connect();
void ResetConnection();
@@ -206,8 +218,8 @@ class QuicTestClient : public QuicSpdyStream::Visitor,
// Calls GetOrCreateStream(), sends the request on the stream, and
// stores the request in case it needs to be resent. If |headers| is
// null, only the body will be sent on the stream.
- ssize_t GetOrCreateStreamAndSendRequest(const BalsaHeaders* headers,
- StringPiece body,
+ ssize_t GetOrCreateStreamAndSendRequest(const SpdyHeaderBlock* headers,
+ base::StringPiece body,
bool fin,
QuicAckListenerInterface* delegate);
@@ -284,8 +296,11 @@ class QuicTestClient : public QuicSpdyStream::Visitor,
QuicAckListenerInterface* delegate_;
};
- // Given a uri, creates a simple HTTPMessage request message for testing.
- static void FillInRequest(const std::string& uri, HTTPMessage* message);
+ // Given |uri|, populates the fields in |headers| for a simple GET
+ // request. If |uri| is a relative URL, the QuicServerId will be
+ // use to specify the authority.
+ bool PopulateHeaderBlockFromUrl(const std::string& uri,
+ SpdyHeaderBlock* headers);
bool HaveActiveStream();
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698