#include <optional>
#include "base/command_line.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "content/browser/picture_in_picture/picture_in_picture_service_impl.h"
#include "content/browser/picture_in_picture/video_picture_in_picture_window_controller_impl.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/overlay_window.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_content_browser_client.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
#include "net/dns/mock_host_resolver.h"
#include "services/media_session/public/cpp/features.h"
#include "third_party/blink/public/mojom/picture_in_picture/picture_in_picture.mojom.h"
namespace content {
namespace {
class TestVideoOverlayWindow : public VideoOverlayWindow { … };
class TestContentBrowserClient : public ContentBrowserTestContentBrowserClient { … };
class TestWebContentsDelegate : public WebContentsDelegate { … };
class VideoPictureInPictureContentBrowserTest : public ContentBrowserTest { … };
}
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
RequestSecondVideoInSameRFHDoesNotCloseWindow) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
RequestSecondVideoInDifferentRFHDoesNotCloseWindow) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
EnterPictureInPictureThenFullscreen) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
EnterFullscreenThenPictureInPicture) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
EnterPictureInPictureForPausedPlayer) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
CanvasCaptureRespondsToUserAction) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
PlayerRespondsToUserActionsAfterSrcUpdate) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
ClosingWindowWithPlayerResetNotifiesElement) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
ResettingPlayerHidesPlayPause) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
PlaybackStateWhenReopenedAfterEndOfStream) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
PlaybackStateWhenSeekingWhilePausedAfterEndOfStream) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
CheckWindowBounds) { … }
class MediaSessionPictureInPictureContentBrowserTest
: public VideoPictureInPictureContentBrowserTest { … };
IN_PROC_BROWSER_TEST_F(MediaSessionPictureInPictureContentBrowserTest,
EnterPictureInPictureForPausedPlayer) { … }
IN_PROC_BROWSER_TEST_F(MediaSessionPictureInPictureContentBrowserTest,
AudioPlayerWithPictureInPictureCanvasPlayer) { … }
IN_PROC_BROWSER_TEST_F(MediaSessionPictureInPictureContentBrowserTest,
ActionAvailableAfterEndOfStreamAndSrcUpdate) { … }
IN_PROC_BROWSER_TEST_F(VideoPictureInPictureContentBrowserTest,
EnterPictureInPictureHasNoChildWebContents) { … }
}