| 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 "chrome/browser/net/gaia/token_service.h" | 7 #include "chrome/browser/net/gaia/token_service.h" |
| 8 #include "chrome/browser/net/gaia/token_service_unittest.h" | 8 #include "chrome/browser/net/gaia/token_service_unittest.h" |
| 9 #include "chrome/browser/password_manager/encryptor.h" | 9 #include "chrome/browser/password_manager/encryptor.h" |
| 10 #include "chrome/browser/sync/util/oauth.h" | 10 #include "chrome/browser/sync/util/oauth.h" |
| 11 #include "chrome/browser/webdata/web_data_service.h" | 11 #include "chrome/browser/webdata/web_data_service.h" |
| 12 #include "chrome/common/chrome_notification_types.h" | 12 #include "chrome/common/chrome_notification_types.h" |
| 13 #include "chrome/common/net/gaia/gaia_urls.h" | 13 #include "chrome/common/net/gaia/gaia_urls.h" |
| 14 #include "chrome/test/base/signaling_task.h" | |
| 15 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
| 16 #include "content/test/test_url_fetcher_factory.h" | 15 #include "content/test/test_url_fetcher_factory.h" |
| 17 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
| 18 #include "net/url_request/url_request_status.h" | 17 #include "net/url_request/url_request_status.h" |
| 19 | 18 |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 20 |
| 22 class SigninManagerTest : public TokenServiceTestHarness { | 21 class SigninManagerTest : public TokenServiceTestHarness { |
| 23 public: | 22 public: |
| 24 virtual void SetUp() OVERRIDE { | 23 virtual void SetUp() OVERRIDE { |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 TEST_F(SigninManagerTest, SignOutOnUserInfoSucessRaceTest) { | 242 TEST_F(SigninManagerTest, SignOutOnUserInfoSucessRaceTest) { |
| 244 browser_sync::SetIsUsingOAuthForTest(true); | 243 browser_sync::SetIsUsingOAuthForTest(true); |
| 245 manager_->Initialize(profile_.get()); | 244 manager_->Initialize(profile_.get()); |
| 246 EXPECT_TRUE(manager_->GetUsername().empty()); | 245 EXPECT_TRUE(manager_->GetUsername().empty()); |
| 247 | 246 |
| 248 SimulateSigninStartOAuth(); | 247 SimulateSigninStartOAuth(); |
| 249 manager_->SignOut(); | 248 manager_->SignOut(); |
| 250 SimulateOAuthUserInfoSuccess(); | 249 SimulateOAuthUserInfoSuccess(); |
| 251 EXPECT_TRUE(manager_->GetUsername().empty()); | 250 EXPECT_TRUE(manager_->GetUsername().empty()); |
| 252 } | 251 } |
| OLD | NEW |