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

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

Issue 19714004: Revert 213148 "Add asserts to TestingProfile::CreateHistoryServi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 new user_prefs::PrefRegistrySyncable(), 131 new user_prefs::PrefRegistrySyncable(),
132 new PrefNotifierImpl()); 132 new PrefNotifierImpl());
133 chrome::RegisterUserProfilePrefs(pref_service->registry()); 133 chrome::RegisterUserProfilePrefs(pref_service->registry());
134 builder.SetPrefService(make_scoped_ptr<PrefServiceSyncable>(pref_service)); 134 builder.SetPrefService(make_scoped_ptr<PrefServiceSyncable>(pref_service));
135 profile_ = builder.Build(); 135 profile_ = builder.Build();
136 136
137 // Initialize the services we check. 137 // Initialize the services we check.
138 profile_->CreateBookmarkModel(true); 138 profile_->CreateBookmarkModel(true);
139 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); 139 model_ = BookmarkModelFactory::GetForProfile(profile_.get());
140 ui_test_utils::WaitForBookmarkModelToLoad(model_); 140 ui_test_utils::WaitForBookmarkModelToLoad(model_);
141 ASSERT_TRUE(profile_->CreateHistoryService(true, false)); 141 profile_->CreateHistoryService(true, false);
142 extensions::TestExtensionSystem* system = 142 extensions::TestExtensionSystem* system =
143 static_cast<extensions::TestExtensionSystem*>( 143 static_cast<extensions::TestExtensionSystem*>(
144 extensions::ExtensionSystem::Get(profile_.get())); 144 extensions::ExtensionSystem::Get(profile_.get()));
145 CommandLine command_line(CommandLine::NO_PROGRAM); 145 CommandLine command_line(CommandLine::NO_PROGRAM);
146 system->CreateExtensionService(&command_line, 146 system->CreateExtensionService(&command_line,
147 base::FilePath(kExtensionFilePath), 147 base::FilePath(kExtensionFilePath),
148 false); 148 false);
149 } 149 }
150 150
151 virtual void TearDown() OVERRIDE { 151 virtual void TearDown() OVERRIDE {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) { 259 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) {
260 // Browser has been shut down since profile was created. 260 // Browser has been shut down since profile was created.
261 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE); 261 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE);
262 EXPECT_TRUE( 262 EXPECT_TRUE(
263 GetCallbackResult( 263 GetCallbackResult(
264 base::Bind( 264 base::Bind(
265 &ui::CheckShouldPromptForNewProfile, 265 &ui::CheckShouldPromptForNewProfile,
266 profile_.get()))); 266 profile_.get())));
267 } 267 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698