Commit bcd6eb24 authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Use ScopedTaskEnvironment instead of MessageLoop

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=jam@chromium.org

Change-Id: I5e7341427bf5ef241b73c3a82718c278d2401b2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1635817Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Auto-Submit: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#665081}
parent 4260b4d8
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "base/test/scoped_task_environment.h"
#include "components/discardable_memory/service/discardable_shared_memory_manager.h" #include "components/discardable_memory/service/discardable_shared_memory_manager.h"
#include "components/viz/host/gpu_client.h" #include "components/viz/host/gpu_client.h"
#include "components/viz/service/gl/gpu_service_impl.h" #include "components/viz/service/gl/gpu_service_impl.h"
...@@ -113,7 +113,7 @@ class GpuHostTest : public testing::Test { ...@@ -113,7 +113,7 @@ class GpuHostTest : public testing::Test {
int GetChannelRequests(); int GetChannelRequests();
private: private:
base::MessageLoop message_loop_; base::test::ScopedTaskEnvironment scoped_task_environment_;
base::Thread io_thread_; base::Thread io_thread_;
TestGpuHostDelegate gpu_host_delegate_; TestGpuHostDelegate gpu_host_delegate_;
......
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