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

Side by Side Diff: chrome/browser/signin/mutable_profile_oauth2_token_service_unittest.cc

Issue 200713005: components: Rename encryptor directory to os_crypt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/mutable_profile_oauth2_token_service.h" 6 #include "chrome/browser/signin/mutable_profile_oauth2_token_service.h"
7 #include "chrome/browser/signin/profile_oauth2_token_service.h" 7 #include "chrome/browser/signin/profile_oauth2_token_service.h"
8 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 8 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
9 #include "chrome/browser/webdata/web_data_service_factory.h" 9 #include "chrome/browser/webdata/web_data_service_factory.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
11 #include "components/signin/core/webdata/token_web_data.h" 11 #include "components/signin/core/webdata/token_web_data.h"
12 #include "content/public/test/test_browser_thread_bundle.h" 12 #include "content/public/test/test_browser_thread_bundle.h"
13 #include "google_apis/gaia/gaia_constants.h" 13 #include "google_apis/gaia/gaia_constants.h"
14 #include "google_apis/gaia/gaia_urls.h" 14 #include "google_apis/gaia/gaia_urls.h"
15 #include "google_apis/gaia/oauth2_token_service_test_util.h" 15 #include "google_apis/gaia/oauth2_token_service_test_util.h"
16 #include "net/http/http_status_code.h" 16 #include "net/http/http_status_code.h"
17 #include "net/url_request/test_url_fetcher_factory.h" 17 #include "net/url_request/test_url_fetcher_factory.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 #if defined(OS_MACOSX) 20 #if defined(OS_MACOSX)
21 #include "components/encryptor/os_crypt.h" 21 #include "components/os_crypt/os_crypt.h"
22 #endif 22 #endif
23 23
24 // Defining constant here to handle backward compatiblity tests, but this 24 // Defining constant here to handle backward compatiblity tests, but this
25 // constant is no longer used in current versions of chrome. 25 // constant is no longer used in current versions of chrome.
26 static const char kLSOService[] = "lso"; 26 static const char kLSOService[] = "lso";
27 static const char kEmail[] = "user@gmail.com"; 27 static const char kEmail[] = "user@gmail.com";
28 28
29 class MutableProfileOAuth2TokenServiceTest : 29 class MutableProfileOAuth2TokenServiceTest :
30 public testing::Test, 30 public testing::Test,
31 public OAuth2TokenService::Observer { 31 public OAuth2TokenService::Observer {
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 oauth2_service_->set_max_authorization_token_fetch_retries_for_testing(0); 338 oauth2_service_->set_max_authorization_token_fetch_retries_for_testing(0);
339 oauth2_service_->UpdateCredentials(kEmail, "refreshToken"); 339 oauth2_service_->UpdateCredentials(kEmail, "refreshToken");
340 ExpectOneTokenAvailableNotification(); 340 ExpectOneTokenAvailableNotification();
341 341
342 scoped_ptr<OAuth2TokenService::Request> request( 342 scoped_ptr<OAuth2TokenService::Request> request(
343 oauth2_service_->StartRequest(kEmail, scope_list, &consumer_)); 343 oauth2_service_->StartRequest(kEmail, scope_list, &consumer_));
344 base::RunLoop().RunUntilIdle(); 344 base::RunLoop().RunUntilIdle();
345 EXPECT_EQ(GoogleServiceAuthError::AuthErrorNone(), 345 EXPECT_EQ(GoogleServiceAuthError::AuthErrorNone(),
346 oauth2_service_->signin_global_error()->GetLastAuthError()); 346 oauth2_service_->signin_global_error()->GetLastAuthError());
347 } 347 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/local_auth_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698