Commit 275cec3c authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Use ScopedTaskEnvironment instead of MessageLoop in /google_apis/gaia

MessageLoop will go away, eventually.

ScopedTaskEnvironment will per default start a ThreadPool, which should
be fine in most of the cases. If you belive your test needs to make sure
that no ThreadPool runs let me know and I will update the patch.

BUG=891670
This CL was uploaded by git cl split.

R=droger@chromium.org

Change-Id: I227b0f5030bb20a2dea53cef0b927f206e012dd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649373
Commit-Queue: Carlos Caballero <carlscab@google.com>
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: default avatarRoger Tawa <rogerta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678311}
parent dc329446
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/test/scoped_task_environment.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "google_apis/gaia/gaia_urls.h" #include "google_apis/gaia/gaia_urls.h"
#include "google_apis/gaia/google_service_auth_error.h" #include "google_apis/gaia/google_service_auth_error.h"
...@@ -100,7 +100,7 @@ class OAuth2ApiCallFlowTest : public testing::Test { ...@@ -100,7 +100,7 @@ class OAuth2ApiCallFlowTest : public testing::Test {
AddFetchResult(url, succeeds, status, std::string()); AddFetchResult(url, succeeds, status, std::string());
} }
base::MessageLoop message_loop_; base::test::ScopedTaskEnvironment scoped_task_environment_;
network::TestURLLoaderFactory test_url_loader_factory_; network::TestURLLoaderFactory test_url_loader_factory_;
scoped_refptr<network::SharedURLLoaderFactory> shared_factory_; scoped_refptr<network::SharedURLLoaderFactory> shared_factory_;
StrictMock<MockApiCallFlow> flow_; StrictMock<MockApiCallFlow> flow_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment