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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 CommandLine command_line(CommandLine::NO_PROGRAM); | 146 CommandLine command_line(CommandLine::NO_PROGRAM); |
147 system->CreateExtensionService(&command_line, | 147 system->CreateExtensionService(&command_line, |
148 base::FilePath(kExtensionFilePath), | 148 base::FilePath(kExtensionFilePath), |
149 false); | 149 false); |
150 } | 150 } |
151 | 151 |
152 virtual void TearDown() OVERRIDE { | 152 virtual void TearDown() OVERRIDE { |
153 // TestExtensionSystem uses DeleteSoon, so we need to delete the profile | 153 // TestExtensionSystem uses DeleteSoon, so we need to delete the profile |
154 // and then run the message queue to clean up. | 154 // and then run the message queue to clean up. |
155 profile_.reset(); | 155 profile_.reset(); |
156 MessageLoop::current()->RunUntilIdle(); | 156 base::MessageLoop::current()->RunUntilIdle(); |
157 } | 157 } |
158 | 158 |
159 protected: | 159 protected: |
160 MessageLoopForUI message_loop_; | 160 base::MessageLoopForUI message_loop_; |
161 content::TestBrowserThread ui_thread_; | 161 content::TestBrowserThread ui_thread_; |
162 scoped_ptr<TestingProfile> profile_; | 162 scoped_ptr<TestingProfile> profile_; |
163 TestingPrefStoreWithCustomReadError* user_prefs_; | 163 TestingPrefStoreWithCustomReadError* user_prefs_; |
164 BookmarkModel* model_; | 164 BookmarkModel* model_; |
165 | 165 |
166 #if defined OS_CHROMEOS | 166 #if defined OS_CHROMEOS |
167 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 167 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
168 chromeos::ScopedTestCrosSettings test_cros_settings_; | 168 chromeos::ScopedTestCrosSettings test_cros_settings_; |
169 chromeos::ScopedTestUserManager test_user_manager_; | 169 chromeos::ScopedTestUserManager test_user_manager_; |
170 #endif | 170 #endif |
(...skipping 96 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 |