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

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

Issue 1725353003: Eliminate mojo::Shell client lib class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@15connector
Patch Set: . Created 4 years, 10 months 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 DISALLOW_COPY_AND_ASSIGN(UDPSocketReceiverImpl); 317 DISALLOW_COPY_AND_ASSIGN(UDPSocketReceiverImpl);
318 }; 318 };
319 319
320 class UDPSocketAppTest : public test::ApplicationTestBase { 320 class UDPSocketAppTest : public test::ApplicationTestBase {
321 public: 321 public:
322 UDPSocketAppTest() : receiver_binding_(&receiver_) {} 322 UDPSocketAppTest() : receiver_binding_(&receiver_) {}
323 ~UDPSocketAppTest() override {} 323 ~UDPSocketAppTest() override {}
324 324
325 void SetUp() override { 325 void SetUp() override {
326 ApplicationTestBase::SetUp(); 326 ApplicationTestBase::SetUp();
327 shell()->ConnectToInterface("mojo:network_service", &network_service_); 327 connector()->ConnectToInterface("mojo:network_service", &network_service_);
328 network_service_->CreateUDPSocket(GetProxy(&socket_)); 328 network_service_->CreateUDPSocket(GetProxy(&socket_));
329 } 329 }
330 330
331 protected: 331 protected:
332 NetworkServicePtr network_service_; 332 NetworkServicePtr network_service_;
333 UDPSocketPtr socket_; 333 UDPSocketPtr socket_;
334 UDPSocketReceiverImpl receiver_; 334 UDPSocketReceiverImpl receiver_;
335 Binding<UDPSocketReceiver> receiver_binding_; 335 Binding<UDPSocketReceiver> receiver_binding_;
336 336
337 DISALLOW_COPY_AND_ASSIGN(UDPSocketAppTest); 337 DISALLOW_COPY_AND_ASSIGN(UDPSocketAppTest);
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 receive_callbacks[j].result()->code); 642 receive_callbacks[j].result()->code);
643 EXPECT_FALSE(receive_callbacks[j].src_addr()); 643 EXPECT_FALSE(receive_callbacks[j].src_addr());
644 EXPECT_TRUE(receive_callbacks[j].data().Equals( 644 EXPECT_TRUE(receive_callbacks[j].data().Equals(
645 CreateTestMessage(static_cast<uint8_t>(j), kDatagramSize))); 645 CreateTestMessage(static_cast<uint8_t>(j), kDatagramSize)));
646 } 646 }
647 } 647 }
648 } 648 }
649 649
650 } // namespace service 650 } // namespace service
651 } // namespace mojo 651 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/network/tcp_server_socket_impl.cc ('k') | mojo/services/network/udp_socket_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698