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

Use ScopedTaskEnvironment instead of MessageLoop in /device/vr

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

Change-Id: I39077687bd9eadfa2b1ce2c05b00b3687d2b8aa0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648268
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: default avatarPiotr Bialecki <bialpio@chromium.org>
Commit-Queue: Piotr Bialecki <bialpio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667242}
parent 97f351f7
......@@ -8,8 +8,8 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/test/scoped_task_environment.h"
#include "device/vr/public/mojom/vr_service.mojom.h"
#include "device/vr/test/fake_vr_device.h"
#include "device/vr/test/fake_vr_service_client.h"
......@@ -116,7 +116,7 @@ class VRDeviceTest : public testing::Test {
FakeVRServiceClient* client() { return client_.get(); }
std::unique_ptr<FakeVRServiceClient> client_;
base::MessageLoop message_loop_;
base::test::ScopedTaskEnvironment scoped_task_environment_;
DISALLOW_COPY_AND_ASSIGN(VRDeviceTest);
};
......
......@@ -8,8 +8,8 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/test/scoped_task_environment.h"
#include "device/vr/public/mojom/vr_service.mojom.h"
#include "device/vr/test/fake_vr_device.h"
#include "device/vr/test/fake_vr_service_client.h"
......@@ -56,7 +56,7 @@ class VRDisplayImplTest : public testing::Test {
VRDeviceBase* device() { return device_.get(); }
FakeVRServiceClient* client() { return client_.get(); }
base::MessageLoop message_loop_;
base::test::ScopedTaskEnvironment scoped_task_environment_;
std::unique_ptr<FakeVRDevice> device_;
std::unique_ptr<FakeVRServiceClient> client_;
......
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