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

Side by Side Diff: net/proxy/proxy_config_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/proxy/proxy_config_source.cc ('k') | net/proxy/proxy_list_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/proxy/proxy_config.h" 5 #include "net/proxy/proxy_config.h"
6 #include "net/proxy/proxy_config_service_common_unittest.h" 6 #include "net/proxy/proxy_config_service_common_unittest.h"
7 #include "net/proxy/proxy_info.h" 7 #include "net/proxy/proxy_info.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 "PROXY myhttpproxy:80;DIRECT", 301 "PROXY myhttpproxy:80;DIRECT",
302 NULL, 302 NULL,
303 NULL, 303 NULL,
304 NULL, 304 NULL,
305 }, 305 },
306 306
307 }; 307 };
308 308
309 ProxyConfig config; 309 ProxyConfig config;
310 310
311 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { 311 for (size_t i = 0; i < arraysize(tests); ++i) {
312 config.proxy_rules().ParseFromString(tests[i].proxy_rules); 312 config.proxy_rules().ParseFromString(tests[i].proxy_rules);
313 313
314 EXPECT_EQ(tests[i].type, config.proxy_rules().type); 314 EXPECT_EQ(tests[i].type, config.proxy_rules().type);
315 ExpectProxyServerEquals(tests[i].single_proxy, 315 ExpectProxyServerEquals(tests[i].single_proxy,
316 config.proxy_rules().single_proxies); 316 config.proxy_rules().single_proxies);
317 ExpectProxyServerEquals(tests[i].proxy_for_http, 317 ExpectProxyServerEquals(tests[i].proxy_for_http,
318 config.proxy_rules().proxies_for_http); 318 config.proxy_rules().proxies_for_http);
319 ExpectProxyServerEquals(tests[i].proxy_for_https, 319 ExpectProxyServerEquals(tests[i].proxy_for_https,
320 config.proxy_rules().proxies_for_https); 320 config.proxy_rules().proxies_for_https);
321 ExpectProxyServerEquals(tests[i].proxy_for_ftp, 321 ExpectProxyServerEquals(tests[i].proxy_for_ftp,
(...skipping 26 matching lines...) Expand all
348 EXPECT_TRUE(result.is_direct_only()); 348 EXPECT_TRUE(result.is_direct_only());
349 EXPECT_TRUE(result.did_bypass_proxy()); 349 EXPECT_TRUE(result.did_bypass_proxy());
350 350
351 rules.Apply(GURL("http://example.com"), &result); 351 rules.Apply(GURL("http://example.com"), &result);
352 EXPECT_FALSE(result.is_direct()); 352 EXPECT_FALSE(result.is_direct());
353 EXPECT_FALSE(result.did_bypass_proxy()); 353 EXPECT_FALSE(result.did_bypass_proxy());
354 } 354 }
355 355
356 } // namespace 356 } // namespace
357 } // namespace net 357 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_source.cc ('k') | net/proxy/proxy_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698