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

Unified Diff: chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
index cf2b6c8f104404c8a2018cf28bc7d01fb91d6b4f..34a2491894ea0a20664a1f476e2418f3618d04cd 100644
--- a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
+++ b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
@@ -8,6 +8,7 @@
#include "base/file_path.h"
#include "base/message_loop.h"
#include "chrome/browser/net/chrome_url_request_context.h"
+#include "chrome/browser/prefs/pref_registry_simple.h"
#include "chrome/browser/prefs/pref_service_mock_builder.h"
#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/common/chrome_switches.h"
@@ -77,9 +78,9 @@ class PrefProxyConfigTrackerImplTestBase : public TESTBASE {
: ui_thread_(BrowserThread::UI, &loop_),
io_thread_(BrowserThread::IO, &loop_) {}
- virtual void Init(PrefServiceSimple* pref_service) {
+ virtual void Init(PrefService* pref_service, PrefRegistrySimple* registry) {
ASSERT_TRUE(pref_service);
- PrefProxyConfigTrackerImpl::RegisterPrefs(pref_service);
+ PrefProxyConfigTrackerImpl::RegisterPrefs(registry);
fixed_config_.set_pac_url(GURL(kFixedPacUrl));
delegate_service_ =
new TestProxyConfigService(fixed_config_,
@@ -118,7 +119,7 @@ class PrefProxyConfigTrackerImplTest
protected:
virtual void SetUp() {
pref_service_.reset(new TestingPrefServiceSimple());
- Init(pref_service_.get());
+ Init(pref_service_.get(), pref_service_->registry());
}
scoped_ptr<TestingPrefServiceSimple> pref_service_;
@@ -338,15 +339,16 @@ class PrefProxyConfigTrackerImplCommandLineTest
else if (name)
command_line_.AppendSwitch(name);
}
+ scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple;
pref_service_.reset(
PrefServiceMockBuilder().WithCommandLine(
- &command_line_).CreateSimple());
- Init(pref_service_.get());
+ &command_line_).Create(registry));
+ Init(pref_service_.get(), registry);
}
private:
CommandLine command_line_;
- scoped_ptr<PrefServiceSimple> pref_service_;
+ scoped_ptr<PrefService> pref_service_;
};
TEST_P(PrefProxyConfigTrackerImplCommandLineTest, CommandLine) {
« no previous file with comments | « chrome/browser/net/pref_proxy_config_tracker_impl.cc ('k') | chrome/browser/net/ssl_config_service_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698