#include "components/safe_browsing/core/browser/db/v4_get_hash_protocol_manager.h"
#include <memory>
#include <vector>
#include "base/base64.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/strings/escape.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/simple_test_clock.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "components/safe_browsing/core/browser/db/safebrowsing.pb.h"
#include "components/safe_browsing/core/browser/db/util.h"
#include "components/safe_browsing/core/browser/db/v4_protocol_manager_util.h"
#include "components/safe_browsing/core/browser/db/v4_test_util.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/platform_test.h"
Time;
namespace safe_browsing {
class V4GetHashProtocolManagerTest : public PlatformTest { … };
TEST_F(V4GetHashProtocolManagerTest, TestGetHashErrorHandlingNetwork) { … }
TEST_F(V4GetHashProtocolManagerTest, TestGetHashErrorHandlingResponseCode) { … }
TEST_F(V4GetHashProtocolManagerTest, TestBackoffErrorHistogramCount) { … }
TEST_F(V4GetHashProtocolManagerTest, TestGetHashErrorHandlingParallelRequests) { … }
TEST_F(V4GetHashProtocolManagerTest, TestGetHashErrorHandlingOK) { … }
TEST_F(V4GetHashProtocolManagerTest,
TestResultsNotCachedForNegativeCacheDuration) { … }
TEST_F(V4GetHashProtocolManagerTest, TestGetHashRequest) { … }
TEST_F(V4GetHashProtocolManagerTest, TestParseHashResponse) { … }
TEST_F(V4GetHashProtocolManagerTest,
TestParseHashResponseWrongThreatEntryType) { … }
TEST_F(V4GetHashProtocolManagerTest, TestParseHashThreatPatternType) { … }
TEST_F(V4GetHashProtocolManagerTest, TestParseSubresourceFilterMetadata) { … }
TEST_F(V4GetHashProtocolManagerTest,
TestParseHashResponseNonPermissionMetadata) { … }
TEST_F(V4GetHashProtocolManagerTest,
TestParseHashResponseInconsistentThreatTypes) { … }
TEST_F(V4GetHashProtocolManagerTest, GetCachedResults) { … }
TEST_F(V4GetHashProtocolManagerTest, TestUpdatesAreMerged) { … }
TEST_F(V4GetHashProtocolManagerTest, TestGetFullHashesWithApisMergesMetadata) { … }
}