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

Unified Diff: google_apis/gaia/oauth2_token_service_request_unittest.cc

Issue 1143323005: Refactor AO2TS to make it easier to componentize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address roger's comments Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: google_apis/gaia/oauth2_token_service_request_unittest.cc
diff --git a/google_apis/gaia/oauth2_token_service_request_unittest.cc b/google_apis/gaia/oauth2_token_service_request_unittest.cc
index 5b5a7b3abc6453faf118efbdf92723726efab4ed..e7efd86946f5127e5af255e45645372b3cfdc83d 100644
--- a/google_apis/gaia/oauth2_token_service_request_unittest.cc
+++ b/google_apis/gaia/oauth2_token_service_request_unittest.cc
@@ -90,10 +90,10 @@ class MockOAuth2TokenService : public FakeOAuth2TokenService {
const std::string& client_secret,
const ScopeSet& scopes) override;
- void InvalidateOAuth2Token(const std::string& account_id,
- const std::string& client_id,
- const ScopeSet& scopes,
- const std::string& access_token) override;
+ void InvalidateAccessTokenImpl(const std::string& account_id,
+ const std::string& client_id,
+ const ScopeSet& scopes,
+ const std::string& access_token) override;
private:
GoogleServiceAuthError response_error_;
@@ -137,7 +137,7 @@ void MockOAuth2TokenService::FetchOAuth2Token(
response_expiration_));
}
-void MockOAuth2TokenService::InvalidateOAuth2Token(
+void MockOAuth2TokenService::InvalidateAccessTokenImpl(
const std::string& account_id,
const std::string& client_id,
const ScopeSet& scopes,
@@ -178,7 +178,8 @@ class OAuth2TokenServiceRequestTest : public testing::Test {
void OAuth2TokenServiceRequestTest::SetUp() {
scopes_.insert(kScope);
oauth2_service_.reset(new MockOAuth2TokenService);
- oauth2_service_->AddAccount(kAccountId);
+ oauth2_service_->GetDelegate()->UpdateCredentials(kAccountId,
+ "refresh_token");
provider_ =
new Provider(base::ThreadTaskRunnerHandle::Get(), oauth2_service_.get());
}

Powered by Google App Engine
This is Rietveld 408576698