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 <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
15 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
16 #include "build/build_config.h" | 17 #include "build/build_config.h" |
17 #include "components/os_crypt/os_crypt_mocker.h" | 18 #include "components/os_crypt/os_crypt_mocker.h" |
18 #include "components/prefs/pref_registry_simple.h" | 19 #include "components/prefs/pref_registry_simple.h" |
19 #include "components/prefs/scoped_user_pref_update.h" | 20 #include "components/prefs/scoped_user_pref_update.h" |
20 #include "components/prefs/testing_pref_service.h" | 21 #include "components/prefs/testing_pref_service.h" |
21 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 22 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
22 #include "components/signin/core/browser/signin_error_controller.h" | 23 #include "components/signin/core/browser/signin_error_controller.h" |
23 #include "components/signin/core/browser/test_signin_client.h" | 24 #include "components/signin/core/browser/test_signin_client.h" |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 EXPECT_EQ(1, tokens_loaded_count_); | 712 EXPECT_EQ(1, tokens_loaded_count_); |
712 EXPECT_EQ(2, token_available_count_); | 713 EXPECT_EQ(2, token_available_count_); |
713 EXPECT_EQ(0, token_revoked_count_); | 714 EXPECT_EQ(0, token_revoked_count_); |
714 EXPECT_EQ(1, start_batch_changes_); | 715 EXPECT_EQ(1, start_batch_changes_); |
715 EXPECT_EQ(1, end_batch_changes_); | 716 EXPECT_EQ(1, end_batch_changes_); |
716 EXPECT_TRUE( | 717 EXPECT_TRUE( |
717 oauth2_service_delegate_->RefreshTokenIsAvailable(primary_account)); | 718 oauth2_service_delegate_->RefreshTokenIsAvailable(primary_account)); |
718 EXPECT_TRUE( | 719 EXPECT_TRUE( |
719 oauth2_service_delegate_->RefreshTokenIsAvailable(secondary_account)); | 720 oauth2_service_delegate_->RefreshTokenIsAvailable(secondary_account)); |
720 } | 721 } |
OLD | NEW |