#include "net/cookies/cookie_monster.h"
#include <memory>
#include <optional>
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "base/timer/elapsed_timer.h"
#include "net/cookies/canonical_cookie.h"
#include "net/cookies/cookie_monster_store_test.h"
#include "net/cookies/cookie_util.h"
#include "net/cookies/parsed_cookie.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_result_reporter.h"
#include "url/gurl.h"
namespace net {
namespace {
const int kNumCookies = …;
const char kCookieLine[] = …;
static constexpr char kMetricPrefixParsedCookie[] = …;
static constexpr char kMetricPrefixCookieMonster[] = …;
static constexpr char kMetricParseTimeMs[] = …;
static constexpr char kMetricAddTimeMs[] = …;
static constexpr char kMetricQueryTimeMs[] = …;
static constexpr char kMetricDeleteAllTimeMs[] = …;
static constexpr char kMetricQueryDomainTimeMs[] = …;
static constexpr char kMetricImportTimeMs[] = …;
static constexpr char kMetricGetKeyTimeMs[] = …;
static constexpr char kMetricGCTimeMs[] = …;
perf_test::PerfResultReporter SetUpParseReporter(const std::string& story) { … }
perf_test::PerfResultReporter SetUpCookieMonsterReporter(
const std::string& story) { … }
class CookieMonsterTest : public testing::Test { … };
class CookieTestCallback { … };
class SetCookieCallback : public CookieTestCallback { … };
class GetCookieListCallback : public CookieTestCallback { … };
class GetAllCookiesCallback : public CookieTestCallback { … };
}
TEST(ParsedCookieTest, TestParseCookies) { … }
TEST(ParsedCookieTest, TestParseBigCookies) { … }
TEST_F(CookieMonsterTest, TestAddCookiesOnSingleHost) { … }
TEST_F(CookieMonsterTest, TestAddCookieOnManyHosts) { … }
TEST_F(CookieMonsterTest, TestDomainTree) { … }
TEST_F(CookieMonsterTest, TestDomainLine) { … }
TEST_F(CookieMonsterTest, TestImport) { … }
TEST_F(CookieMonsterTest, TestGetKey) { … }
TEST_F(CookieMonsterTest, TestGCTimes) { … }
}