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/test/mock_device_test.h" | 5 #include "services/video_capture/test/mock_device_test.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "media/capture/video/video_capture_jpeg_decoder.h" | 9 #include "media/capture/video/video_capture_jpeg_decoder.h" |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 media::VideoCaptureDeviceDescriptor mock_descriptor; | 61 media::VideoCaptureDeviceDescriptor mock_descriptor; |
62 mock_descriptor.device_id = "MockDeviceId"; | 62 mock_descriptor.device_id = "MockDeviceId"; |
63 mock_device_factory_->AddMockDevice(&mock_device_, mock_descriptor); | 63 mock_device_factory_->AddMockDevice(&mock_device_, mock_descriptor); |
64 | 64 |
65 // Obtain the mock device from the factory | 65 // Obtain the mock device from the factory |
66 factory_->CreateDevice( | 66 factory_->CreateDevice( |
67 mock_descriptor.device_id, mojo::MakeRequest(&device_proxy_), | 67 mock_descriptor.device_id, mojo::MakeRequest(&device_proxy_), |
68 base::Bind([](mojom::DeviceAccessResultCode result_code) {})); | 68 base::Bind([](mojom::DeviceAccessResultCode result_code) {})); |
69 | 69 |
70 requested_settings_.format.frame_size = gfx::Size(800, 600); | 70 requested_settings_.requested_format.frame_size = gfx::Size(800, 600); |
71 requested_settings_.format.frame_rate = 15; | 71 requested_settings_.requested_format.frame_rate = 15; |
72 requested_settings_.resolution_change_policy = | 72 requested_settings_.resolution_change_policy = |
73 media::RESOLUTION_POLICY_FIXED_RESOLUTION; | 73 media::RESOLUTION_POLICY_FIXED_RESOLUTION; |
74 requested_settings_.power_line_frequency = | 74 requested_settings_.power_line_frequency = |
75 media::PowerLineFrequency::FREQUENCY_DEFAULT; | 75 media::PowerLineFrequency::FREQUENCY_DEFAULT; |
76 | 76 |
77 mock_receiver_ = | 77 mock_receiver_ = |
78 base::MakeUnique<MockReceiver>(mojo::MakeRequest(&mock_receiver_proxy_)); | 78 base::MakeUnique<MockReceiver>(mojo::MakeRequest(&mock_receiver_proxy_)); |
79 } | 79 } |
80 | 80 |
81 } // namespace video_capture | 81 } // namespace video_capture |
OLD | NEW |