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

Side by Side Diff: services/http_server/http_server_apptest.cc

Issue 1408793006: Convert "return local_var.Pass();" to "return local_var;". (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "mojo/data_pipe_utils/data_pipe_utils.h" 8 #include "mojo/data_pipe_utils/data_pipe_utils.h"
9 #include "mojo/public/cpp/application/application_impl.h" 9 #include "mojo/public/cpp/application/application_impl.h"
10 #include "mojo/public/cpp/application/application_test_base.h" 10 #include "mojo/public/cpp/application/application_test_base.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 local_address->family = mojo::NetAddressFamily::IPV4; 118 local_address->family = mojo::NetAddressFamily::IPV4;
119 local_address->ipv4 = mojo::NetAddressIPv4::New(); 119 local_address->ipv4 = mojo::NetAddressIPv4::New();
120 local_address->ipv4->addr.resize(4); 120 local_address->ipv4->addr.resize(4);
121 local_address->ipv4->addr[0] = 127; 121 local_address->ipv4->addr[0] = 127;
122 local_address->ipv4->addr[1] = 0; 122 local_address->ipv4->addr[1] = 0;
123 local_address->ipv4->addr[2] = 0; 123 local_address->ipv4->addr[2] = 0;
124 local_address->ipv4->addr[3] = 1; 124 local_address->ipv4->addr[3] = 1;
125 local_address->ipv4->port = 0; 125 local_address->ipv4->port = 0;
126 http_server_factory_->CreateHttpServer(GetProxy(&http_server).Pass(), 126 http_server_factory_->CreateHttpServer(GetProxy(&http_server).Pass(),
127 local_address.Pass()); 127 local_address.Pass());
128 return http_server.Pass(); 128 return http_server;
129 } 129 }
130 130
131 void CheckServerResponse(mojo::URLResponsePtr response) { 131 void CheckServerResponse(mojo::URLResponsePtr response) {
132 EXPECT_EQ(200u, response->status_code); 132 EXPECT_EQ(200u, response->status_code);
133 std::string response_body; 133 std::string response_body;
134 mojo::common::BlockingCopyToString(response->body.Pass(), &response_body); 134 mojo::common::BlockingCopyToString(response->body.Pass(), &response_body);
135 EXPECT_EQ(kExampleMessage, response_body); 135 EXPECT_EQ(kExampleMessage, response_body);
136 base::MessageLoop::current()->Quit(); 136 base::MessageLoop::current()->Quit();
137 } 137 }
138 138
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 url_request->method = "POST"; 188 url_request->method = "POST";
189 url_request->body.resize(1); 189 url_request->body.resize(1);
190 WriteMessageToDataPipe(kExampleMessage, &url_request->body[0]); 190 WriteMessageToDataPipe(kExampleMessage, &url_request->body[0]);
191 191
192 url_loader->Start(url_request.Pass(), base::Bind(&CheckServerResponse)); 192 url_loader->Start(url_request.Pass(), base::Bind(&CheckServerResponse));
193 base::RunLoop run_loop; 193 base::RunLoop run_loop;
194 run_loop.Run(); 194 run_loop.Run();
195 } 195 }
196 196
197 } // namespace http_server 197 } // namespace http_server
OLDNEW
« no previous file with comments | « services/gles2/command_buffer_type_conversions.cc ('k') | services/js/system/tests/js_to_cpp_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698