Index: services/video_capture/test/fake_device_test.cc |
diff --git a/services/video_capture/test/fake_device_test.cc b/services/video_capture/test/fake_device_test.cc |
index 744b9df65d22fe7b26f31acc58f80d080b7486a4..f4ef97da55e69948bcad54889046405472bb9824 100644 |
--- a/services/video_capture/test/fake_device_test.cc |
+++ b/services/video_capture/test/fake_device_test.cc |
@@ -18,26 +18,17 @@ FakeDeviceTest::~FakeDeviceTest() = default; |
void FakeDeviceTest::SetUp() { |
FakeDeviceDescriptorTest::SetUp(); |
- // Query factory for supported formats of fake device |
- base::RunLoop wait_loop; |
- EXPECT_CALL(supported_formats_receiver_, Run(_)) |
- .WillOnce(Invoke( |
- [this, &wait_loop](const std::vector<I420CaptureFormat>& formats) { |
- fake_device_first_supported_format_ = formats[0]; |
- wait_loop.Quit(); |
- })); |
- factory_->GetSupportedFormats(fake_device_descriptor_.device_id, |
- supported_formats_receiver_.Get()); |
- wait_loop.Run(); |
- |
- requestable_settings_.format = fake_device_first_supported_format_; |
+ ASSERT_LE(1u, fake_device_info_.supported_formats.size()); |
+ fake_device_first_supported_format_ = fake_device_info_.supported_formats[0]; |
+ |
+ requestable_settings_.requested_format = fake_device_first_supported_format_; |
requestable_settings_.resolution_change_policy = |
media::RESOLUTION_POLICY_FIXED_RESOLUTION; |
requestable_settings_.power_line_frequency = |
media::PowerLineFrequency::FREQUENCY_DEFAULT; |
factory_->CreateDevice( |
- std::move(fake_device_descriptor_.device_id), |
+ std::move(fake_device_info_.descriptor.device_id), |
mojo::MakeRequest(&fake_device_proxy_), |
base::Bind([](mojom::DeviceAccessResultCode result_code) { |
ASSERT_EQ(mojom::DeviceAccessResultCode::SUCCESS, result_code); |