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

Side by Side Diff: net/udp/udp_socket_unittest.cc

Issue 662553002: Convert ARRAYSIZE_UNSAFE -> arraysize in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 (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 "net/udp/udp_socket.h" 5 #include "net/udp/udp_socket.h"
6 6
7 #include "net/udp/udp_client_socket.h" 7 #include "net/udp/udp_client_socket.h"
8 #include "net/udp/udp_server_socket.h" 8 #include "net/udp/udp_server_socket.h"
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 bool may_fail; 434 bool may_fail;
435 } tests[] = { 435 } tests[] = {
436 { "127.0.00.1", "127.0.0.1", false }, 436 { "127.0.00.1", "127.0.0.1", false },
437 { "::1", "::1", true }, 437 { "::1", "::1", true },
438 #if !defined(OS_ANDROID) 438 #if !defined(OS_ANDROID)
439 // Addresses below are disabled on Android. See crbug.com/161248 439 // Addresses below are disabled on Android. See crbug.com/161248
440 { "192.168.1.1", "127.0.0.1", false }, 440 { "192.168.1.1", "127.0.0.1", false },
441 { "2001:db8:0::42", "::1", true }, 441 { "2001:db8:0::42", "::1", true },
442 #endif 442 #endif
443 }; 443 };
444 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); i++) { 444 for (size_t i = 0; i < arraysize(tests); i++) {
445 SCOPED_TRACE(std::string("Connecting from ") + tests[i].local_address + 445 SCOPED_TRACE(std::string("Connecting from ") + tests[i].local_address +
446 std::string(" to ") + tests[i].remote_address); 446 std::string(" to ") + tests[i].remote_address);
447 447
448 IPAddressNumber ip_number; 448 IPAddressNumber ip_number;
449 ParseIPLiteralToNumber(tests[i].remote_address, &ip_number); 449 ParseIPLiteralToNumber(tests[i].remote_address, &ip_number);
450 IPEndPoint remote_address(ip_number, 80); 450 IPEndPoint remote_address(ip_number, 80);
451 ParseIPLiteralToNumber(tests[i].local_address, &ip_number); 451 ParseIPLiteralToNumber(tests[i].local_address, &ip_number);
452 IPEndPoint local_address(ip_number, 80); 452 IPEndPoint local_address(ip_number, 80);
453 453
454 UDPClientSocket client(DatagramSocket::DEFAULT_BIND, 454 UDPClientSocket client(DatagramSocket::DEFAULT_BIND,
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 g_expected_traffic_type = QOSTrafficTypeExcellentEffort; 732 g_expected_traffic_type = QOSTrafficTypeExcellentEffort;
733 EXPECT_EQ(OK, client.SetDiffServCodePoint(DSCP_NO_CHANGE)); 733 EXPECT_EQ(OK, client.SetDiffServCodePoint(DSCP_NO_CHANGE));
734 g_expected_dscp = DSCP_DEFAULT; 734 g_expected_dscp = DSCP_DEFAULT;
735 g_expected_traffic_type = QOSTrafficTypeBestEffort; 735 g_expected_traffic_type = QOSTrafficTypeBestEffort;
736 EXPECT_EQ(OK, client.SetDiffServCodePoint(DSCP_DEFAULT)); 736 EXPECT_EQ(OK, client.SetDiffServCodePoint(DSCP_DEFAULT));
737 client.Close(); 737 client.Close();
738 } 738 }
739 #endif 739 #endif
740 740
741 } // namespace net 741 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_pool_unittest.cc ('k') | net/url_request/url_request_throttler_simulation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698