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

Side by Side Diff: chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper.cc ('k') | chrome/browser/ui/sync/sync_promo_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/sync/profile_signin_confirmation_helper.h" 5 #include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 virtual void SetUp() OVERRIDE { 124 virtual void SetUp() OVERRIDE {
125 // Create the profile. 125 // Create the profile.
126 TestingProfile::Builder builder; 126 TestingProfile::Builder builder;
127 user_prefs_ = new TestingPrefStoreWithCustomReadError; 127 user_prefs_ = new TestingPrefStoreWithCustomReadError;
128 TestingPrefServiceSyncable* pref_service = new TestingPrefServiceSyncable( 128 TestingPrefServiceSyncable* pref_service = new TestingPrefServiceSyncable(
129 new TestingPrefStore(), 129 new TestingPrefStore(),
130 user_prefs_, 130 user_prefs_,
131 new TestingPrefStore(), 131 new TestingPrefStore(),
132 new user_prefs::PrefRegistrySyncable(), 132 new user_prefs::PrefRegistrySyncable(),
133 new PrefNotifierImpl()); 133 new PrefNotifierImpl());
134 chrome::RegisterUserPrefs(pref_service->registry()); 134 chrome::RegisterUserProfilePrefs(pref_service->registry());
135 builder.SetPrefService(make_scoped_ptr<PrefServiceSyncable>(pref_service)); 135 builder.SetPrefService(make_scoped_ptr<PrefServiceSyncable>(pref_service));
136 profile_ = builder.Build(); 136 profile_ = builder.Build();
137 137
138 // Initialize the services we check. 138 // Initialize the services we check.
139 profile_->CreateBookmarkModel(true); 139 profile_->CreateBookmarkModel(true);
140 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); 140 model_ = BookmarkModelFactory::GetForProfile(profile_.get());
141 ui_test_utils::WaitForBookmarkModelToLoad(model_); 141 ui_test_utils::WaitForBookmarkModelToLoad(model_);
142 profile_->CreateHistoryService(true, false); 142 profile_->CreateHistoryService(true, false);
143 extensions::TestExtensionSystem* system = 143 extensions::TestExtensionSystem* system =
144 static_cast<extensions::TestExtensionSystem*>( 144 static_cast<extensions::TestExtensionSystem*>(
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) { 261 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) {
262 // Browser has been shut down since profile was created. 262 // Browser has been shut down since profile was created.
263 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE); 263 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE);
264 EXPECT_TRUE( 264 EXPECT_TRUE(
265 GetCallbackResult( 265 GetCallbackResult(
266 base::Bind( 266 base::Bind(
267 &ui::CheckShouldPromptForNewProfile, 267 &ui::CheckShouldPromptForNewProfile,
268 profile_.get()))); 268 profile_.get())));
269 } 269 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper.cc ('k') | chrome/browser/ui/sync/sync_promo_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698