chromium/third_party/blink/renderer/modules/mediastream/low_latency_video_renderer_algorithm_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/modules/mediastream/low_latency_video_renderer_algorithm.h"

#include <queue>

#include "base/time/time.h"
#include "media/base/video_frame_pool.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"

namespace blink {

class LowLatencyVideoRendererAlgorithmTest : public testing::Test {};

TEST_F(LowLatencyVideoRendererAlgorithmTest, Empty) {}

TEST_F(LowLatencyVideoRendererAlgorithmTest, NormalMode60Hz) {}

// Half frame rate (30Hz playing back 60Hz video)
TEST_F(LowLatencyVideoRendererAlgorithmTest, NormalMode30Hz) {}

// Fractional frame rate (90Hz playing back 60Hz video)
TEST_F(LowLatencyVideoRendererAlgorithmTest, NormalMode90Hz) {}

// Double frame rate (120Hz playing back 60Hz video)
TEST_F(LowLatencyVideoRendererAlgorithmTest, NormalMode120Hz) {}

// Super high display rate (600Hz playing back 60Hz video)
TEST_F(LowLatencyVideoRendererAlgorithmTest, NormalMode600Hz) {}

TEST_F(LowLatencyVideoRendererAlgorithmTest,
       DropAllFramesIfQueueExceedsMaxSize) {}

TEST_F(LowLatencyVideoRendererAlgorithmTest, EnterDrainMode60Hz) {}

TEST_F(LowLatencyVideoRendererAlgorithmTest, ExitDrainMode60Hz) {}

// Double Rate Drain (120Hz playing back 60Hz video in DRAIN mode)
TEST_F(LowLatencyVideoRendererAlgorithmTest, EnterDrainMode120Hz) {}

TEST_F(LowLatencyVideoRendererAlgorithmTest, SteadyStateQueueReduction60Hz) {}

// Fractional rate, steady state queue reduction.
TEST_F(LowLatencyVideoRendererAlgorithmTest, SteadyStateReduction90Hz) {}

TEST_F(LowLatencyVideoRendererAlgorithmTest,
       RenderFrameImmediatelyAfterOutage) {}

// Render at 60Hz with irregular vsync boundaries.
TEST_F(LowLatencyVideoRendererAlgorithmTest, NormalModeWithGlitch60Hz) {}

// Double frame rate (120Hz playing back 60Hz video) and render with irregular
// vsync boundaries.
TEST_F(LowLatencyVideoRendererAlgorithmTest, NormalModeWithGlitch120Hz) {}

}  // namespace blink