chromium/content/browser/media/media_internals_unittest.cc

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

#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;

// This class encapsulates a MediaInternals reference. It also has some useful
// methods to receive a callback, deserialize its associated data and expect
// integer/string values.
class MediaInternalsTestBase {};

}  // namespace

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();

// TODO(crbug.com/40589017): AudioFocusManager is not available on
// Android.
#if !BUILDFLAG(IS_ANDROID)

namespace {

// Test page titles.
const char16_t kTestTitle1[] =;
const char16_t kTestTitle2[] =;

}  // namespace

class MediaInternalsAudioFocusTest : public RenderViewHostTestHarness,
                                     public MediaInternalsTestBase {};

TEST_F(MediaInternalsAudioFocusTest, AudioFocusStateIsUpdated) {}

#endif  // !BUILDFLAG(IS_ANDROID)

}  // namespace content