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

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

Issue 2368213002: Remove AudioOutputDeviceEnumerator. Replace usage with MediaDevicesManager. (Closed)
Patch Set: Remove BoolDeviceTypes std::array literals 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 (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/media_stream_dispatcher_host.h" 5 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 chromeos::CrasAudioHandler::Shutdown(); 308 chromeos::CrasAudioHandler::Shutdown();
309 #endif 309 #endif
310 } 310 }
311 311
312 void SetUp() override { 312 void SetUp() override {
313 video_capture_device_factory_->GetDeviceDescriptors( 313 video_capture_device_factory_->GetDeviceDescriptors(
314 &physical_video_devices_); 314 &physical_video_devices_);
315 ASSERT_GT(physical_video_devices_.size(), 0u); 315 ASSERT_GT(physical_video_devices_.size(), 0u);
316 316
317 base::RunLoop run_loop; 317 base::RunLoop run_loop;
318 MediaDevicesManager::BoolDeviceTypes devices_to_enumerate;
319 devices_to_enumerate[MEDIA_DEVICE_TYPE_AUDIO_INPUT] = true;
318 media_stream_manager_->media_devices_manager()->EnumerateDevices( 320 media_stream_manager_->media_devices_manager()->EnumerateDevices(
319 {{true, false, false}}, 321 devices_to_enumerate,
320 base::Bind(&AudioInputDevicesEnumerated, run_loop.QuitClosure(), 322 base::Bind(&AudioInputDevicesEnumerated, run_loop.QuitClosure(),
321 &physical_audio_devices_)); 323 &physical_audio_devices_));
322 run_loop.Run(); 324 run_loop.Run();
323 325
324 ASSERT_GT(physical_audio_devices_.size(), 0u); 326 ASSERT_GT(physical_audio_devices_.size(), 0u);
325 } 327 }
326 328
327 void TearDown() override { host_->OnChannelClosing(); } 329 void TearDown() override { host_->OnChannelClosing(); }
328 330
329 protected: 331 protected:
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 981
980 TEST_F(MediaStreamDispatcherHostTest, DeviceChangeNotification) { 982 TEST_F(MediaStreamDispatcherHostTest, DeviceChangeNotification) {
981 SetupFakeUI(false); 983 SetupFakeUI(false);
982 // warm up the cache 984 // warm up the cache
983 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId, 985 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
984 MEDIA_DEVICE_VIDEO_CAPTURE); 986 MEDIA_DEVICE_VIDEO_CAPTURE);
985 SubscribeToDeviceChangeNotificationsAndWaitForNotification(kRenderId); 987 SubscribeToDeviceChangeNotificationsAndWaitForNotification(kRenderId);
986 } 988 }
987 989
988 }; // namespace content 990 }; // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698