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

Side by Side Diff: services/video_capture/mock_device_video_capture_service_test.cc

Issue 2378943002: Let clients interact with VideoCaptureDeviceClient instead of VideoCaptureDevice (Closed)
Patch Set: mcasas comments Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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 19 matching lines...) Expand all
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 gfx::Size requested_size(800, 600);
35 requested_format_ = mojom::VideoCaptureFormat::New(); 35 requested_format_ = mojom::VideoCaptureFormat::New();
36 requested_format_->frame_size = requested_size; 36 requested_format_->frame_size = requested_size;
37 requested_format_->frame_rate = 15; 37 requested_format_->frame_rate = 15;
38 requested_format_->pixel_format = media::mojom::VideoFormat::I420; 38 requested_format_->pixel_format = media::mojom::VideoFormat::I420;
39 requested_format_->pixel_storage = mojom::VideoPixelStorage::CPU; 39 requested_format_->pixel_storage = mojom::VideoPixelStorage::CPU;
40 mock_client_ = base::MakeUnique<MockVideoCaptureDeviceClient>( 40 mock_receiver_ = base::MakeUnique<MockVideoFrameReceiver>(
41 mojo::GetProxy(&mock_client_proxy_)); 41 mojo::GetProxy(&mock_receiver_proxy_));
42 } 42 }
43 43
44 } // namespace video_capture 44 } // namespace video_capture
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698