| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/sync/signin_manager.h" | 5 #include "chrome/browser/sync/signin_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" |
| 7 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 8 #include "base/test/signaling_task.h" | |
| 9 #include "chrome/browser/net/gaia/token_service.h" | 10 #include "chrome/browser/net/gaia/token_service.h" |
| 10 #include "chrome/browser/net/gaia/token_service_unittest.h" | 11 #include "chrome/browser/net/gaia/token_service_unittest.h" |
| 11 #include "chrome/browser/password_manager/encryptor.h" | 12 #include "chrome/browser/password_manager/encryptor.h" |
| 12 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
| 13 #include "chrome/browser/sync/util/oauth.h" | 14 #include "chrome/browser/sync/util/oauth.h" |
| 14 #include "chrome/browser/webdata/web_data_service.h" | 15 #include "chrome/browser/webdata/web_data_service.h" |
| 15 #include "chrome/common/chrome_notification_types.h" | 16 #include "chrome/common/chrome_notification_types.h" |
| 16 #include "chrome/common/net/gaia/gaia_urls.h" | 17 #include "chrome/common/net/gaia/gaia_urls.h" |
| 17 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 TEST_F(SigninManagerTest, SignOutOnUserInfoSucessRaceTest) { | 283 TEST_F(SigninManagerTest, SignOutOnUserInfoSucessRaceTest) { |
| 283 browser_sync::SetIsUsingOAuthForTest(true); | 284 browser_sync::SetIsUsingOAuthForTest(true); |
| 284 manager_->Initialize(profile_.get()); | 285 manager_->Initialize(profile_.get()); |
| 285 EXPECT_TRUE(manager_->GetUsername().empty()); | 286 EXPECT_TRUE(manager_->GetUsername().empty()); |
| 286 | 287 |
| 287 SimulateSigninStartOAuth(); | 288 SimulateSigninStartOAuth(); |
| 288 manager_->SignOut(); | 289 manager_->SignOut(); |
| 289 SimulateOAuthUserInfoSuccess(); | 290 SimulateOAuthUserInfoSuccess(); |
| 290 EXPECT_TRUE(manager_->GetUsername().empty()); | 291 EXPECT_TRUE(manager_->GetUsername().empty()); |
| 291 } | 292 } |
| OLD | NEW |