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

Side by Side Diff: chrome/browser/content_settings/content_settings_pref_provider_unittest.cc

Issue 10698111: browser: Move more files into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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) 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/content_settings/content_settings_pref_provider.h" 5 #include "chrome/browser/content_settings/content_settings_pref_provider.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // of the OTR unintentionally: http://crbug.com/74466. 149 // of the OTR unintentionally: http://crbug.com/74466.
150 TEST_F(PrefProviderTest, Incognito) { 150 TEST_F(PrefProviderTest, Incognito) {
151 PersistentPrefStore* user_prefs = new TestingPrefStore(); 151 PersistentPrefStore* user_prefs = new TestingPrefStore();
152 OverlayUserPrefStore* otr_user_prefs = 152 OverlayUserPrefStore* otr_user_prefs =
153 new OverlayUserPrefStore(user_prefs); 153 new OverlayUserPrefStore(user_prefs);
154 154
155 PrefServiceMockBuilder builder; 155 PrefServiceMockBuilder builder;
156 PrefService* regular_prefs = builder.WithUserPrefs(user_prefs).Create(); 156 PrefService* regular_prefs = builder.WithUserPrefs(user_prefs).Create();
157 157
158 Profile::RegisterUserPrefs(regular_prefs); 158 Profile::RegisterUserPrefs(regular_prefs);
159 browser::RegisterUserPrefs(regular_prefs); 159 chrome::RegisterUserPrefs(regular_prefs);
160 160
161 PrefService* otr_prefs = builder.WithUserPrefs(otr_user_prefs).Create(); 161 PrefService* otr_prefs = builder.WithUserPrefs(otr_user_prefs).Create();
162 162
163 Profile::RegisterUserPrefs(otr_prefs); 163 Profile::RegisterUserPrefs(otr_prefs);
164 browser::RegisterUserPrefs(otr_prefs); 164 chrome::RegisterUserPrefs(otr_prefs);
165 165
166 TestingProfile profile; 166 TestingProfile profile;
167 TestingProfile* otr_profile = new TestingProfile; 167 TestingProfile* otr_profile = new TestingProfile;
168 profile.SetOffTheRecordProfile(otr_profile); 168 profile.SetOffTheRecordProfile(otr_profile);
169 profile.SetPrefService(regular_prefs); 169 profile.SetPrefService(regular_prefs);
170 otr_profile->set_incognito(true); 170 otr_profile->set_incognito(true);
171 otr_profile->SetPrefService(otr_prefs); 171 otr_profile->SetPrefService(otr_prefs);
172 172
173 PrefProvider pref_content_settings_provider(regular_prefs, false); 173 PrefProvider pref_content_settings_provider(regular_prefs, false);
174 PrefProvider pref_content_settings_provider_incognito(otr_prefs, true); 174 PrefProvider pref_content_settings_provider_incognito(otr_prefs, true);
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 DictionaryValue* mutable_settings = update.Get(); 590 DictionaryValue* mutable_settings = update.Get();
591 mutable_settings->SetWithoutPathExpansion("www.example.com,*", 591 mutable_settings->SetWithoutPathExpansion("www.example.com,*",
592 new base::DictionaryValue()); 592 new base::DictionaryValue());
593 } 593 }
594 EXPECT_TRUE(observer.notification_received()); 594 EXPECT_TRUE(observer.notification_received());
595 595
596 provider.ShutdownOnUIThread(); 596 provider.ShutdownOnUIThread();
597 } 597 }
598 598
599 } // namespace content_settings 599 } // namespace content_settings
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/extensions/apps_promo_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698