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

Unified Diff: util/net/http_transport_test.cc

Issue 1483073004: Replace use of .Pass() with crashpad::move(). (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: pass: . Created 5 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 | « util/net/http_transport.cc ('k') | util/stdlib/move.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/net/http_transport_test.cc
diff --git a/util/net/http_transport_test.cc b/util/net/http_transport_test.cc
index 16b1cd0ac661f2b4e953a086f9548f644048f502..b59b17fd179fbb9738bd710fd664cbe223d3fa68 100644
--- a/util/net/http_transport_test.cc
+++ b/util/net/http_transport_test.cc
@@ -31,6 +31,7 @@
#include "test/multiprocess_exec.h"
#include "test/paths.h"
#include "util/file/file_io.h"
+#include "util/stdlib/move.h"
#include "util/misc/random_string.h"
#include "util/net/http_body.h"
#include "util/net/http_headers.h"
@@ -51,7 +52,7 @@ class HTTPTransportTestFixture : public MultiprocessExec {
RequestValidator request_validator)
: MultiprocessExec(),
headers_(headers),
- body_stream_(body_stream.Pass()),
+ body_stream_(crashpad::move(body_stream)),
response_code_(http_response_code),
request_validator_(request_validator) {
base::FilePath server_path = Paths::TestDataRoot().Append(
@@ -102,7 +103,7 @@ class HTTPTransportTestFixture : public MultiprocessExec {
for (const auto& pair : headers_) {
transport->SetHeader(pair.first, pair.second);
}
- transport->SetBodyStream(body_stream_.Pass());
+ transport->SetBodyStream(crashpad::move(body_stream_));
std::string response_body;
bool success = transport->ExecuteSynchronously(&response_body);
@@ -270,7 +271,7 @@ TEST(HTTPTransport, UnchunkedPlainText) {
headers[kContentType] = kTextPlain;
headers[kContentLength] = base::StringPrintf("%" PRIuS, strlen(kTextBody));
- HTTPTransportTestFixture test(headers, body_stream.Pass(), 200,
+ HTTPTransportTestFixture test(headers, crashpad::move(body_stream), 200,
&UnchunkedPlainText);
test.Run();
}
@@ -291,7 +292,7 @@ void RunUpload33k(bool has_content_length) {
headers[kContentLength] =
base::StringPrintf("%" PRIuS, request_string.size());
}
- HTTPTransportTestFixture test(headers, body_stream.Pass(), 200,
+ HTTPTransportTestFixture test(headers, crashpad::move(body_stream), 200,
[](HTTPTransportTestFixture* fixture, const std::string& request) {
size_t body_start = request.rfind("\r\n");
EXPECT_EQ(33 * 1024u + 2, request.size() - body_start);
« no previous file with comments | « util/net/http_transport.cc ('k') | util/stdlib/move.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698