chromium/components/viz/common/frame_sinks/delay_based_time_source_unittest.cc

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

#include "components/viz/common/frame_sinks/delay_based_time_source.h"

#include <stdint.h>

#include "base/test/simple_test_tick_clock.h"
#include "base/test/test_mock_time_task_runner.h"
#include "components/viz/test/fake_delay_based_time_source.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace viz {
namespace {

base::TimeDelta Interval() {}

class DelayBasedTimeSourceTest : public ::testing::Test {};

TEST_F(DelayBasedTimeSourceTest, TaskPostedAndTickCalled) {}

TEST_F(DelayBasedTimeSourceTest, TickNotCalledWithTaskPosted) {}

TEST_F(DelayBasedTimeSourceTest, StartTwiceEnqueuesOneTask) {}

TEST_F(DelayBasedTimeSourceTest, StartWhenRunningDoesntTick) {}

// At 60Hz, when the tick returns at exactly the requested next time, make sure
// a 16ms next delay is posted.
TEST_F(DelayBasedTimeSourceTest, NextDelaySaneWhenExactlyOnRequestedTime) {}

// At 60Hz, when the tick returns at slightly after the requested next time,
// make sure a 16ms next delay is posted.
TEST_F(DelayBasedTimeSourceTest, NextDelaySaneWhenSlightlyAfterRequestedTime) {}

// At 60Hz, when the tick returns at exactly 2*interval after the requested next
// time, make sure we don't tick unnecessarily.
TEST_F(DelayBasedTimeSourceTest,
       NextDelaySaneWhenExactlyTwiceAfterRequestedTime) {}

// At 60Hz, when the tick returns at 2*interval and a bit after the requested
// next time, make sure a 16ms next delay is posted.
TEST_F(DelayBasedTimeSourceTest,
       NextDelaySaneWhenSlightlyAfterTwiceRequestedTime) {}

// At 60Hz, when the tick returns halfway to the next frame time, make sure
// a correct next delay value is posted.
TEST_F(DelayBasedTimeSourceTest, NextDelaySaneWhenHalfAfterRequestedTime) {}

TEST_F(DelayBasedTimeSourceTest, JitteryRuntimeWithFutureTimebases) {}

TEST_F(DelayBasedTimeSourceTest, AchievesTargetRateWithNoNoise) {}

TEST_F(DelayBasedTimeSourceTest, TestDeactivateWhilePending) {}

TEST_F(DelayBasedTimeSourceTest,
       TestDeactivateAndReactivateBeforeNextTickTime) {}

TEST_F(DelayBasedTimeSourceTest, TestDeactivateAndReactivateAfterNextTickTime) {}

}  // namespace
}  // namespace viz