#include <string>
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/simple_test_clock.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/time/time.h"
#include "net/base/net_errors.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/base/schemeful_site.h"
#include "net/http/http_auth_cache.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/scheme_host_port.h"
ASCIIToUTF16;
namespace net {
namespace {
const char kRealm1[] = …;
const char kRealm2[] = …;
const char kRealm3[] = …;
const char kRealm4[] = …;
const char kRealm5[] = …;
const std::u16string k123(u"123");
const std::u16string k1234(u"1234");
const std::u16string k12345(u"12345");
const std::u16string kAdmin(u"admin");
const std::u16string kAlice(u"alice");
const std::u16string kAlice2(u"alice2");
const std::u16string kAlice3(u"alice3");
const std::u16string kPassword(u"password");
const std::u16string kRoot(u"root");
const std::u16string kUsername(u"username");
const std::u16string kWileCoyote(u"wilecoyote");
AuthCredentials CreateASCIICredentials(const char* username,
const char* password) { … }
bool DoesUrlMatchFilter(const std::set<std::string>& domains, const GURL& url) { … }
}
TEST(HttpAuthCacheTest, Basic) { … }
TEST(HttpAuthCacheTest, SeparateByTarget) { … }
TEST(HttpAuthCacheTest, SeparateServersByNetworkAnonymizationKey) { … }
TEST(HttpAuthCacheTest, NeverSeparateProxiesByNetworkAnonymizationKey) { … }
TEST(HttpAuthCacheTest, SetKeyServerEntriesByNetworkAnonymizationKey) { … }
TEST(HttpAuthCacheTest, AddPath) { … }
TEST(HttpAuthCacheTest, AddToExistingEntry) { … }
TEST(HttpAuthCacheTest, Remove) { … }
TEST(HttpAuthCacheTest, ClearEntriesAddedBetween) { … }
TEST(HttpAuthCacheTest, ClearEntriesAddedBetweenByFilter) { … }
TEST(HttpAuthCacheTest, ClearEntriesAddedBetweenWithAllTimeValues) { … }
TEST(HttpAuthCacheTest, ClearAllEntries) { … }
TEST(HttpAuthCacheTest, UpdateStaleChallenge) { … }
TEST(HttpAuthCacheTest, CopyProxyEntriesFrom) { … }
class HttpAuthCacheEvictionTest : public testing::Test { … };
TEST_F(HttpAuthCacheEvictionTest, RealmEntryEviction) { … }
TEST_F(HttpAuthCacheEvictionTest, RealmPathEviction) { … }
}