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

Side by Side Diff: ppapi/tests/test_net_address_private.cc

Issue 17615004: Add "PRIVATE" to the enum names of some private Pepper networking APIs: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
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 <string.h> 7 #include <string.h>
8 8
9 #include "ppapi/cpp/private/net_address_private.h" 9 #include "ppapi/cpp/private/net_address_private.h"
10 #include "ppapi/c/private/ppb_net_address_private.h" 10 #include "ppapi/c/private/ppb_net_address_private.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 ASSERT_EQ(test_cases[i].expected_with_port, 224 ASSERT_EQ(test_cases[i].expected_with_port,
225 NetAddressPrivate::Describe(addr, true)); 225 NetAddressPrivate::Describe(addr, true));
226 } 226 }
227 227
228 PASS(); 228 PASS();
229 } 229 }
230 230
231 std::string TestNetAddressPrivate::TestGetFamily() { 231 std::string TestNetAddressPrivate::TestGetFamily() {
232 uint8_t localhost_ip[4] = { 127, 0, 0, 1 }; 232 uint8_t localhost_ip[4] = { 127, 0, 0, 1 };
233 PP_NetAddress_Private ipv4 = MakeIPv4NetAddress(localhost_ip, 80); 233 PP_NetAddress_Private ipv4 = MakeIPv4NetAddress(localhost_ip, 80);
234 ASSERT_EQ(NetAddressPrivate::GetFamily(ipv4), PP_NETADDRESSFAMILY_IPV4); 234 ASSERT_EQ(NetAddressPrivate::GetFamily(ipv4),
235 PP_NETADDRESSFAMILY_PRIVATE_IPV4);
235 236
236 uint16_t ipv6_address[8] = { 0x1234, 0xabcd, 0, 0, 0xff, 0, 0, 0xcdef }; 237 uint16_t ipv6_address[8] = { 0x1234, 0xabcd, 0, 0, 0xff, 0, 0, 0xcdef };
237 PP_NetAddress_Private ipv6 = MakeIPv6NetAddress(ipv6_address, 123, 0); 238 PP_NetAddress_Private ipv6 = MakeIPv6NetAddress(ipv6_address, 123, 0);
238 ASSERT_EQ(NetAddressPrivate::GetFamily(ipv6), PP_NETADDRESSFAMILY_IPV6); 239 ASSERT_EQ(NetAddressPrivate::GetFamily(ipv6),
240 PP_NETADDRESSFAMILY_PRIVATE_IPV6);
239 241
240 PASS(); 242 PASS();
241 } 243 }
242 244
243 std::string TestNetAddressPrivate::TestGetPort() { 245 std::string TestNetAddressPrivate::TestGetPort() {
244 uint8_t localhost_ip[4] = { 127, 0, 0, 1 }; 246 uint8_t localhost_ip[4] = { 127, 0, 0, 1 };
245 PP_NetAddress_Private localhost_80 = MakeIPv4NetAddress(localhost_ip, 80); 247 PP_NetAddress_Private localhost_80 = MakeIPv4NetAddress(localhost_ip, 80);
246 ASSERT_EQ(NetAddressPrivate::GetPort(localhost_80), 80); 248 ASSERT_EQ(NetAddressPrivate::GetPort(localhost_80), 80);
247 249
248 uint16_t ipv6_address[8] = { 0x1234, 0xabcd, 0, 0, 0xff, 0, 0, 0xcdef }; 250 uint16_t ipv6_address[8] = { 0x1234, 0xabcd, 0, 0, 0xff, 0, 0, 0xcdef };
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 312
311 PP_NetAddress_Private ipv6_123 = MakeIPv6NetAddress(ipv6_address, 0, 123); 313 PP_NetAddress_Private ipv6_123 = MakeIPv6NetAddress(ipv6_address, 0, 123);
312 ASSERT_EQ(NetAddressPrivate::GetScopeID(ipv6_123), 123); 314 ASSERT_EQ(NetAddressPrivate::GetScopeID(ipv6_123), 123);
313 315
314 PP_NetAddress_Private ipv6_max = 316 PP_NetAddress_Private ipv6_max =
315 MakeIPv6NetAddress(ipv6_address, 0, 0xFFFFFFFF); 317 MakeIPv6NetAddress(ipv6_address, 0, 0xFFFFFFFF);
316 ASSERT_EQ(NetAddressPrivate::GetScopeID(ipv6_max), 0xFFFFFFFF); 318 ASSERT_EQ(NetAddressPrivate::GetScopeID(ipv6_max), 0xFFFFFFFF);
317 319
318 PASS(); 320 PASS();
319 } 321 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_host_resolver_private_disallowed.cc ('k') | ppapi/tests/test_network_monitor_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698