#include <string>
#include "base/location.h"
#include "base/strings/strcat.h"
#include "base/test/bind.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/schemeful_site.h"
#include "net/network_error_logging/mock_persistent_nel_store.h"
#include "net/network_error_logging/network_error_logging_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace net {
namespace {
NetworkErrorLoggingService::NelPolicy MakePolicy(
const url::Origin& origin,
const net::NetworkAnonymizationKey& network_anonymization_key) { … }
void RunClosureOnNelPoliciesLoaded(
base::OnceClosure closure,
std::vector<NetworkErrorLoggingService::NelPolicy>* policies_out,
std::vector<NetworkErrorLoggingService::NelPolicy> loaded_policies) { … }
MockPersistentNelStore::NelPoliciesLoadedCallback
MakeExpectedRunNelPoliciesLoadedCallback(
std::vector<NetworkErrorLoggingService::NelPolicy>* policies_out) { … }
class MockPersistentNelStoreTest : public testing::Test { … };
TEST_F(MockPersistentNelStoreTest, FinishLoading) { … }
TEST_F(MockPersistentNelStoreTest, PreStoredPolicies) { … }
TEST_F(MockPersistentNelStoreTest, FailedLoad) { … }
TEST_F(MockPersistentNelStoreTest, Add) { … }
TEST_F(MockPersistentNelStoreTest, AddThenDelete) { … }
TEST_F(MockPersistentNelStoreTest, AddFlushThenDelete) { … }
TEST_F(MockPersistentNelStoreTest, AddThenUpdate) { … }
}
}