| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ppapi/tests/test_net_address_private.h" | 5 #include "ppapi/tests/test_net_address_private.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 7 #include <string.h> | 9 #include <string.h> |
| 8 | 10 |
| 11 #include "ppapi/c/private/ppb_net_address_private.h" |
| 9 #include "ppapi/cpp/private/net_address_private.h" | 12 #include "ppapi/cpp/private/net_address_private.h" |
| 10 #include "ppapi/c/private/ppb_net_address_private.h" | |
| 11 #include "ppapi/tests/test_utils.h" | 13 #include "ppapi/tests/test_utils.h" |
| 12 #include "ppapi/tests/testing_instance.h" | 14 #include "ppapi/tests/testing_instance.h" |
| 13 | 15 |
| 14 using pp::NetAddressPrivate; | 16 using pp::NetAddressPrivate; |
| 15 | 17 |
| 16 namespace { | 18 namespace { |
| 17 | 19 |
| 18 PP_NetAddress_Private MakeIPv4NetAddress(const uint8_t host[4], int port) { | 20 PP_NetAddress_Private MakeIPv4NetAddress(const uint8_t host[4], int port) { |
| 19 PP_NetAddress_Private addr; | 21 PP_NetAddress_Private addr; |
| 20 NetAddressPrivate::CreateFromIPv4Address(host, port, &addr); | 22 NetAddressPrivate::CreateFromIPv4Address(host, port, &addr); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 | 314 |
| 313 PP_NetAddress_Private ipv6_123 = MakeIPv6NetAddress(ipv6_address, 0, 123); | 315 PP_NetAddress_Private ipv6_123 = MakeIPv6NetAddress(ipv6_address, 0, 123); |
| 314 ASSERT_EQ(123, NetAddressPrivate::GetScopeID(ipv6_123)); | 316 ASSERT_EQ(123, NetAddressPrivate::GetScopeID(ipv6_123)); |
| 315 | 317 |
| 316 PP_NetAddress_Private ipv6_max = | 318 PP_NetAddress_Private ipv6_max = |
| 317 MakeIPv6NetAddress(ipv6_address, 0, 0xFFFFFFFF); | 319 MakeIPv6NetAddress(ipv6_address, 0, 0xFFFFFFFF); |
| 318 ASSERT_EQ(NetAddressPrivate::GetScopeID(ipv6_max), 0xFFFFFFFF); | 320 ASSERT_EQ(NetAddressPrivate::GetScopeID(ipv6_max), 0xFFFFFFFF); |
| 319 | 321 |
| 320 PASS(); | 322 PASS(); |
| 321 } | 323 } |
| OLD | NEW |