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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "mojo/public/cpp/bindings/callback.h"
9 #include "mojo/services/network/public/cpp/udp_socket_wrapper.h" 8 #include "mojo/services/network/public/cpp/udp_socket_wrapper.h"
10 #include "mojo/services/network/public/interfaces/network_service.mojom.h" 9 #include "mojo/services/network/public/interfaces/network_service.mojom.h"
11 #include "mojo/services/network/public/interfaces/udp_socket.mojom.h" 10 #include "mojo/services/network/public/interfaces/udp_socket.mojom.h"
12 #include "mojo/shell/shell_test_helper.h" 11 #include "mojo/shell/shell_test_helper.h"
13 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
14 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "mojo/public/cpp/bindings/callback.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace mojo { 17 namespace mojo {
18 namespace service { 18 namespace service {
19 namespace { 19 namespace {
20 20
21 NetAddressPtr GetLocalHostWithAnyPort() { 21 NetAddressPtr GetLocalHostWithAnyPort() {
22 NetAddressPtr addr(NetAddress::New()); 22 NetAddressPtr addr(NetAddress::New());
23 addr->family = NET_ADDRESS_FAMILY_IPV4; 23 addr->family = NET_ADDRESS_FAMILY_IPV4;
24 addr->ipv4 = NetAddressIPv4::New(); 24 addr->ipv4 = NetAddressIPv4::New();
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 receive_callbacks[j].result()->code); 449 receive_callbacks[j].result()->code);
450 EXPECT_TRUE(receive_callbacks[j].src_addr().Equals(client_addr)); 450 EXPECT_TRUE(receive_callbacks[j].src_addr().Equals(client_addr));
451 EXPECT_TRUE(receive_callbacks[j].data().Equals( 451 EXPECT_TRUE(receive_callbacks[j].data().Equals(
452 CreateTestMessage(static_cast<uint8_t>(j), kDatagramSize))); 452 CreateTestMessage(static_cast<uint8_t>(j), kDatagramSize)));
453 } 453 }
454 } 454 }
455 } 455 }
456 456
457 } // namespace service 457 } // namespace service
458 } // namespace mojo 458 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/network/udp_socket_impl.h ('k') | mojo/services/network/upload_network_service.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698