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

Unified Diff: chrome/browser/content_settings/content_settings_pref_provider_unittest.cc

Issue 11968032: Move 'theme' parsing out of Extension class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PrefProviderTest.Incognito fixed 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
« no previous file with comments | « no previous file | chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
diff --git a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
index eced8327cf369fbfe5180e9858bd37de58f14a05..883be2703f6e6259fb90ddcd503bb07fa7fdb7fa 100644
--- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
@@ -145,12 +145,16 @@ TEST_F(PrefProviderTest, Incognito) {
Profile::RegisterUserPrefs(otr_prefs);
chrome::RegisterUserPrefs(otr_prefs);
- TestingProfile profile;
- TestingProfile* otr_profile = new TestingProfile;
- profile.SetOffTheRecordProfile(otr_profile);
- profile.SetPrefService(regular_prefs);
+ TestingProfile::Builder profile_builder;
+ profile_builder.SetPrefService(make_scoped_ptr(regular_prefs).Pass());
battre 2013/02/07 09:45:08 No need for calling ".Pass()"
Joe Thomas 2013/02/07 18:30:30 Done.
+ scoped_ptr<TestingProfile> profile = profile_builder.Build();
+
+ TestingProfile::Builder otr_profile_builder;
+ otr_profile_builder.SetPrefService(make_scoped_ptr(otr_prefs).Pass());
battre 2013/02/07 09:45:08 No need for calling ".Pass()"
Joe Thomas 2013/02/07 18:30:30 Done.
+ TestingProfile* otr_profile = otr_profile_builder.Build().release();
+
otr_profile->set_incognito(true);
- otr_profile->SetPrefService(otr_prefs);
+ profile->SetOffTheRecordProfile(otr_profile);
battre 2013/02/07 09:45:08 I think that this would be slightly cleaner: Test
Joe Thomas 2013/02/07 14:22:54 I had tried it already and it was causing a DCHECK
PrefProvider pref_content_settings_provider(regular_prefs, false);
PrefProvider pref_content_settings_provider_incognito(otr_prefs, true);
« no previous file with comments | « no previous file | chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698