chromium/services/network/trust_tokens/sqlite_trust_token_persister_unittest.cc

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

#include "services/network/trust_tokens/sqlite_trust_token_persister.h"

#include <memory>

#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "components/sqlite_proto/key_value_data.h"
#include "services/network/trust_tokens/trust_token_database_owner.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

namespace network {

// This file contains tests specific to the SQLite persister. The class's basic
// functionality is also covered by the parameterized test
// TrustTokenPersisterUnittest.
//
// Test that writing, saving to disk, reinitializing, and reading yields the
// written value.
TEST(SQLiteTrustTokenPersister, PutReinitializeAndGet) {}

// Ensure that it's possible to create a Trust Tokens persister on top of a
// directory that does not already exist (regression test for
// crbug.com/1098019).
TEST(SQLiteTrustTokenPersister, NonexistentDirectory) {}

}  // namespace network