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

Unified Diff: chrome/browser/chromeos/policy/upload_job_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: chrome/browser/chromeos/policy/upload_job_unittest.cc
diff --git a/chrome/browser/chromeos/policy/upload_job_unittest.cc b/chrome/browser/chromeos/policy/upload_job_unittest.cc
index 5f834d879ed48f0c77316bbf39cddf15dddbde9a..cb43615198ff180abd49a4c8ced4be8a0824c5e5 100644
--- a/chrome/browser/chromeos/policy/upload_job_unittest.cc
+++ b/chrome/browser/chromeos/policy/upload_job_unittest.cc
@@ -72,10 +72,10 @@ class MockOAuth2TokenService : public FakeOAuth2TokenService {
const ScopeSet& scopes) override;
// OAuth2TokenService:
- 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;
void AddTokenToQueue(const std::string& token);
bool IsTokenValid(const std::string& token) const;
@@ -135,7 +135,7 @@ void MockOAuth2TokenService::SetTokenInvalid(const std::string& token) {
valid_tokens_.erase(token);
}
-void MockOAuth2TokenService::InvalidateOAuth2Token(
+void MockOAuth2TokenService::InvalidateAccessTokenImpl(
const std::string& account_id,
const std::string& client_id,
const ScopeSet& scopes,
@@ -177,7 +177,8 @@ class UploadJobTestBase : public testing::Test, public UploadJob::Delegate {
void SetUp() override {
request_context_getter_ = new net::TestURLRequestContextGetter(
base::ThreadTaskRunnerHandle::Get());
- oauth2_service_.AddAccount("robot@gmail.com");
+ oauth2_service_.GetDelegate()->UpdateCredentials("robot@gmail.com",
+ "refresh_token");
ASSERT_TRUE(test_server_.InitializeAndWaitUntilReady());
}

Powered by Google App Engine
This is Rietveld 408576698