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

Side by Side Diff: chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/net/pref_proxy_config_tracker_impl.h" 5 #include "chrome/browser/net/pref_proxy_config_tracker_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 virtual void SetUp() { 335 virtual void SetUp() {
336 for (size_t i = 0; i < arraysize(GetParam().switches); i++) { 336 for (size_t i = 0; i < arraysize(GetParam().switches); i++) {
337 const char* name = GetParam().switches[i].name; 337 const char* name = GetParam().switches[i].name;
338 const char* value = GetParam().switches[i].value; 338 const char* value = GetParam().switches[i].value;
339 if (name && value) 339 if (name && value)
340 command_line_.AppendSwitchASCII(name, value); 340 command_line_.AppendSwitchASCII(name, value);
341 else if (name) 341 else if (name)
342 command_line_.AppendSwitch(name); 342 command_line_.AppendSwitch(name);
343 } 343 }
344 scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple; 344 scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple;
345 pref_service_.reset( 345 pref_service_.reset(PrefServiceMockBuilder().WithCommandLine(&command_line_)
346 PrefServiceMockBuilder().WithCommandLine( 346 .Create(registry.get()));
347 &command_line_).Create(registry)); 347 Init(pref_service_.get(), registry.get());
348 Init(pref_service_.get(), registry);
349 } 348 }
350 349
351 private: 350 private:
352 CommandLine command_line_; 351 CommandLine command_line_;
353 scoped_ptr<PrefService> pref_service_; 352 scoped_ptr<PrefService> pref_service_;
354 }; 353 };
355 354
356 TEST_P(PrefProxyConfigTrackerImplCommandLineTest, CommandLine) { 355 TEST_P(PrefProxyConfigTrackerImplCommandLineTest, CommandLine) {
357 net::ProxyConfig config; 356 net::ProxyConfig config;
358 EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID, 357 EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 net::ProxyRulesExpectation::Empty(), 476 net::ProxyRulesExpectation::Empty(),
478 }, 477 },
479 }; 478 };
480 479
481 INSTANTIATE_TEST_CASE_P( 480 INSTANTIATE_TEST_CASE_P(
482 PrefProxyConfigTrackerImplCommandLineTestInstance, 481 PrefProxyConfigTrackerImplCommandLineTestInstance,
483 PrefProxyConfigTrackerImplCommandLineTest, 482 PrefProxyConfigTrackerImplCommandLineTest,
484 testing::ValuesIn(kCommandLineTestParams)); 483 testing::ValuesIn(kCommandLineTestParams));
485 484
486 } // namespace 485 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/net/predictor_browsertest.cc ('k') | chrome/browser/net/sqlite_server_bound_cert_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698