| OLD | NEW |
| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 } | 122 } |
| 123 | 123 |
| 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 PrefRegistrySyncable(), | 132 new user_prefs::PrefRegistrySyncable(), |
| 133 new PrefNotifierImpl()); | 133 new PrefNotifierImpl()); |
| 134 chrome::RegisterUserPrefs(pref_service->registry()); | 134 chrome::RegisterUserPrefs(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); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 267 |
| 268 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) { | 268 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) { |
| 269 // Browser has been shut down since profile was created. | 269 // Browser has been shut down since profile was created. |
| 270 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE); | 270 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE); |
| 271 EXPECT_TRUE( | 271 EXPECT_TRUE( |
| 272 GetCallbackResult( | 272 GetCallbackResult( |
| 273 base::Bind( | 273 base::Bind( |
| 274 &ui::CheckShouldPromptForNewProfile, | 274 &ui::CheckShouldPromptForNewProfile, |
| 275 profile_.get()))); | 275 profile_.get()))); |
| 276 } | 276 } |
| OLD | NEW |