| 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 "chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.h" | 5 #include "chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/run_loop.h" | |
| 9 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
| 10 #include "base/prefs/scoped_user_pref_update.h" | 9 #include "base/prefs/scoped_user_pref_update.h" |
| 11 #include "base/prefs/testing_pref_service.h" | 10 #include "base/prefs/testing_pref_service.h" |
| 11 #include "base/run_loop.h" |
| 12 #include "build/build_config.h" |
| 12 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 13 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 13 #include "components/signin/core/browser/signin_error_controller.h" | 14 #include "components/signin/core/browser/signin_error_controller.h" |
| 14 #include "components/signin/core/browser/test_signin_client.h" | 15 #include "components/signin/core/browser/test_signin_client.h" |
| 15 #include "components/signin/core/browser/webdata/token_web_data.h" | 16 #include "components/signin/core/browser/webdata/token_web_data.h" |
| 16 #include "components/signin/core/common/profile_management_switches.h" | 17 #include "components/signin/core/common/profile_management_switches.h" |
| 17 #include "components/signin/core/common/signin_pref_names.h" | 18 #include "components/signin/core/common/signin_pref_names.h" |
| 18 #include "google_apis/gaia/gaia_constants.h" | 19 #include "google_apis/gaia/gaia_constants.h" |
| 19 #include "google_apis/gaia/gaia_urls.h" | 20 #include "google_apis/gaia/gaia_urls.h" |
| 20 #include "google_apis/gaia/google_service_auth_error.h" | 21 #include "google_apis/gaia/google_service_auth_error.h" |
| 21 #include "google_apis/gaia/oauth2_access_token_consumer.h" | 22 #include "google_apis/gaia/oauth2_access_token_consumer.h" |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 EXPECT_EQ(1, tokens_loaded_count_); | 685 EXPECT_EQ(1, tokens_loaded_count_); |
| 685 EXPECT_EQ(2, token_available_count_); | 686 EXPECT_EQ(2, token_available_count_); |
| 686 EXPECT_EQ(0, token_revoked_count_); | 687 EXPECT_EQ(0, token_revoked_count_); |
| 687 EXPECT_EQ(1, start_batch_changes_); | 688 EXPECT_EQ(1, start_batch_changes_); |
| 688 EXPECT_EQ(1, end_batch_changes_); | 689 EXPECT_EQ(1, end_batch_changes_); |
| 689 EXPECT_TRUE( | 690 EXPECT_TRUE( |
| 690 oauth2_service_delegate_->RefreshTokenIsAvailable(primary_account)); | 691 oauth2_service_delegate_->RefreshTokenIsAvailable(primary_account)); |
| 691 EXPECT_TRUE( | 692 EXPECT_TRUE( |
| 692 oauth2_service_delegate_->RefreshTokenIsAvailable(secondary_account)); | 693 oauth2_service_delegate_->RefreshTokenIsAvailable(secondary_account)); |
| 693 } | 694 } |
| OLD | NEW |