chromium/cc/metrics/compositor_frame_reporter_unittest.cc

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

#include "cc/metrics/compositor_frame_reporter.h"

#include <memory>
#include <utility>
#include <vector>

#include "base/rand_util.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/time/time.h"
#include "cc/metrics/compositor_frame_reporting_controller.h"
#include "cc/metrics/dropped_frame_counter.h"
#include "cc/metrics/event_metrics.h"
#include "cc/metrics/total_frame_counter.h"
#include "components/viz/common/frame_timing_details.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/types/scroll_input_type.h"

namespace cc {
namespace {

Each;
IsEmpty;
NotNull;

class CompositorFrameReporterTest : public testing::Test {};

TEST_F(CompositorFrameReporterTest, MainFrameAbortedReportingTest) {}

TEST_F(CompositorFrameReporterTest, ReplacedByNewReporterReportingTest) {}

TEST_F(CompositorFrameReporterTest, SubmittedFrameReportingTest) {}

TEST_F(CompositorFrameReporterTest, SubmittedDroppedFrameReportingTest) {}

// Tests that when a frame is presented to the user, total event latency metrics
// are reported properly.
TEST_F(CompositorFrameReporterTest,
       EventLatencyTotalForPresentedFrameReported) {}

// Tests that when a frame is presented to the user, total scroll event latency
// metrics are reported properly.
TEST_F(CompositorFrameReporterTest,
       EventLatencyScrollTotalForPresentedFrameReported) {}

// Tests that when a frame is presented to the user, total pinch event latency
// metrics are reported properly.
TEST_F(CompositorFrameReporterTest,
       EventLatencyPinchTotalForPresentedFrameReported) {}

// Tests that when the frame is not presented to the user, event latency metrics
// are not reported.
TEST_F(CompositorFrameReporterTest,
       EventLatencyForDidNotPresentFrameNotReported) {}

// Verifies that partial update dependent queues are working as expected when
// they reach their maximum capacity.
TEST_F(CompositorFrameReporterTest, PartialUpdateDependentQueues) {}

TEST_F(CompositorFrameReporterTest, StageLatencyGeneralPrediction) {}

TEST_F(CompositorFrameReporterTest, StageLatencyAllZeroPrediction) {}

TEST_F(CompositorFrameReporterTest, StageLatencyLargeDurationPrediction) {}

TEST_F(CompositorFrameReporterTest, StageLatencyMultiplePrediction) {}

// Tests that when a frame is presented to the user, event latency predictions
// are reported properly.
TEST_F(CompositorFrameReporterTest, EventLatencyDispatchPredictions) {}

// Tests that when a new frame with missing dispatch stages is presented to
// the user, event latency predictions are reported properly.
TEST_F(CompositorFrameReporterTest,
       EventLatencyDispatchPredictionsWithMissingStages) {}

// Tests that when a frame is presented to the user, event latency predictions
// are reported properly.
TEST_F(CompositorFrameReporterTest, EventLatencyCompositorPredictions) {}

// Tests that when a frame is presented to the user, event latency predictions
// are reported properly for filtered EventTypes.
TEST_F(CompositorFrameReporterTest, EventLatencyMultipleEventTypePredictions) {}

// Tests that when a frame is presented to the user, high latency attribution
// for EventLatency is reported properly for filtered EventTypes.
TEST_F(CompositorFrameReporterTest, EventLatencyAttributionPredictions) {}

// Tests that when a frame is presented to the user, high latency attribution
// for EventLatency is reported properly for filtered EventTypes.
TEST_F(CompositorFrameReporterTest, EventLatencyAttributionChangePredictions) {}

}  // namespace
}  // namespace cc