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

Unified Diff: media/capture/video/fake_video_capture_device_unittest.cc

Issue 2859273004: Use ScopedTaskEnvironment instead of MessageLoop in media/capture/ unit tests (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | media/capture/video/linux/v4l2_capture_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/fake_video_capture_device_unittest.cc
diff --git a/media/capture/video/fake_video_capture_device_unittest.cc b/media/capture/video/fake_video_capture_device_unittest.cc
index 2af74e7a3eb130bf0892f94f1a5cd764a148ea2f..90968827206e44eec856de1823ab7f63b226980c 100644
--- a/media/capture/video/fake_video_capture_device_unittest.cc
+++ b/media/capture/video/fake_video_capture_device_unittest.cc
@@ -14,6 +14,7 @@
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
+#include "base/test/scoped_task_environment.h"
#include "base/test/test_timeouts.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
@@ -199,8 +200,7 @@ class ImageCaptureClient : public base::RefCounted<ImageCaptureClient> {
class FakeVideoCaptureDeviceBase : public ::testing::Test {
protected:
FakeVideoCaptureDeviceBase()
- : loop_(new base::MessageLoop()),
- descriptors_(new VideoCaptureDeviceDescriptors()),
+ : descriptors_(new VideoCaptureDeviceDescriptors()),
client_(CreateClient()),
image_capture_client_(new ImageCaptureClient()),
video_capture_device_factory_(new FakeVideoCaptureDeviceFactory()) {}
@@ -224,7 +224,7 @@ class FakeVideoCaptureDeviceBase : public ::testing::Test {
const VideoCaptureFormat& last_format() const { return last_format_; }
- const std::unique_ptr<base::MessageLoop> loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
std::unique_ptr<VideoCaptureDeviceDescriptors> descriptors_;
std::unique_ptr<base::RunLoop> run_loop_;
std::unique_ptr<MockClient> client_;
« no previous file with comments | « no previous file | media/capture/video/linux/v4l2_capture_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698