chromium/components/media_effects/media_device_info_unittest.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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) {}

}  // namespace

class MediaDeviceInfoTest : public testing::Test {};

// Test that audio device infos are retrieved on construction and updated when
// changes are observed from `SystemMonitor`.
TEST_F(MediaDeviceInfoTest, GetAudioDeviceInfos) {}

// Test that getting audio device info by ID returns the correct device or
// nullopt if not found.
TEST_F(MediaDeviceInfoTest, GetAudioDeviceInfoForId) {}

// Test that video device infos are retrieved on construction and updated when
// changes are observed from `SystemMonitor`.
TEST_F(MediaDeviceInfoTest, GetVideoDeviceInfos) {}

// Test that getting video device info by ID returns the correct device or
// nullopt if not found.
TEST_F(MediaDeviceInfoTest, GetVideoDeviceInfoForId) {}

// Test that appropriate observer methods are called when device infos change.
TEST_F(MediaDeviceInfoTest, Observers) {}

TEST(MediaDeviceInfoTestGeneral, DefaultAudioDeviceHandling) {}

TEST(MediaDeviceInfoTestGeneral, GetVideoDeviceNames) {}