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

Side by Side Diff: net/socket/socks_client_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
« no previous file with comments | « net/quic/quic_utils_test.cc ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/socket/socks_client_socket.h" 5 #include "net/socket/socks_client_socket.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "net/base/address_list.h" 8 #include "net/base/address_list.h"
9 #include "net/base/net_log.h" 9 #include "net/base/net_log.h"
10 #include "net/base/net_log_unittest.h" 10 #include "net/base/net_log_unittest.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 }, 207 },
208 // Failure of the null byte 208 // Failure of the null byte
209 { 209 {
210 { 0x00, 0x5B, 0x00, 0x00, 0, 0, 0, 0 }, 210 { 0x00, 0x5B, 0x00, 0x00, 0, 0, 0, 0 },
211 ERR_SOCKS_CONNECTION_FAILED, 211 ERR_SOCKS_CONNECTION_FAILED,
212 }, 212 },
213 }; 213 };
214 214
215 //--------------------------------------- 215 //---------------------------------------
216 216
217 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { 217 for (size_t i = 0; i < arraysize(tests); ++i) {
218 MockWrite data_writes[] = { 218 MockWrite data_writes[] = {
219 MockWrite(SYNCHRONOUS, kSOCKSOkRequest, arraysize(kSOCKSOkRequest)) }; 219 MockWrite(SYNCHRONOUS, kSOCKSOkRequest, arraysize(kSOCKSOkRequest)) };
220 MockRead data_reads[] = { 220 MockRead data_reads[] = {
221 MockRead(SYNCHRONOUS, tests[i].fail_reply, 221 MockRead(SYNCHRONOUS, tests[i].fail_reply,
222 arraysize(tests[i].fail_reply)) }; 222 arraysize(tests[i].fail_reply)) };
223 CapturingNetLog log; 223 CapturingNetLog log;
224 224
225 user_sock_ = BuildMockSocket(data_reads, arraysize(data_reads), 225 user_sock_ = BuildMockSocket(data_reads, arraysize(data_reads),
226 data_writes, arraysize(data_writes), 226 data_writes, arraysize(data_writes),
227 host_resolver_.get(), 227 host_resolver_.get(),
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 NULL, 0, 441 NULL, 0,
442 host_resolver.get(), 442 host_resolver.get(),
443 kHostName, 80, 443 kHostName, 80,
444 NULL); 444 NULL);
445 445
446 EXPECT_EQ(ERR_NAME_NOT_RESOLVED, 446 EXPECT_EQ(ERR_NAME_NOT_RESOLVED,
447 callback_.GetResult(user_sock_->Connect(callback_.callback()))); 447 callback_.GetResult(user_sock_->Connect(callback_.callback())));
448 } 448 }
449 449
450 } // namespace net 450 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_utils_test.cc ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698