#include "components/reporting/util/rate_limiter_leaky_bucket.h"
#include <cstddef>
#include "base/rand_util.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace reporting {
namespace {
constexpr size_t kMaxLevel = …;
constexpr base::TimeDelta kFillingTime = …;
constexpr base::TimeDelta kFillingPeriod = …;
constexpr size_t kEventCount = …;
class RateLimiterLeakyBucketTest : public ::testing::Test { … };
TEST_F(RateLimiterLeakyBucketTest, SingularEvent) { … }
TEST_F(RateLimiterLeakyBucketTest, SteadyEventsStream) { … }
TEST_F(RateLimiterLeakyBucketTest, RandomizedEventsStream) { … }
TEST_F(RateLimiterLeakyBucketTest, LargeEventsStream) { … }
}
}