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

Side by Side Diff: chrome/browser/chromeos/proxy_config_service_impl_unittest.cc

Issue 655413002: Convert ARRAYSIZE_UNSAFE -> arraysize in chrome/browser/. (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 "chrome/browser/chromeos/proxy_config_service_impl.h" 5 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 TestingPrefServiceSimple pref_service_; 327 TestingPrefServiceSimple pref_service_;
328 328
329 private: 329 private:
330 ScopedTestDeviceSettingsService test_device_settings_service_; 330 ScopedTestDeviceSettingsService test_device_settings_service_;
331 ScopedTestCrosSettings test_cros_settings_; 331 ScopedTestCrosSettings test_cros_settings_;
332 content::TestBrowserThread ui_thread_; 332 content::TestBrowserThread ui_thread_;
333 content::TestBrowserThread io_thread_; 333 content::TestBrowserThread io_thread_;
334 }; 334 };
335 335
336 TEST_F(ProxyConfigServiceImplTest, NetworkProxy) { 336 TEST_F(ProxyConfigServiceImplTest, NetworkProxy) {
337 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { 337 for (size_t i = 0; i < arraysize(tests); ++i) {
338 SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "] %s", i, 338 SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "] %s", i,
339 tests[i].description.c_str())); 339 tests[i].description.c_str()));
340 340
341 base::DictionaryValue test_config; 341 base::DictionaryValue test_config;
342 InitConfigWithTestInput(tests[i].input, &test_config); 342 InitConfigWithTestInput(tests[i].input, &test_config);
343 SetConfig(&test_config); 343 SetConfig(&test_config);
344 344
345 net::ProxyConfig config; 345 net::ProxyConfig config;
346 SyncGetLatestProxyConfig(&config); 346 SyncGetLatestProxyConfig(&config);
347 347
(...skipping 21 matching lines...) Expand all
369 { 5, 4, 6, }, 369 { 5, 4, 6, },
370 { 5, 6, 7, }, 370 { 5, 6, 7, },
371 { 5, 7, 6, }, 371 { 5, 7, 6, },
372 { 7, 6, 5, }, 372 { 7, 6, 5, },
373 { 6, 5, 7, }, 373 { 6, 5, 7, },
374 { 6, 7, 8, }, 374 { 6, 7, 8, },
375 { 6, 8, 7, }, 375 { 6, 8, 7, },
376 { 8, 7, 6, }, 376 { 8, 7, 6, },
377 { 7, 6, 8, }, 377 { 7, 6, 8, },
378 }; 378 };
379 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(proxies); ++i) { 379 for (size_t i = 0; i < arraysize(proxies); ++i) {
380 const TestParams& managed_params = tests[proxies[i][0]]; 380 const TestParams& managed_params = tests[proxies[i][0]];
381 const TestParams& recommended_params = tests[proxies[i][1]]; 381 const TestParams& recommended_params = tests[proxies[i][1]];
382 const TestParams& network_params = tests[proxies[i][2]]; 382 const TestParams& network_params = tests[proxies[i][2]];
383 383
384 SCOPED_TRACE(base::StringPrintf( 384 SCOPED_TRACE(base::StringPrintf(
385 "Test[%" PRIuS "] managed=[%s], recommended=[%s], network=[%s]", i, 385 "Test[%" PRIuS "] managed=[%s], recommended=[%s], network=[%s]", i,
386 managed_params.description.c_str(), 386 managed_params.description.c_str(),
387 recommended_params.description.c_str(), 387 recommended_params.description.c_str(),
388 network_params.description.c_str())); 388 network_params.description.c_str()));
389 389
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 pref_service_.RemoveRecommendedPref(prefs::kProxy); 445 pref_service_.RemoveRecommendedPref(prefs::kProxy);
446 SyncGetLatestProxyConfig(&actual_config); 446 SyncGetLatestProxyConfig(&actual_config);
447 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); 447 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect());
448 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); 448 EXPECT_EQ(network_params.pac_url, actual_config.pac_url());
449 EXPECT_TRUE(network_params.proxy_rules.Matches( 449 EXPECT_TRUE(network_params.proxy_rules.Matches(
450 actual_config.proxy_rules())); 450 actual_config.proxy_rules()));
451 } 451 }
452 } 452 }
453 453
454 } // namespace chromeos 454 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/device_status_collector.cc ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698