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

Unified Diff: google_apis/gaia/oauth2_token_service_request_unittest.cc

Issue 2083383002: Remove calls to deprecated MessageLoop methods in google_apis. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: manual change Created 4 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
« no previous file with comments | « google_apis/gaia/oauth2_access_token_fetcher_immediate_error.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6709379e455d64bfe701fac830f5eb23b7630791..8c019b96f28c4685ffdee5dbc8df275d7c44825e 100644
--- a/google_apis/gaia/oauth2_token_service_request_unittest.cc
+++ b/google_apis/gaia/oauth2_token_service_request_unittest.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/location.h"
+#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -184,7 +185,7 @@ void OAuth2TokenServiceRequestTest::SetUp() {
void OAuth2TokenServiceRequestTest::TearDown() {
// Run the loop to execute any pending tasks that may free resources.
- ui_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
OAuth2TokenServiceRequestTest::Provider::Provider(
@@ -213,7 +214,7 @@ TEST_F(OAuth2TokenServiceRequestTest, CreateAndStart_Failure) {
std::unique_ptr<OAuth2TokenServiceRequest> request(
OAuth2TokenServiceRequest::CreateAndStart(provider_.get(), kAccountId,
scopes_, &consumer_));
- ui_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_EQ(0, consumer_.num_get_token_success_);
EXPECT_EQ(1, consumer_.num_get_token_failure_);
EXPECT_EQ(GoogleServiceAuthError::SERVICE_UNAVAILABLE,
@@ -225,7 +226,7 @@ TEST_F(OAuth2TokenServiceRequestTest, CreateAndStart_Success) {
std::unique_ptr<OAuth2TokenServiceRequest> request(
OAuth2TokenServiceRequest::CreateAndStart(provider_.get(), kAccountId,
scopes_, &consumer_));
- ui_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_EQ(1, consumer_.num_get_token_success_);
EXPECT_EQ(0, consumer_.num_get_token_failure_);
EXPECT_EQ(kAccessToken, consumer_.last_token_);
@@ -238,7 +239,7 @@ TEST_F(OAuth2TokenServiceRequestTest,
OAuth2TokenServiceRequest::CreateAndStart(provider_.get(), kAccountId,
scopes_, &consumer_));
request.reset();
- ui_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_EQ(0, consumer_.num_get_token_success_);
EXPECT_EQ(0, consumer_.num_get_token_failure_);
EXPECT_EQ(0, oauth2_service_->num_invalidate_token());
@@ -249,7 +250,7 @@ TEST_F(OAuth2TokenServiceRequestTest,
std::unique_ptr<OAuth2TokenServiceRequest> request(
OAuth2TokenServiceRequest::CreateAndStart(provider_.get(), kAccountId,
scopes_, &consumer_));
- ui_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
request.reset();
EXPECT_EQ(1, consumer_.num_get_token_success_);
EXPECT_EQ(0, consumer_.num_get_token_failure_);
@@ -260,7 +261,7 @@ TEST_F(OAuth2TokenServiceRequestTest,
TEST_F(OAuth2TokenServiceRequestTest, InvalidateToken) {
OAuth2TokenServiceRequest::InvalidateToken(
provider_.get(), kAccountId, scopes_, kAccessToken);
- ui_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_EQ(0, consumer_.num_get_token_success_);
EXPECT_EQ(0, consumer_.num_get_token_failure_);
EXPECT_EQ(kAccessToken, oauth2_service_->last_token_invalidated());
« no previous file with comments | « google_apis/gaia/oauth2_access_token_fetcher_immediate_error.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698