#include "cc/trees/presentation_time_callback_buffer.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
std::vector<cc::PresentationTimeCallbackBuffer::Callback> GenerateCallbacks(
int num_callbacks) { … }
std::vector<cc::PresentationTimeCallbackBuffer::SuccessfulCallback>
GenerateSuccessfulCallbacks(int num_callbacks) { … }
std::vector<cc::PresentationTimeCallbackBuffer::SuccessfulCallbackWithDetails>
GenerateSuccessfulCallbackWithDetails(int num_callbacks) { … }
constexpr uint32_t kFrameToken1 = …;
constexpr uint32_t kFrameToken2 = …;
constexpr uint32_t kFrameToken3 = …;
constexpr uint32_t kFrameToken4 = …;
}
namespace cc {
TEST(PresentationTimeCallbackBufferTest, TestNoCallbacks) { … }
TEST(PresentationTimeCallbackBufferTest, TestMainThreadCallbackOnSuccess) { … }
TEST(PresentationTimeCallbackBufferTest, TestMainThreadCallbackOnFailure) { … }
TEST(PresentationTimeCallbackBufferTest, TestMainThreadSuccessfulCallback) { … }
TEST(PresentationTimeCallbackBufferTest,
TestCompositorThreadSuccessfulCallback) { … }
TEST(PresentationTimeCallbackBufferTest, TestMixedCallbacksOnSuccess) { … }
TEST(PresentationTimeCallbackBufferTest, TestMixedCallbacksOnFailure) { … }
TEST(PresentationTimeCallbackBufferTest, TestCallbackBatching) { … }
}