Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: components/signin/ios/browser/profile_oauth2_token_service_ios_delegate_unittest.mm

Issue 2930273003: [ObjC ARC] Converts components/signin/ios/browser:unit_tests to ARC. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/signin/ios/browser/account_consistency_service_unittest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "components/prefs/pref_registry_simple.h" 10 #include "components/prefs/pref_registry_simple.h"
11 #include "components/prefs/testing_pref_service.h" 11 #include "components/prefs/testing_pref_service.h"
12 #include "components/signin/core/browser/account_tracker_service.h" 12 #include "components/signin/core/browser/account_tracker_service.h"
13 #include "components/signin/core/browser/profile_oauth2_token_service.h" 13 #include "components/signin/core/browser/profile_oauth2_token_service.h"
14 #include "components/signin/core/browser/test_signin_client.h" 14 #include "components/signin/core/browser/test_signin_client.h"
15 #include "components/signin/core/common/signin_pref_names.h" 15 #include "components/signin/core/common/signin_pref_names.h"
16 #include "components/signin/ios/browser/fake_profile_oauth2_token_service_ios_pr ovider.h" 16 #include "components/signin/ios/browser/fake_profile_oauth2_token_service_ios_pr ovider.h"
17 #include "google_apis/gaia/gaia_urls.h" 17 #include "google_apis/gaia/gaia_urls.h"
18 #include "google_apis/gaia/oauth2_access_token_consumer.h" 18 #include "google_apis/gaia/oauth2_access_token_consumer.h"
19 #include "google_apis/gaia/oauth2_token_service_test_util.h" 19 #include "google_apis/gaia/oauth2_token_service_test_util.h"
20 #include "net/url_request/test_url_fetcher_factory.h" 20 #include "net/url_request/test_url_fetcher_factory.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
23 #if !defined(__has_feature) || !__has_feature(objc_arc)
24 #error "This file requires ARC support."
25 #endif
26
23 typedef ProfileOAuth2TokenServiceIOSProvider::AccountInfo ProviderAccount; 27 typedef ProfileOAuth2TokenServiceIOSProvider::AccountInfo ProviderAccount;
24 28
25 class ProfileOAuth2TokenServiceIOSDelegateTest 29 class ProfileOAuth2TokenServiceIOSDelegateTest
26 : public testing::Test, 30 : public testing::Test,
27 public OAuth2AccessTokenConsumer, 31 public OAuth2AccessTokenConsumer,
28 public OAuth2TokenService::Observer, 32 public OAuth2TokenService::Observer,
29 public SigninErrorController::Observer { 33 public SigninErrorController::Observer {
30 public: 34 public:
31 ProfileOAuth2TokenServiceIOSDelegateTest() 35 ProfileOAuth2TokenServiceIOSDelegateTest()
32 : factory_(NULL), 36 : factory_(NULL),
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 ResetObserverCounts(); 295 ResetObserverCounts();
292 GoogleServiceAuthError error(GoogleServiceAuthError::SERVICE_ERROR); 296 GoogleServiceAuthError error(GoogleServiceAuthError::SERVICE_ERROR);
293 oauth2_delegate_->UpdateAuthError(GetAccountId(account1), error); 297 oauth2_delegate_->UpdateAuthError(GetAccountId(account1), error);
294 EXPECT_EQ(1, error_changed_count_); 298 EXPECT_EQ(1, error_changed_count_);
295 299
296 oauth2_delegate_->RevokeAllCredentials(); 300 oauth2_delegate_->RevokeAllCredentials();
297 ResetObserverCounts(); 301 ResetObserverCounts();
298 oauth2_delegate_->UpdateAuthError(GetAccountId(account1), error); 302 oauth2_delegate_->UpdateAuthError(GetAccountId(account1), error);
299 EXPECT_EQ(0, error_changed_count_); 303 EXPECT_EQ(0, error_changed_count_);
300 } 304 }
OLDNEW
« no previous file with comments | « components/signin/ios/browser/account_consistency_service_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698