#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/timing/time_clamper.h"
#include <cmath>
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
namespace blink {
namespace {
const int64_t kIntervalInMicroseconds = …;
}
class TimeClamperTest : public testing::Test { … };
TEST_F(TimeClamperTest, TimeStampsAreNonNegative) { … }
TEST_F(TimeClamperTest, TimeStampsIncreaseByFixedAmount) { … }
TEST_F(TimeClamperTest, ClampingIsDeterministic) { … }
TEST_F(TimeClamperTest, ClampingNegativeNumbersIsConsistent) { … }
TEST_F(TimeClamperTest, ClampingIsPerInstance) { … }
void UniformityTest(int64_t time_microseconds,
int interval,
bool cross_origin_isolated_capability) { … }
TEST_F(TimeClamperTest, ClampingIsUniform) { … }
}