#include <stddef.h>
#include <memory>
#include "base/process/process.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "content/public/test/browser_task_environment.h"
#include "extensions/browser/extension_function.h"
#include "extensions/browser/extension_function_registry.h"
#include "extensions/browser/quota_service.h"
#include "testing/gtest/include/gtest/gtest.h"
TimeTicks;
namespace extensions {
Bucket;
Config;
BucketList;
TimedLimit;
namespace {
const char kGenericName[] = …;
const Config kFrozenConfig = …;
const Config k2PerMinute = …;
const TimeTicks kStartTime = …;
const TimeTicks k1MinuteAfterStart = …;
class Mapper : public QuotaLimitHeuristic::BucketMapper { … };
class MockMapper : public QuotaLimitHeuristic::BucketMapper { … };
class MockFunction : public ExtensionFunction { … };
class TimedLimitMockFunction : public MockFunction { … };
class FrozenMockFunction : public MockFunction { … };
}
class QuotaServiceTest : public testing::Test { … };
class QuotaLimitHeuristicTest : public testing::Test { … };
TEST_F(QuotaLimitHeuristicTest, Timed) { … }
TEST_F(QuotaServiceTest, NoHeuristic) { … }
TEST_F(QuotaServiceTest, FrozenHeuristic) { … }
TEST_F(QuotaServiceTest, SingleHeuristic) { … }
TEST_F(QuotaServiceTest, MultipleFunctionsDontInterfere) { … }
TEST_F(QuotaServiceTest, ViolatorsWillBeForgiven) { … }
}