#include "components/reporting/util/rate_limiter_token_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 RateLimiterTokenBucketTest : public ::testing::Test { … };
TEST_F(RateLimiterTokenBucketTest, SingularEvent) { … }
TEST_F(RateLimiterTokenBucketTest, SteadyEventsStream) { … }
TEST_F(RateLimiterTokenBucketTest, RandomizedEventsStream) { … }
TEST_F(RateLimiterTokenBucketTest, LargeEventsStream) { … }
}
}