#include "components/viz/service/display/frame_interval_decider.h"
#include <memory>
#include <optional>
#include <utility>
#include "base/containers/flat_map.h"
#include "components/viz/common/quads/compositor_frame.h"
#include "components/viz/common/surfaces/frame_sink_id.h"
#include "components/viz/common/surfaces/surface_info.h"
#include "components/viz/service/surfaces/surface.h"
#include "components/viz/service/surfaces/surface_manager.h"
#include "components/viz/service/surfaces/surface_manager_delegate.h"
#include "components/viz/test/compositor_frame_helpers.h"
#include "components/viz/test/stub_surface_client.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace viz {
namespace {
FixedIntervalSettings;
FrameIntervalClass;
Result;
constexpr base::TimeTicks kNow = …;
void ExpectResult(Result result, FrameIntervalClass frame_interval_class) { … }
void ExpectResult(Result result, base::TimeDelta interval) { … }
class TestFrameIntervalMatcher : public FrameIntervalMatcher { … };
class FrameIntervalDeciderTest : public testing::Test,
public SurfaceManagerDelegate { … };
TEST_F(FrameIntervalDeciderTest, Basics) { … }
TEST_F(FrameIntervalDeciderTest, NoMatch) { … }
TEST_F(FrameIntervalDeciderTest, NoMatchFixedIntervals) { … }
TEST_F(FrameIntervalDeciderTest, FirstMatch) { … }
TEST_F(FrameIntervalDeciderTest, NoChange) { … }
TEST_F(FrameIntervalDeciderTest, IncreaseIntervalDelayFrameInterval) { … }
TEST_F(FrameIntervalDeciderTest, IncreaseIntervalDelayIntervalClass) { … }
TEST_F(FrameIntervalDeciderTest, IncreaseIntervalDelayVariantSwitch) { … }
}
}