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

Side by Side Diff: net/spdy/spdy_session_pool_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/spdy/spdy_network_transaction_unittest.cc ('k') | net/udp/udp_socket_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/spdy/spdy_session_pool.h" 5 #include "net/spdy/spdy_session_pool.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 "js.foo.com", 332 "js.foo.com",
333 "192.168.0.2,192.168.0.3,192.168.0.5,192.0.2.33" 333 "192.168.0.2,192.168.0.3,192.168.0.5,192.0.2.33"
334 }, 334 },
335 { "http://images.foo.com", 335 { "http://images.foo.com",
336 "images.foo.com", 336 "images.foo.com",
337 "192.168.0.4,192.168.0.3" 337 "192.168.0.4,192.168.0.3"
338 }, 338 },
339 }; 339 };
340 340
341 session_deps_.host_resolver->set_synchronous_mode(true); 341 session_deps_.host_resolver->set_synchronous_mode(true);
342 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_hosts); i++) { 342 for (size_t i = 0; i < arraysize(test_hosts); i++) {
343 session_deps_.host_resolver->rules()->AddIPLiteralRule( 343 session_deps_.host_resolver->rules()->AddIPLiteralRule(
344 test_hosts[i].name, test_hosts[i].iplist, std::string()); 344 test_hosts[i].name, test_hosts[i].iplist, std::string());
345 345
346 // This test requires that the HostResolver cache be populated. Normal 346 // This test requires that the HostResolver cache be populated. Normal
347 // code would have done this already, but we do it manually. 347 // code would have done this already, but we do it manually.
348 HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort)); 348 HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort));
349 session_deps_.host_resolver->Resolve(info, 349 session_deps_.host_resolver->Resolve(info,
350 DEFAULT_PRIORITY, 350 DEFAULT_PRIORITY,
351 &test_hosts[i].addresses, 351 &test_hosts[i].addresses,
352 CompletionCallback(), 352 CompletionCallback(),
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 EXPECT_TRUE(delegateA.StreamIsClosed()); 611 EXPECT_TRUE(delegateA.StreamIsClosed());
612 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateA.WaitForClose()); 612 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateA.WaitForClose());
613 EXPECT_TRUE(delegateB.StreamIsClosed()); 613 EXPECT_TRUE(delegateB.StreamIsClosed());
614 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateB.WaitForClose()); 614 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateB.WaitForClose());
615 #endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS) 615 #endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS)
616 } 616 }
617 617
618 } // namespace 618 } // namespace
619 619
620 } // namespace net 620 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/udp/udp_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698