#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "cc/metrics/frame_sequence_tracker.h"
#include <string>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "cc/metrics/compositor_frame_reporting_controller.h"
#include "cc/metrics/frame_sequence_tracker_collection.h"
#include "cc/metrics/frame_sorter.h"
#include "components/viz/common/frame_sinks/begin_frame_args.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/presentation_feedback.h"
namespace cc {
namespace {
const char* ParseNumber(const char* str, uint64_t* retvalue) { … }
}
class FrameSequenceTrackerTest : public testing::Test { … };
TEST_F(FrameSequenceTrackerTest, SourceIdChangeDuringSequence) { … }
TEST_F(FrameSequenceTrackerTest, TestNotifyFramePresented) { … }
TEST_F(FrameSequenceTrackerTest, ReportMetricsAtFixedInterval) { … }
TEST_F(FrameSequenceTrackerTest, MainFrameNoDamageTracking) { … }
TEST_F(FrameSequenceTrackerTest, SimpleSequenceOneFrame) { … }
TEST_F(FrameSequenceTrackerTest, SimpleSequenceOneFrameNoDamage) { … }
TEST_F(FrameSequenceTrackerTest, MultipleNoDamageNotifications) { … }
TEST_F(FrameSequenceTrackerTest, MultipleNoDamageNotificationsFromMain) { … }
TEST_F(FrameSequenceTrackerTest, DelayedMainFrameNoDamage) { … }
TEST_F(FrameSequenceTrackerTest, DelayedMainFrameNoDamageFromOlderFrame) { … }
TEST_F(FrameSequenceTrackerTest, DelayedMainFrameNoDamageAfterNextMainFrame) { … }
TEST_F(FrameSequenceTrackerTest, StateResetDuringSequence) { … }
TEST_F(FrameSequenceTrackerTest, SequenceStateResetsDuringFrame) { … }
TEST_F(FrameSequenceTrackerTest, SequenceNumberReset) { … }
TEST_F(FrameSequenceTrackerTest, MainThroughputWithHighLatency) { … }
TEST_F(FrameSequenceTrackerTest, TrackLastImplFrame1) { … }
TEST_F(FrameSequenceTrackerTest, TrackLastImplFrame10) { … }
TEST_F(FrameSequenceTrackerTest, TrackLastImplFrame11) { … }
TEST_F(FrameSequenceTrackerTest, TrackLastImplFrame24) { … }
TEST_F(FrameSequenceTrackerTest, IgnoreImplFrameBeforeTermination) { … }
TEST_F(FrameSequenceTrackerTest, TerminationWithNullPresentationTimeStamp) { … }
TEST_F(FrameSequenceTrackerTest, OffScreenMainDamage1) { … }
TEST_F(FrameSequenceTrackerTest, OffScreenMainDamage2) { … }
TEST_F(FrameSequenceTrackerTest, OffScreenMainDamage3) { … }
TEST_F(FrameSequenceTrackerTest, OffScreenMainDamage4) { … }
TEST_F(FrameSequenceTrackerTest, OffScreenMainDamage5) { … }
TEST_F(FrameSequenceTrackerTest, OffScreenMainDamage6) { … }
TEST_F(FrameSequenceTrackerTest, OffScreenMainDamage7) { … }
TEST_F(FrameSequenceTrackerTest, OffScreenMainDamage8) { … }
TEST_F(FrameSequenceTrackerTest, OffScreenMainDamage9) { … }
TEST_F(FrameSequenceTrackerTest, OffScreenMainDamage10) { … }
TEST_F(FrameSequenceTrackerTest, MainThreadPresentWithNonMatchedToken) { … }
TEST_F(FrameSequenceTrackerTest, CoalescedMainThreadPresent) { … }
TEST_F(FrameSequenceTrackerTest, MainThreadPresentWithNullTimeStamp) { … }
TEST_F(FrameSequenceTrackerTest, TrackerTypeEncoding) { … }
TEST_F(FrameSequenceTrackerTest, CustomTrackers) { … }
TEST_F(FrameSequenceTrackerTest, CustomTrackerOutOfOrderFramesMissingV3Data) { … }
}