Commit 0e1940fc authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Remove MessageLoop references in services/video_capture/test

MessageLoop is going away soon.

This CL was uploaded by git cl split.

R=chfremer@chromium.org

Bug: 891670
Change-Id: Ic9261b3931c4a01b8bde09d5d9c57d64ccaf8762
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1878193
Commit-Queue: Carlos Caballero <carlscab@google.com>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Auto-Submit: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#708995}
parent 8c46ac35
......@@ -5,8 +5,8 @@
#include "services/video_capture/test/mock_device_test.h"
#include "base/bind_helpers.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "media/capture/video/video_capture_system_impl.h"
using testing::_;
......@@ -20,7 +20,8 @@ MockDeviceTest::MockDeviceTest() = default;
MockDeviceTest::~MockDeviceTest() = default;
void MockDeviceTest::SetUp() {
message_loop_ = std::make_unique<base::MessageLoop>();
task_environment_ =
std::make_unique<base::test::SingleThreadTaskEnvironment>();
auto mock_device_factory = std::make_unique<media::MockDeviceFactory>();
// We keep a pointer to the MockDeviceFactory as a member so that we can
// invoke its AddMockDevice(). Ownership of the MockDeviceFactory is moved
......
......@@ -17,7 +17,9 @@
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
class MessageLoop;
namespace test {
class SingleThreadTaskEnvironment;
}
}
namespace video_capture {
......@@ -46,7 +48,7 @@ class MockDeviceTest : public ::testing::Test {
media::VideoCaptureParams requested_settings_;
private:
std::unique_ptr<base::MessageLoop> message_loop_;
std::unique_ptr<base::test::SingleThreadTaskEnvironment> task_environment_;
};
} // namespace video_capture
......
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