#include "third_party/blink/renderer/core/html/media/html_media_element.h"
#include <algorithm>
#include <memory>
#include "base/time/time.h"
#include "base/time/time_override.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/web_fullscreen_video_status.h"
#include "third_party/blink/renderer/core/dom/events/event.h"
#include "third_party/blink/renderer/core/dom/events/native_event_listener.h"
#include "third_party/blink/renderer/core/event_type_names.h"
#include "third_party/blink/renderer/core/execution_context/agent.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/fullscreen/fullscreen.h"
#include "third_party/blink/renderer/core/html/media/html_video_element.h"
#include "third_party/blink/renderer/core/html/media/media_controls.h"
#include "third_party/blink/renderer/core/html/media/media_custom_controls_fullscreen_detector.h"
#include "third_party/blink/renderer/core/html/track/text_track.h"
#include "third_party/blink/renderer/core/html/track/text_track_cue_list.h"
#include "third_party/blink/renderer/core/html/track/vtt/vtt_cue.h"
#include "third_party/blink/renderer/core/loader/empty_clients.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h"
#include "third_party/blink/renderer/platform/heap/thread_state.h"
#include "third_party/blink/renderer/platform/scheduler/public/event_loop.h"
#include "third_party/blink/renderer/platform/testing/empty_web_media_player.h"
#include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
namespace blink {
namespace {
class FakeWebMediaPlayer final : public EmptyWebMediaPlayer { … };
class MediaStubLocalFrameClient : public EmptyLocalFrameClient { … };
_;
AtLeast;
Return;
}
class HTMLMediaElementEventListenersTest : public PageTestBase { … };
TEST_F(HTMLMediaElementEventListenersTest, RemovingFromDocumentCollectsAll) { … }
TEST_F(HTMLMediaElementEventListenersTest,
ReInsertingInDocumentCollectsControls) { … }
TEST_F(HTMLMediaElementEventListenersTest,
FullscreenDetectorTimerCancelledOnContextDestroy) { … }
class MockEventListener final : public NativeEventListener { … };
static const base::TickClock* s_platform_clock_;
class HTMLMediaElementWithMockSchedulerTest
: public HTMLMediaElementEventListenersTest { … };
TEST_F(HTMLMediaElementWithMockSchedulerTest, OneTimeupdatePerSeek) { … }
TEST_F(HTMLMediaElementWithMockSchedulerTest, PeriodicTimeupdateAfterSeek) { … }
TEST_F(HTMLMediaElementWithMockSchedulerTest, ShowPosterFlag_FalseAfterLoop) { … }
TEST_F(HTMLMediaElementWithMockSchedulerTest, ShowPosterFlag_FalseAfterEnded) { … }
struct TestCue { … };
constexpr TestCue kTestCueData[] = …;
constexpr base::TimeDelta kTestCueDataLength = …;
class CueEventListener final : public NativeEventListener { … };
TEST_F(HTMLMediaElementWithMockSchedulerTest, CueEnterExitEventLatency) { … }
}