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

Unified Diff: services/video_capture/test/fake_device_descriptor_unittest.cc

Issue 2813343002: [Mojo Video Capture] Switch to using Mojo structs in media/capture/mojo (Closed)
Patch Set: Removed extraneous AtLeast Created 3 years, 8 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: services/video_capture/test/fake_device_descriptor_unittest.cc
diff --git a/services/video_capture/test/fake_device_descriptor_unittest.cc b/services/video_capture/test/fake_device_descriptor_unittest.cc
index 401efe8eaee29bebeb496e95b88ae0e702e79a1f..4ef67ac1c1846aead4db796eef4acd0ed0148903 100644
--- a/services/video_capture/test/fake_device_descriptor_unittest.cc
+++ b/services/video_capture/test/fake_device_descriptor_unittest.cc
@@ -32,7 +32,8 @@ TEST_F(FakeVideoCaptureDeviceDescriptorTest,
Run(mojom::DeviceAccessResultCode::SUCCESS))
.Times(1);
factory_->CreateDevice(
- fake_device_descriptor_.device_id, mojo::MakeRequest(&device_proxy_1),
+ fake_device_info_.descriptor.device_id,
+ mojo::MakeRequest(&device_proxy_1),
base::Bind(&MockCreateDeviceProxyCallback::Run,
base::Unretained(&create_device_proxy_callback_1)));
device_proxy_1.set_connection_error_handler(
@@ -48,7 +49,8 @@ TEST_F(FakeVideoCaptureDeviceDescriptorTest,
.Times(1)
.WillOnce(InvokeWithoutArgs([&wait_loop]() { wait_loop.Quit(); }));
factory_->CreateDevice(
- fake_device_descriptor_.device_id, mojo::MakeRequest(&device_proxy_2),
+ fake_device_info_.descriptor.device_id,
+ mojo::MakeRequest(&device_proxy_2),
base::Bind(&MockCreateDeviceProxyCallback::Run,
base::Unretained(&create_device_proxy_callback_2)));
device_proxy_2.set_connection_error_handler(
@@ -64,22 +66,24 @@ TEST_F(FakeVideoCaptureDeviceDescriptorTest,
DISABLED_CanUseSecondRequestedProxy) {
mojom::DevicePtr device_proxy_1;
factory_->CreateDevice(
- fake_device_descriptor_.device_id, mojo::MakeRequest(&device_proxy_1),
+ fake_device_info_.descriptor.device_id,
+ mojo::MakeRequest(&device_proxy_1),
base::Bind([](mojom::DeviceAccessResultCode result_code) {}));
base::RunLoop wait_loop;
mojom::DevicePtr device_proxy_2;
factory_->CreateDevice(
- fake_device_descriptor_.device_id, mojo::MakeRequest(&device_proxy_2),
+ fake_device_info_.descriptor.device_id,
+ mojo::MakeRequest(&device_proxy_2),
base::Bind(
[](base::RunLoop* wait_loop,
mojom::DeviceAccessResultCode result_code) { wait_loop->Quit(); },
&wait_loop));
wait_loop.Run();
- CaptureSettings arbitrary_requested_settings;
- arbitrary_requested_settings.format.frame_size.SetSize(640, 480);
- arbitrary_requested_settings.format.frame_rate = 15;
+ media::VideoCaptureParams arbitrary_requested_settings;
+ arbitrary_requested_settings.requested_format.frame_size.SetSize(640, 480);
+ arbitrary_requested_settings.requested_format.frame_rate = 15;
arbitrary_requested_settings.resolution_change_policy =
media::RESOLUTION_POLICY_FIXED_RESOLUTION;
arbitrary_requested_settings.power_line_frequency =
« no previous file with comments | « services/video_capture/test/fake_device_descriptor_test.cc ('k') | services/video_capture/test/fake_device_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698