class FuchsiaHTTPClientTest
Defined at line 45 of file ../../src/cobalt/bin/utils/fuchsia_http_client_test.cc
Public Members
unique_ptr http_client
Public Methods
void FuchsiaHTTPClientTest ()
Defined at line 47 of file ../../src/cobalt/bin/utils/fuchsia_http_client_test.cc
void SetUp ()
Defined at line 56 of file ../../src/cobalt/bin/utils/fuchsia_http_client_test.cc
void SetHttpResponse (const std::string & body, uint32_t status_code, std::vector<fuchsia::net::http::Header> headers)
Defined at line 61 of file ../../src/cobalt/bin/utils/fuchsia_http_client_test.cc
void SetHttpResponse (zx::socket body, uint32_t status_code, std::vector<fuchsia::net::http::Header> headers)
Defined at line 72 of file ../../src/cobalt/bin/utils/fuchsia_http_client_test.cc
void SetNetworkErrorResponse (fuchsia::net::http::Error error)
Defined at line 81 of file ../../src/cobalt/bin/utils/fuchsia_http_client_test.cc
void SetResponseDelay (zx::duration response_delay)
Defined at line 88 of file ../../src/cobalt/bin/utils/fuchsia_http_client_test.cc
std::future<StatusOr<HTTPResponse>> PostString (const std::string & body, std::chrono::milliseconds duration)
Invokes Post() in another thread (because Post() is not allowed to be
invoked in the dispather's thread) and waits for Post() to complete and
returns the value of Post().
Defined at line 93 of file ../../src/cobalt/bin/utils/fuchsia_http_client_test.cc
StatusOr<HTTPResponse> PostStringAndWait (std::string request, std::chrono::milliseconds duration)
Defined at line 102 of file ../../src/cobalt/bin/utils/fuchsia_http_client_test.cc
void DoPostTest (std::string response_body_to_use, uint32_t http_response_code, bool include_response_headers)
Prepares the FakeNetworkWrapper to return a response without a network
error and then invokes PostString() and checks the returned HTTPResponse.
|response_body_to_use| is the response body that the FakeNetworkWrapper will
be asked to return. If this is empty then the |body| field will be empty.
|http_response_code| is the code that the FakeNetworkWrapper will be asked
to return.
|include_response_headers| Should the FakeNetworkWrapper include any
response headers.
Defined at line 132 of file ../../src/cobalt/bin/utils/fuchsia_http_client_test.cc
void CrashLoaderService ()
Defined at line 155 of file ../../src/cobalt/bin/utils/fuchsia_http_client_test.cc