#include "content/browser/media/media_internals.h"
#include <stddef.h>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/json/json_reader.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/lock.h"
#include "base/test/scoped_feature_list.h"
#include "base/types/cxx23_to_underlying.h"
#include "build/build_config.h"
#include "content/browser/media/session/media_session_impl.h"
#include "content/public/browser/media_session_service.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_renderer_host.h"
#include "content/test/test_web_contents.h"
#include "media/base/audio_parameters.h"
#include "media/base/channel_layout.h"
#include "media/base/media_log.h"
#include "media/base/media_switches.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/media_session/public/cpp/features.h"
#include "services/media_session/public/mojom/audio_focus.mojom.h"
#include "ui/gfx/geometry/size.h"
namespace {
const int kTestComponentID = …;
const char kTestDeviceID[] = …;
AudioFocusRequestStatePtr;
class MediaInternalsTestBase { … };
}
namespace content {
AudioFocusType;
class MediaInternalsVideoCaptureDeviceTest : public testing::Test,
public MediaInternalsTestBase { … };
TEST_F(MediaInternalsVideoCaptureDeviceTest,
VideoCaptureFormatStringIsInExpectedFormat) { … }
TEST_F(MediaInternalsVideoCaptureDeviceTest,
NotifyVideoCaptureDeviceCapabilitiesEnumerated) { … }
class MediaInternalsAudioLogTest
: public MediaInternalsTestBase,
public testing::TestWithParam<media::AudioLogFactory::AudioComponent> { … };
TEST_P(MediaInternalsAudioLogTest, AudioLogCreateStartStopErrorClose) { … }
TEST_P(MediaInternalsAudioLogTest, AudioLogCreateClose) { … }
INSTANTIATE_TEST_SUITE_P(…);
#if !BUILDFLAG(IS_ANDROID)
namespace {
const char16_t kTestTitle1[] = …;
const char16_t kTestTitle2[] = …;
}
class MediaInternalsAudioFocusTest : public RenderViewHostTestHarness,
public MediaInternalsTestBase { … };
TEST_F(MediaInternalsAudioFocusTest, AudioFocusStateIsUpdated) { … }
#endif
}