chromium/net/http/transport_security_persister_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {};

// Tests that LoadEntries() clears existing non-static entries.
TEST_F(TransportSecurityPersisterTest, LoadEntriesClearsExistingState) {}

// Tests that serializing -> deserializing -> reserializing results in the same
// output.
TEST_F(TransportSecurityPersisterTest, SerializeData1) {}

TEST_F(TransportSecurityPersisterTest, SerializeData2) {}

TEST_F(TransportSecurityPersisterTest, SerializeData3) {}

// Tests that deserializing bad data shouldn't result in any STS entries being
// added to the transport security state.
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) {}

}  // namespace

}  // namespace net