| Index: services/video_capture/mock_device_unittest.cc
|
| diff --git a/services/video_capture/mock_device_video_capture_service_unittest.cc b/services/video_capture/mock_device_unittest.cc
|
| similarity index 55%
|
| rename from services/video_capture/mock_device_video_capture_service_unittest.cc
|
| rename to services/video_capture/mock_device_unittest.cc
|
| index 1e44ca9580cd41090c09cb05fde89248a5553c10..d859af20cd1f3f472091ebf975358310c79d6c06 100644
|
| --- a/services/video_capture/mock_device_video_capture_service_unittest.cc
|
| +++ b/services/video_capture/mock_device_unittest.cc
|
| @@ -3,26 +3,23 @@
|
| // found in the LICENSE file.
|
|
|
| #include "base/run_loop.h"
|
| -#include "services/video_capture/mock_device_video_capture_service_test.h"
|
| +#include "services/video_capture/mock_device_test.h"
|
|
|
| using testing::_;
|
| -using testing::InvokeWithoutArgs;
|
| +using testing::Invoke;
|
|
|
| namespace video_capture {
|
|
|
| // Tests that the service stops the capture device when the client closes the
|
| // connection to the device proxy.
|
| -TEST_F(MockDeviceVideoCaptureServiceTest,
|
| - DeviceIsStoppedWhenDiscardingDeviceProxy) {
|
| +TEST_F(MockDeviceTest, DeviceIsStoppedWhenDiscardingDeviceProxy) {
|
| base::RunLoop wait_loop;
|
|
|
| EXPECT_CALL(*mock_device_, AllocateAndStartPtr(_));
|
| EXPECT_CALL(*mock_device_, StopAndDeAllocate())
|
| - .WillOnce(InvokeWithoutArgs([&wait_loop]() { wait_loop.Quit(); }));
|
| + .WillOnce(Invoke([&wait_loop]() { wait_loop.Quit(); }));
|
|
|
| - device_proxy_->Start(requested_format_,
|
| - media::RESOLUTION_POLICY_FIXED_RESOLUTION,
|
| - media::PowerLineFrequency::FREQUENCY_DEFAULT,
|
| + device_proxy_->Start(requested_settings_,
|
| std::move(mock_receiver_proxy_));
|
| device_proxy_.reset();
|
|
|
| @@ -31,17 +28,14 @@ TEST_F(MockDeviceVideoCaptureServiceTest,
|
|
|
| // Tests that the service stops the capture device when the client closes the
|
| // connection to the client proxy it provided to the service.
|
| -TEST_F(MockDeviceVideoCaptureServiceTest,
|
| - DeviceIsStoppedWhenDiscardingDeviceClient) {
|
| +TEST_F(MockDeviceTest, DeviceIsStoppedWhenDiscardingDeviceClient) {
|
| base::RunLoop wait_loop;
|
|
|
| EXPECT_CALL(*mock_device_, AllocateAndStartPtr(_));
|
| EXPECT_CALL(*mock_device_, StopAndDeAllocate())
|
| - .WillOnce(InvokeWithoutArgs([&wait_loop]() { wait_loop.Quit(); }));
|
| + .WillOnce(Invoke([&wait_loop]() { wait_loop.Quit(); }));
|
|
|
| - device_proxy_->Start(requested_format_,
|
| - media::RESOLUTION_POLICY_FIXED_RESOLUTION,
|
| - media::PowerLineFrequency::FREQUENCY_DEFAULT,
|
| + device_proxy_->Start(requested_settings_,
|
| std::move(mock_receiver_proxy_));
|
| mock_receiver_.reset();
|
|
|
|
|