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

Side by Side Diff: mojo/services/network/udp_socket_apptest.cc

Issue 744973002: Pass command line args to apptests (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase and address comments Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/macros.h" 5 #include "base/macros.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "mojo/public/cpp/application/application_connection.h" 8 #include "mojo/public/cpp/application/application_connection.h"
9 #include "mojo/public/cpp/application/application_delegate.h" 9 #include "mojo/public/cpp/application/application_delegate.h"
10 #include "mojo/public/cpp/application/application_impl.h" 10 #include "mojo/public/cpp/application/application_impl.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 }; 219 };
220 220
221 NetworkErrorPtr result_; 221 NetworkErrorPtr result_;
222 NetAddressPtr src_addr_; 222 NetAddressPtr src_addr_;
223 Array<uint8_t> data_; 223 Array<uint8_t> data_;
224 }; 224 };
225 225
226 class UDPSocketAppTest : public test::ApplicationTestBase, 226 class UDPSocketAppTest : public test::ApplicationTestBase,
227 public ApplicationDelegate { 227 public ApplicationDelegate {
228 public: 228 public:
229 UDPSocketAppTest() : ApplicationTestBase(Array<String>()) {} 229 UDPSocketAppTest() {}
230 ~UDPSocketAppTest() override {} 230 ~UDPSocketAppTest() override {}
231 231
232 void SetUp() override { 232 void SetUp() override {
233 ApplicationTestBase::SetUp(); 233 ApplicationTestBase::SetUp();
234 234
235 ApplicationConnection* connection = 235 ApplicationConnection* connection =
236 application_impl()->ConnectToApplication("mojo:network_service"); 236 application_impl()->ConnectToApplication("mojo:network_service");
237 connection->ConnectToService(&network_service_); 237 connection->ConnectToService(&network_service_);
238 238
239 network_service_->CreateUDPSocket(GetProxy(&udp_socket_)); 239 network_service_->CreateUDPSocket(GetProxy(&udp_socket_));
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 receive_callbacks[j].result()->code); 453 receive_callbacks[j].result()->code);
454 EXPECT_TRUE(receive_callbacks[j].src_addr().Equals(client_addr)); 454 EXPECT_TRUE(receive_callbacks[j].src_addr().Equals(client_addr));
455 EXPECT_TRUE(receive_callbacks[j].data().Equals( 455 EXPECT_TRUE(receive_callbacks[j].data().Equals(
456 CreateTestMessage(static_cast<uint8_t>(j), kDatagramSize))); 456 CreateTestMessage(static_cast<uint8_t>(j), kDatagramSize)));
457 } 457 }
458 } 458 }
459 } 459 }
460 460
461 } // namespace service 461 } // namespace service
462 } // namespace mojo 462 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698