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

Unified Diff: sync/internal_api/attachments/attachment_uploader_impl_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: works for all platforms commit e75a498951318d4deb65d40ce8b2def44cd5abc0 Created 5 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 side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/attachments/attachment_uploader_impl_unittest.cc
diff --git a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc b/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc
index 882b575834af22e42cdf396cc4d3372fc71aebce..b3ed2097e10ce5567c52b6f828cccb93196ca4c2 100644
--- a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc
+++ b/sync/internal_api/attachments/attachment_uploader_impl_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,
@@ -318,7 +318,7 @@ void AttachmentUploaderImplTest::RunAndWaitFor(int num_uploads) {
Attachment AttachmentUploaderImplTest::UploadAndRespondWith(
const net::HttpStatusCode& status_code) {
- token_service().AddAccount(kAccountId);
+ token_service().GetDelegate()->UpdateCredentials(kAccountId, "refresh_token");
request_handler().SetStatusCode(status_code);
scoped_refptr<base::RefCountedString> some_data(new base::RefCountedString);
some_data->data() = kAttachmentData;

Powered by Google App Engine
This is Rietveld 408576698