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

Side by Side Diff: services/video_capture/test/mock_device_test.cc

Issue 2813343002: [Mojo Video Capture] Switch to using Mojo structs in media/capture/mojo (Closed)
Patch Set: Removed extraneous AtLeast Created 3 years, 8 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/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
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
OLDNEW
« no previous file with comments | « services/video_capture/test/mock_device_test.h ('k') | services/video_capture/test/service_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698