| OLD | NEW |
| 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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "mojo/public/cpp/bindings/callback.h" | 13 #include "mojo/public/cpp/bindings/callback.h" |
| 14 #include "mojo/services/network/public/cpp/udp_socket_wrapper.h" | 14 #include "mojo/services/network/public/cpp/udp_socket_wrapper.h" |
| 15 #include "mojo/services/network/public/interfaces/network_service.mojom.h" | 15 #include "mojo/services/network/public/interfaces/network_service.mojom.h" |
| 16 #include "mojo/services/network/public/interfaces/udp_socket.mojom.h" | 16 #include "mojo/services/network/public/interfaces/udp_socket.mojom.h" |
| 17 #include "mojo/shell/public/cpp/application_connection.h" | |
| 18 #include "mojo/shell/public/cpp/application_test_base.h" | 17 #include "mojo/shell/public/cpp/application_test_base.h" |
| 19 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 20 |
| 22 namespace mojo { | 21 namespace mojo { |
| 23 namespace service { | 22 namespace service { |
| 24 namespace { | 23 namespace { |
| 25 | 24 |
| 26 NetAddressPtr GetLocalHostWithAnyPort() { | 25 NetAddressPtr GetLocalHostWithAnyPort() { |
| 27 NetAddressPtr addr(NetAddress::New()); | 26 NetAddressPtr addr(NetAddress::New()); |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 receive_callbacks[j].result()->code); | 642 receive_callbacks[j].result()->code); |
| 644 EXPECT_FALSE(receive_callbacks[j].src_addr()); | 643 EXPECT_FALSE(receive_callbacks[j].src_addr()); |
| 645 EXPECT_TRUE(receive_callbacks[j].data().Equals( | 644 EXPECT_TRUE(receive_callbacks[j].data().Equals( |
| 646 CreateTestMessage(static_cast<uint8_t>(j), kDatagramSize))); | 645 CreateTestMessage(static_cast<uint8_t>(j), kDatagramSize))); |
| 647 } | 646 } |
| 648 } | 647 } |
| 649 } | 648 } |
| 650 | 649 |
| 651 } // namespace service | 650 } // namespace service |
| 652 } // namespace mojo | 651 } // namespace mojo |
| OLD | NEW |