#include <memory>
#include <string>
#include <vector>
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/base/cache_type.h"
#include "net/base/features.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/disk_cache_test_util.h"
#include "net/http/http_cache.h"
#include "net/http/http_network_session.h"
#include "net/http/http_server_properties_manager.h"
#include "net/http/http_transaction_factory.h"
#include "net/http/mock_http_cache.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
#include "services/network/network_context.h"
#include "services/network/network_service.h"
#include "services/network/public/mojom/clear_data_filter.mojom.h"
#include "services/network/test/fake_test_cert_verifier_params_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace network {
namespace {
struct CacheTestEntry { … };
HttpCacheDataRemover::HttpCacheDataRemoverCallback
MakeHttpCacheDataRemoverCallback(base::OnceClosure callback) { … }
constexpr CacheTestEntry kCacheEntries[] = …;
mojom::NetworkContextParamsPtr CreateContextParams() { … }
class HttpCacheDataRemoverTest : public testing::Test { … };
class HttpCacheDataRemoverSplitCacheTest : public HttpCacheDataRemoverTest { … };
TEST_F(HttpCacheDataRemoverTest, ClearAll) { … }
TEST_F(HttpCacheDataRemoverTest, FilterDeleteByDomain) { … }
TEST_F(HttpCacheDataRemoverTest, FilterKeepByDomain) { … }
TEST_F(HttpCacheDataRemoverTest, FilterDeleteByOrigin) { … }
TEST_F(HttpCacheDataRemoverTest, FilterKeepByOrigin) { … }
TEST_F(HttpCacheDataRemoverTest, FilterDeleteByDomainAndOrigin) { … }
TEST_F(HttpCacheDataRemoverTest, FilterKeepByDomainAndOrigin) { … }
TEST_F(HttpCacheDataRemoverTest, FilterByDateFromUnbounded) { … }
TEST_F(HttpCacheDataRemoverTest, FilterByDateToUnbounded) { … }
TEST_F(HttpCacheDataRemoverTest, FilterByDateRange) { … }
TEST_F(HttpCacheDataRemoverTest, FilterDeleteByDomainAndDate) { … }
TEST_F(HttpCacheDataRemoverTest, FilterKeepByDomainAndDate) { … }
TEST_F(HttpCacheDataRemoverTest, DeleteHttpRemover) { … }
TEST_F(HttpCacheDataRemoverTest, TestDelayedBackend) { … }
TEST_F(HttpCacheDataRemoverSplitCacheTest, FilterDeleteByDomain) { … }
TEST_F(HttpCacheDataRemoverSplitCacheTest, FilterKeepByDomain) { … }
TEST_F(HttpCacheDataRemoverSplitCacheTest, FilterDeleteByOrigin) { … }
TEST_F(HttpCacheDataRemoverSplitCacheTest, FilterKeepByOrigin) { … }
}
}