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

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

Issue 292663010: Merge 271560 "Add a ChromeOS implementation of VideoCaptureDevic..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1985/src/
Patch Set: Created 6 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
Index: media/video/capture/video_capture_device_unittest.cc
===================================================================
--- media/video/capture/video_capture_device_unittest.cc (revision 271940)
+++ media/video/capture/video_capture_device_unittest.cc (working copy)
@@ -5,6 +5,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop/message_loop_proxy.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
@@ -177,7 +178,9 @@
#else
VideoCaptureDevice::Name device_name("jibberish", "jibberish");
#endif
- VideoCaptureDevice* device = VideoCaptureDevice::Create(device_name);
+ VideoCaptureDevice* device = VideoCaptureDevice::Create(
+ base::MessageLoopProxy::current(),
+ device_name);
EXPECT_TRUE(device == NULL);
}
@@ -189,7 +192,9 @@
}
scoped_ptr<VideoCaptureDevice> device(
- VideoCaptureDevice::Create(names_.front()));
+ VideoCaptureDevice::Create(
+ base::MessageLoopProxy::current(),
+ names_.front()));
ASSERT_TRUE(device);
DVLOG(1) << names_.front().id();
@@ -217,7 +222,9 @@
}
scoped_ptr<VideoCaptureDevice> device(
- VideoCaptureDevice::Create(names_.front()));
+ VideoCaptureDevice::Create(
+ base::MessageLoopProxy::current(),
+ names_.front()));
ASSERT_TRUE(device);
EXPECT_CALL(*client_, OnErr())
@@ -241,7 +248,8 @@
return;
}
scoped_ptr<VideoCaptureDevice> device(
- VideoCaptureDevice::Create(names_.front()));
+ VideoCaptureDevice::Create(base::MessageLoopProxy::current(),
+ names_.front()));
ASSERT_TRUE(device);
EXPECT_CALL(*client_, OnErr())
@@ -270,7 +278,8 @@
for (int i = 0; i <= 5; i++) {
ResetWithNewClient();
scoped_ptr<VideoCaptureDevice> device(
- VideoCaptureDevice::Create(names_.front()));
+ VideoCaptureDevice::Create(base::MessageLoopProxy::current(),
+ names_.front()));
gfx::Size resolution;
if (i % 2) {
resolution = gfx::Size(640, 480);
@@ -295,7 +304,8 @@
ResetWithNewClient();
scoped_ptr<VideoCaptureDevice> device(
- VideoCaptureDevice::Create(names_.front()));
+ VideoCaptureDevice::Create(base::MessageLoopProxy::current(),
+ names_.front()));
device->AllocateAndStart(capture_params, client_.PassAs<Client>());
WaitForCapturedFrame();
@@ -312,7 +322,8 @@
return;
}
scoped_ptr<VideoCaptureDevice> device(
- VideoCaptureDevice::Create(names_.front()));
+ VideoCaptureDevice::Create(base::MessageLoopProxy::current(),
+ names_.front()));
ASSERT_TRUE(device);
EXPECT_CALL(*client_, OnErr())
@@ -340,7 +351,8 @@
ASSERT_GT(static_cast<int>(names.size()), 0);
scoped_ptr<VideoCaptureDevice> device(
- video_capture_device_factory_->Create(names.front()));
+ video_capture_device_factory_->Create(base::MessageLoopProxy::current(),
+ names.front()));
ASSERT_TRUE(device);
EXPECT_CALL(*client_, OnErr())
@@ -367,7 +379,8 @@
DVLOG(1) << "No camera supports MJPEG format. Exiting test.";
return;
}
- scoped_ptr<VideoCaptureDevice> device(VideoCaptureDevice::Create(*name));
+ scoped_ptr<VideoCaptureDevice> device(
+ VideoCaptureDevice::Create(base::MessageLoopProxy::current(), *name));
ASSERT_TRUE(device);
EXPECT_CALL(*client_, OnErr())
@@ -410,7 +423,8 @@
ASSERT_GT(static_cast<int>(names.size()), 0);
scoped_ptr<VideoCaptureDevice> device(
- video_capture_device_factory_->Create(names.front()));
+ video_capture_device_factory_->Create(base::MessageLoopProxy::current(),
+ names.front()));
ASSERT_TRUE(device);
// Configure the FakeVideoCaptureDevice to use all its formats as roster.
« no previous file with comments | « media/video/capture/video_capture_device_factory.cc ('k') | media/video/capture/win/video_capture_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698