#include <memory>
#include <tuple>
#include "base/memory/raw_ptr.h"
#include "base/time/time.h"
#include "content/browser/media/media_web_contents_observer.h"
#include "content/browser/media/session/audio_focus_delegate.h"
#include "content/browser/media/session/media_session_controller.h"
#include "content/browser/media/session/media_session_impl.h"
#include "content/public/browser/media_device_id.h"
#include "content/test/mock_agent_scheduling_group_host.h"
#include "content/test/test_render_view_host.h"
#include "content/test/test_web_contents.h"
#include "media/audio/audio_device_description.h"
#include "media/mojo/mojom/media_player.mojom.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/pending_associated_remote.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
class FakeAudioFocusDelegate : public content::AudioFocusDelegate { … };
class TestMediaPlayer : public media::mojom::MediaPlayer { … };
class RequestVisibilityWaiter { … };
class MediaSessionControllerTest : public RenderViewHostImplTestHarness { … };
TEST_F(MediaSessionControllerTest, NoAudioNoSession) { … }
TEST_F(MediaSessionControllerTest, TransientNoControllableSession) { … }
TEST_F(MediaSessionControllerTest, BasicControls) { … }
TEST_F(MediaSessionControllerTest, VolumeMultiplier) { … }
TEST_F(MediaSessionControllerTest, ControllerSidePause) { … }
TEST_F(MediaSessionControllerTest, Reinitialize) { … }
TEST_F(MediaSessionControllerTest, PositionState) { … }
TEST_F(MediaSessionControllerTest, RemovePlayerIfSessionReset) { … }
TEST_F(MediaSessionControllerTest, PictureInPictureAvailability) { … }
TEST_F(MediaSessionControllerTest, SufficientlyVisibleVideo) { … }
TEST_F(MediaSessionControllerTest, RequestVisibility) { … }
TEST_F(MediaSessionControllerTest, AudioOutputSinkIdChange) { … }
TEST_F(MediaSessionControllerTest, AddPlayerWhenUnmuted) { … }
TEST_F(MediaSessionControllerTest, RemovePlayerWhenMuted) { … }
TEST_F(MediaSessionControllerTest, EnterLeavePictureInPictureMuted) { … }
TEST_F(MediaSessionControllerTest, MuteWithPictureInPicture) { … }
TEST_F(MediaSessionControllerTest, LeavePictureInPictureUnmuted) { … }
TEST_F(MediaSessionControllerTest, AddPlayerWhenAddingAudio) { … }
TEST_F(MediaSessionControllerTest,
AddPlayerWhenEnteringPictureInPictureWithNoAudio) { … }
TEST_F(MediaSessionControllerTest,
AddPlayerWhenEnteringPictureInPicturePaused) { … }
TEST_F(MediaSessionControllerTest,
AddPlayerInitiallyPictureInPictureWithNoAudio) { … }
TEST_F(MediaSessionControllerTest,
AddPlayerWhenStartingRemotePlaybackWithNoAudio) { … }
TEST_F(MediaSessionControllerTest, EndOfPlaybackWithInPictureInPicture) { … }
TEST_F(MediaSessionControllerTest, HasVideo_True) { … }
TEST_F(MediaSessionControllerTest, HasVideo_False) { … }
TEST_F(MediaSessionControllerTest, AudioFocusRequestFailure) { … }
TEST_F(MediaSessionControllerTest, SetAudioSinkId) { … }
}