OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/signin/ios/browser/profile_oauth2_token_service_ios_delegat
e.h" | 5 #include "components/signin/ios/browser/profile_oauth2_token_service_ios_delegat
e.h" |
6 | 6 |
7 #include "base/prefs/pref_registry_simple.h" | |
8 #include "base/prefs/testing_pref_service.h" | |
9 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "components/prefs/pref_registry_simple.h" |
| 9 #include "components/prefs/testing_pref_service.h" |
10 #include "components/signin/core/browser/account_tracker_service.h" | 10 #include "components/signin/core/browser/account_tracker_service.h" |
11 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 11 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
12 #include "components/signin/core/browser/test_signin_client.h" | 12 #include "components/signin/core/browser/test_signin_client.h" |
13 #include "components/signin/core/common/signin_pref_names.h" | 13 #include "components/signin/core/common/signin_pref_names.h" |
14 #include "components/signin/ios/browser/fake_profile_oauth2_token_service_ios_pr
ovider.h" | 14 #include "components/signin/ios/browser/fake_profile_oauth2_token_service_ios_pr
ovider.h" |
15 #include "google_apis/gaia/gaia_urls.h" | 15 #include "google_apis/gaia/gaia_urls.h" |
16 #include "google_apis/gaia/oauth2_access_token_consumer.h" | 16 #include "google_apis/gaia/oauth2_access_token_consumer.h" |
17 #include "google_apis/gaia/oauth2_token_service_test_util.h" | 17 #include "google_apis/gaia/oauth2_token_service_test_util.h" |
18 #include "net/url_request/test_url_fetcher_factory.h" | 18 #include "net/url_request/test_url_fetcher_factory.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 GoogleServiceAuthError cancelled_error( | 289 GoogleServiceAuthError cancelled_error( |
290 GoogleServiceAuthError::REQUEST_CANCELED); | 290 GoogleServiceAuthError::REQUEST_CANCELED); |
291 oauth2_delegate_->UpdateAuthError(GetAccountId(account1), cancelled_error); | 291 oauth2_delegate_->UpdateAuthError(GetAccountId(account1), cancelled_error); |
292 EXPECT_EQ(1, error_changed_count_); | 292 EXPECT_EQ(1, error_changed_count_); |
293 | 293 |
294 oauth2_delegate_->RevokeAllCredentials(); | 294 oauth2_delegate_->RevokeAllCredentials(); |
295 ResetObserverCounts(); | 295 ResetObserverCounts(); |
296 oauth2_delegate_->UpdateAuthError(GetAccountId(account1), cancelled_error); | 296 oauth2_delegate_->UpdateAuthError(GetAccountId(account1), cancelled_error); |
297 EXPECT_EQ(0, error_changed_count_); | 297 EXPECT_EQ(0, error_changed_count_); |
298 } | 298 } |
OLD | NEW |