chromium/content/renderer/media/renderer_web_media_player_delegate_browsertest.cc

// Copyright 2016 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/renderer/media/renderer_web_media_player_delegate.h"

#include <memory>
#include <tuple>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/simple_test_tick_clock.h"
#include "content/public/test/render_view_test.h"
#include "content/renderer/render_process.h"
#include "content/test/test_render_frame.h"
#include "media/base/media_content_type.h"
#include "media/base/media_switches.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/frame/lifecycle.mojom.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"

NiceMock;
Return;
StrictMock;

namespace media {

namespace {
constexpr base::TimeDelta kIdleTimeout =;
}

class MockWebMediaPlayerDelegateObserver
    : public blink::WebMediaPlayerDelegate::Observer {};

class RendererWebMediaPlayerDelegateTest : public content::RenderViewTest {};

TEST_F(RendererWebMediaPlayerDelegateTest, TheTimerIsInitiallyStopped) {}

TEST_F(RendererWebMediaPlayerDelegateTest, AddingAnIdleObserverStartsTheTimer) {}

TEST_F(RendererWebMediaPlayerDelegateTest, RemovingAllObserversStopsTheTimer) {}

TEST_F(RendererWebMediaPlayerDelegateTest, PlaySuspendsLowEndIdleDelegates) {}

TEST_F(RendererWebMediaPlayerDelegateTest, MaxLowEndIdleDelegates) {}

TEST_F(RendererWebMediaPlayerDelegateTest,
       SuspendRequestsAreOnlySentOnceIfHandled) {}

TEST_F(RendererWebMediaPlayerDelegateTest,
       SuspendRequestsAreOnlySentOnceIfNotHandled) {}

TEST_F(RendererWebMediaPlayerDelegateTest, IdleDelegatesAreSuspended) {}

TEST_F(RendererWebMediaPlayerDelegateTest, FrameVisibilityChanged) {}

class RendererWebMediaPlayerDelegateVisibilityTest
    : public content::RenderViewTest {};

TEST_F(RendererWebMediaPlayerDelegateVisibilityTest, NotRendered) {}

TEST_F(RendererWebMediaPlayerDelegateVisibilityTest, RenderedInViewport) {}

TEST_F(RendererWebMediaPlayerDelegateVisibilityTest, RenderedOutOfViewport) {}

TEST_F(RendererWebMediaPlayerDelegateVisibilityTest,
       RenderedToOutOfViewportDoesNotTriggerEvents) {}

TEST_F(RendererWebMediaPlayerDelegateVisibilityTest,
       RepeatedNotificationsDoNotTriggerEvents) {}

}  // namespace media