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

Side by Side Diff: chrome/browser/sync/profile_sync_auth_provider_unittest.cc

Issue 1265213003: Componentize profile_sync_auth_provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated dependencies Created 5 years, 4 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 | « chrome/browser/sync/profile_sync_auth_provider.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_builder.h" 8 #include "chrome/browser/signin/fake_account_fetcher_service_builder.h"
9 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" 9 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h"
10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
11 #include "chrome/browser/signin/test_signin_client_builder.h" 11 #include "chrome/browser/signin/test_signin_client_builder.h"
12 #include "chrome/browser/sync/profile_sync_auth_provider.h"
13 #include "chrome/test/base/testing_profile.h" 12 #include "chrome/test/base/testing_profile.h"
14 #include "components/signin/core/browser/fake_account_fetcher_service.h" 13 #include "components/signin/core/browser/fake_account_fetcher_service.h"
15 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" 14 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
16 #include "components/signin/core/browser/profile_oauth2_token_service.h" 15 #include "components/signin/core/browser/profile_oauth2_token_service.h"
16 #include "components/sync_driver/profile_sync_auth_provider.h"
17 #include "content/public/test/test_browser_thread_bundle.h" 17 #include "content/public/test/test_browser_thread_bundle.h"
18 #include "google_apis/gaia/gaia_constants.h" 18 #include "google_apis/gaia/gaia_constants.h"
19 #include "google_apis/gaia/google_service_auth_error.h" 19 #include "google_apis/gaia/google_service_auth_error.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 21
22 const char kAccountId[] = "account.id"; 22 const char kAccountId[] = "account.id";
23 23
24 class ProfileSyncAuthProviderTest : public ::testing::Test { 24 class ProfileSyncAuthProviderTest : public ::testing::Test {
25 public: 25 public:
26 ProfileSyncAuthProviderTest() {} 26 ProfileSyncAuthProviderTest() {}
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 run_loop.RunUntilIdle(); 91 run_loop.RunUntilIdle();
92 EXPECT_EQ(2U, request_token_errors_.size()); 92 EXPECT_EQ(2U, request_token_errors_.size());
93 93
94 EXPECT_EQ("", issued_tokens_[0]); 94 EXPECT_EQ("", issued_tokens_[0]);
95 EXPECT_EQ(GoogleServiceAuthError::REQUEST_CANCELED, 95 EXPECT_EQ(GoogleServiceAuthError::REQUEST_CANCELED,
96 request_token_errors_[0].state()); 96 request_token_errors_[0].state());
97 97
98 EXPECT_NE("", issued_tokens_[1]); 98 EXPECT_NE("", issued_tokens_[1]);
99 EXPECT_EQ(GoogleServiceAuthError::AuthErrorNone(), request_token_errors_[1]); 99 EXPECT_EQ(GoogleServiceAuthError::AuthErrorNone(), request_token_errors_[1]);
100 } 100 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_auth_provider.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698