OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/run_loop.h" | 5 #include "base/run_loop.h" |
6 #include "chrome/browser/signin/account_fetcher_service_factory.h" | 6 #include "chrome/browser/signin/account_fetcher_service_factory.h" |
7 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 7 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
8 #include "chrome/browser/signin/fake_account_fetcher_service.h" | 8 #include "chrome/browser/signin/fake_account_fetcher_service.h" |
9 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" | |
10 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" | 9 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" |
11 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
12 #include "chrome/browser/signin/test_signin_client_builder.h" | 11 #include "chrome/browser/signin/test_signin_client_builder.h" |
13 #include "chrome/browser/sync/profile_sync_auth_provider.h" | 12 #include "chrome/browser/sync/profile_sync_auth_provider.h" |
14 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
| 14 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
15 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 15 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
16 #include "content/public/test/test_browser_thread_bundle.h" | 16 #include "content/public/test/test_browser_thread_bundle.h" |
17 #include "google_apis/gaia/gaia_constants.h" | 17 #include "google_apis/gaia/gaia_constants.h" |
18 #include "google_apis/gaia/google_service_auth_error.h" | 18 #include "google_apis/gaia/google_service_auth_error.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 const char kAccountId[] = "account.id"; | 21 const char kAccountId[] = "account.id"; |
22 | 22 |
23 class ProfileSyncAuthProviderTest : public ::testing::Test { | 23 class ProfileSyncAuthProviderTest : public ::testing::Test { |
24 public: | 24 public: |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 run_loop.RunUntilIdle(); | 90 run_loop.RunUntilIdle(); |
91 EXPECT_EQ(2U, request_token_errors_.size()); | 91 EXPECT_EQ(2U, request_token_errors_.size()); |
92 | 92 |
93 EXPECT_EQ("", issued_tokens_[0]); | 93 EXPECT_EQ("", issued_tokens_[0]); |
94 EXPECT_EQ(GoogleServiceAuthError::REQUEST_CANCELED, | 94 EXPECT_EQ(GoogleServiceAuthError::REQUEST_CANCELED, |
95 request_token_errors_[0].state()); | 95 request_token_errors_[0].state()); |
96 | 96 |
97 EXPECT_NE("", issued_tokens_[1]); | 97 EXPECT_NE("", issued_tokens_[1]); |
98 EXPECT_EQ(GoogleServiceAuthError::AuthErrorNone(), request_token_errors_[1]); | 98 EXPECT_EQ(GoogleServiceAuthError::AuthErrorNone(), request_token_errors_[1]); |
99 } | 99 } |
OLD | NEW |