#include "components/media_effects/media_device_info.h"
#include <optional>
#include "base/system/system_monitor.h"
#include "base/test/test_future.h"
#include "components/media_effects/test/fake_audio_service.h"
#include "components/media_effects/test/fake_video_capture_service.h"
#include "content/public/browser/audio_service.h"
#include "content/public/browser/video_capture_service.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
GetRealAudioDeviceNames;
GetRealDefaultDeviceId;
GetRealVideoDeviceNames;
media::AudioDeviceDescription GetAudioDeviceDescription(size_t index) { … }
media::VideoCaptureDeviceDescriptor GetVideoCaptureDeviceDescriptor(
size_t index) { … }
class MockDeviceChangeObserver
: public media_effects::MediaDeviceInfo::Observer { … };
auto IsVideoDevice(size_t expected_index) { … }
}
class MediaDeviceInfoTest : public testing::Test { … };
TEST_F(MediaDeviceInfoTest, GetAudioDeviceInfos) { … }
TEST_F(MediaDeviceInfoTest, GetAudioDeviceInfoForId) { … }
TEST_F(MediaDeviceInfoTest, GetVideoDeviceInfos) { … }
TEST_F(MediaDeviceInfoTest, GetVideoDeviceInfoForId) { … }
TEST_F(MediaDeviceInfoTest, Observers) { … }
TEST(MediaDeviceInfoTestGeneral, DefaultAudioDeviceHandling) { … }
TEST(MediaDeviceInfoTestGeneral, GetVideoDeviceNames) { … }