OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "services/video_capture/mock_device_video_capture_service_test.h" | 5 #include "services/video_capture/mock_device_video_capture_service_test.h" |
6 | 6 |
7 namespace video_capture { | 7 namespace video_capture { |
8 | 8 |
9 MockDeviceVideoCaptureServiceTest::MockDeviceVideoCaptureServiceTest() | 9 MockDeviceVideoCaptureServiceTest::MockDeviceVideoCaptureServiceTest() |
10 : shell::test::ServiceTest("exe:video_capture_unittests") {} | 10 : shell::test::ServiceTest("exe:video_capture_unittests") {} |
(...skipping 13 matching lines...) Expand all Loading... |
24 mock_descriptor->device_id = "MockDeviceId"; | 24 mock_descriptor->device_id = "MockDeviceId"; |
25 ASSERT_TRUE(service_->AddDeviceToMockFactory(std::move(mock_device_proxy_), | 25 ASSERT_TRUE(service_->AddDeviceToMockFactory(std::move(mock_device_proxy_), |
26 mock_descriptor->Clone())); | 26 mock_descriptor->Clone())); |
27 | 27 |
28 // Obtain the mock device from the factory | 28 // Obtain the mock device from the factory |
29 factory_->CreateDeviceProxy( | 29 factory_->CreateDeviceProxy( |
30 mock_descriptor->Clone(), mojo::GetProxy(&device_proxy_), | 30 mock_descriptor->Clone(), mojo::GetProxy(&device_proxy_), |
31 base::Bind([](mojom::DeviceAccessResultCode result_code) {})); | 31 base::Bind([](mojom::DeviceAccessResultCode result_code) {})); |
32 | 32 |
33 // Start the mock device with an arbitrary format | 33 // Start the mock device with an arbitrary format |
34 gfx::Size requested_size(800, 600); | 34 requested_format_.frame_size = gfx::Size(800, 600); |
35 requested_format_ = mojom::VideoCaptureFormat::New(); | 35 requested_format_.frame_rate = 15; |
36 requested_format_->frame_size = requested_size; | 36 requested_format_.pixel_format = media::PIXEL_FORMAT_I420; |
37 requested_format_->frame_rate = 15; | 37 requested_format_.pixel_storage = media::PIXEL_STORAGE_CPU; |
38 requested_format_->pixel_format = media::mojom::VideoFormat::I420; | |
39 requested_format_->pixel_storage = mojom::VideoPixelStorage::CPU; | |
40 mock_client_ = base::MakeUnique<MockVideoCaptureDeviceClient>( | 38 mock_client_ = base::MakeUnique<MockVideoCaptureDeviceClient>( |
41 mojo::GetProxy(&mock_client_proxy_)); | 39 mojo::GetProxy(&mock_client_proxy_)); |
42 } | 40 } |
43 | 41 |
44 } // namespace video_capture | 42 } // namespace video_capture |
OLD | NEW |