#include "net/http/transport_security_persister.h"
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/json/json_writer.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/task/current_thread.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "net/base/features.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/schemeful_site.h"
#include "net/http/transport_security_state.h"
#include "net/test/test_with_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace net {
namespace {
const char kReportUri[] = …;
class TransportSecurityPersisterTest : public ::testing::Test,
public WithTaskEnvironment { … };
TEST_F(TransportSecurityPersisterTest, LoadEntriesClearsExistingState) { … }
TEST_F(TransportSecurityPersisterTest, SerializeData1) { … }
TEST_F(TransportSecurityPersisterTest, SerializeData2) { … }
TEST_F(TransportSecurityPersisterTest, SerializeData3) { … }
TEST_F(TransportSecurityPersisterTest, DeserializeBadData) { … }
TEST_F(TransportSecurityPersisterTest, DeserializeDataOldWithoutCreationDate) { … }
TEST_F(TransportSecurityPersisterTest, DeserializeDataOldMergedDictionary) { … }
TEST_F(TransportSecurityPersisterTest, DeserializeLegacyExpectCTData) { … }
class TransportSecurityPersisterCommitTest
: public TransportSecurityPersisterTest,
public ::testing::WithParamInterface<std::string> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(TransportSecurityPersisterCommitTest, CommitIntervalIsValid) { … }
TEST_P(TransportSecurityPersisterCommitTest, WriteAtCommitInterval) { … }
}
}