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

Side by Side Diff: content/browser/renderer_host/media/audio_input_device_manager_unittest.cc

Issue 2323913007: Add constructor taking group ID to MediaStreamDevice and StreamDeviceInfo (Closed)
Patch Set: Fix constructor Created 4 years, 3 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 (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/browser/renderer_host/media/audio_input_device_manager.h" 5 #include "content/browser/renderer_host/media/audio_input_device_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 } 172 }
173 173
174 // Opens a non-existing device. 174 // Opens a non-existing device.
175 TEST_F(MAYBE_AudioInputDeviceManagerTest, OpenNotExistingDevice) { 175 TEST_F(MAYBE_AudioInputDeviceManagerTest, OpenNotExistingDevice) {
176 InSequence s; 176 InSequence s;
177 177
178 MediaStreamType stream_type = MEDIA_DEVICE_AUDIO_CAPTURE; 178 MediaStreamType stream_type = MEDIA_DEVICE_AUDIO_CAPTURE;
179 std::string device_name("device_doesnt_exist"); 179 std::string device_name("device_doesnt_exist");
180 std::string device_id("id_doesnt_exist"); 180 std::string device_id("id_doesnt_exist");
181 std::string group_id("group_doesnt_exist");
181 int sample_rate(0); 182 int sample_rate(0);
182 int channel_config(0); 183 int channel_config(0);
183 StreamDeviceInfo dummy_device( 184 StreamDeviceInfo dummy_device(stream_type, device_name, device_id, group_id,
184 stream_type, device_name, device_id, sample_rate, channel_config, 2048); 185 sample_rate, channel_config, 2048);
185 186
186 int session_id = manager_->Open(dummy_device); 187 int session_id = manager_->Open(dummy_device);
187 EXPECT_CALL(*audio_input_listener_, 188 EXPECT_CALL(*audio_input_listener_,
188 Opened(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) 189 Opened(MEDIA_DEVICE_AUDIO_CAPTURE, session_id))
189 .Times(1); 190 .Times(1);
190 191
191 // Waits for the callback. 192 // Waits for the callback.
192 base::RunLoop().RunUntilIdle(); 193 base::RunLoop().RunUntilIdle();
193 } 194 }
194 195
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 DCHECK(!info); 279 DCHECK(!info);
279 280
280 manager_->Close(session_id); 281 manager_->Close(session_id);
281 EXPECT_CALL(*audio_input_listener_, 282 EXPECT_CALL(*audio_input_listener_,
282 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) 283 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id))
283 .Times(1); 284 .Times(1);
284 base::RunLoop().RunUntilIdle(); 285 base::RunLoop().RunUntilIdle();
285 } 286 }
286 287
287 } // namespace content 288 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698