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

Side by Side Diff: content/renderer/media/user_media_client_impl_unittest.cc

Issue 2868853002: Add ability to retrieve capabilities for audio input devices to MediaDevicesDispatcherHost. (Closed)
Patch Set: rebase Created 3 years, 7 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
« no previous file with comments | « content/renderer/media/media_devices_event_dispatcher_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/media/user_media_client_impl.h" 5 #include "content/renderer/media/user_media_client_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 device = ::mojom::VideoInputDeviceCapabilities::New(); 152 device = ::mojom::VideoInputDeviceCapabilities::New();
153 device->device_id = kFakeVideoInputDeviceId2; 153 device->device_id = kFakeVideoInputDeviceId2;
154 device->facing_mode = ::mojom::FacingMode::ENVIRONMENT; 154 device->facing_mode = ::mojom::FacingMode::ENVIRONMENT;
155 device->formats.push_back(media::VideoCaptureFormat( 155 device->formats.push_back(media::VideoCaptureFormat(
156 gfx::Size(640, 480), 30.0f, media::PIXEL_FORMAT_I420)); 156 gfx::Size(640, 480), 30.0f, media::PIXEL_FORMAT_I420));
157 result.push_back(std::move(device)); 157 result.push_back(std::move(device));
158 158
159 std::move(client_callback).Run(std::move(result)); 159 std::move(client_callback).Run(std::move(result));
160 } 160 }
161 161
162 void GetAudioInputCapabilities(
163 GetAudioInputCapabilitiesCallback client_callback) override {
164 NOTREACHED();
165 }
166
162 MOCK_METHOD2(SubscribeDeviceChangeNotifications, 167 MOCK_METHOD2(SubscribeDeviceChangeNotifications,
163 void(MediaDeviceType type, uint32_t subscription_id)); 168 void(MediaDeviceType type, uint32_t subscription_id));
164 MOCK_METHOD2(UnsubscribeDeviceChangeNotifications, 169 MOCK_METHOD2(UnsubscribeDeviceChangeNotifications,
165 void(MediaDeviceType type, uint32_t subscription_id)); 170 void(MediaDeviceType type, uint32_t subscription_id));
166 }; 171 };
167 172
168 class UserMediaClientImplUnderTest : public UserMediaClientImpl { 173 class UserMediaClientImplUnderTest : public UserMediaClientImpl {
169 public: 174 public:
170 enum RequestState { 175 enum RequestState {
171 REQUEST_NOT_STARTED, 176 REQUEST_NOT_STARTED,
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 CreateDeviceConstraints(kFakeAudioInputDeviceId1); 922 CreateDeviceConstraints(kFakeAudioInputDeviceId1);
918 blink::WebMediaConstraints video_constraints = 923 blink::WebMediaConstraints video_constraints =
919 CreateFacingModeConstraints("environment"); 924 CreateFacingModeConstraints("environment");
920 // kFakeVideoInputDeviceId2 has environment facing mode. 925 // kFakeVideoInputDeviceId2 has environment facing mode.
921 TestValidRequestWithConstraints(audio_constraints, video_constraints, 926 TestValidRequestWithConstraints(audio_constraints, video_constraints,
922 kFakeAudioInputDeviceId1, 927 kFakeAudioInputDeviceId1,
923 kFakeVideoInputDeviceId2); 928 kFakeVideoInputDeviceId2);
924 } 929 }
925 930
926 } // namespace content 931 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_devices_event_dispatcher_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698