chromium/components/autofill/core/browser/strike_databases/strike_database_unittest.cc

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

#include "components/autofill/core/browser/strike_databases/strike_database.h"

#include <utility>
#include <vector>

#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "components/autofill/core/browser/proto/strike_data.pb.h"
#include "components/leveldb_proto/public/proto_database.h"
#include "components/leveldb_proto/public/proto_database_provider.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace autofill {
namespace {

// Note: This class is NOT the same as test_strike_database.h. This is an
// actual implementation of StrikeDatabase, but with helper functions
// added for easier test setup. If you want a TestStrikeDatabase, please use the
// one in test_strike_database.h.  This one is purely for this unit test class.
class TestStrikeDatabase : public StrikeDatabase {};

}  // anonymous namespace

// Runs tests against the actual StrikeDatabase class, complete with
// ProtoDatabase.
class StrikeDatabaseTest : public ::testing::Test {};

TEST_F(StrikeDatabaseTest, GetStrikesForMissingKeyTest) {}

TEST_F(StrikeDatabaseTest, GetStrikeForNonZeroStrikesTest) {}

TEST_F(StrikeDatabaseTest, ClearStrikesForMissingKeyTest) {}

TEST_F(StrikeDatabaseTest, ClearStrikesForNonZeroStrikesTest) {}

TEST_F(StrikeDatabaseTest, ClearStrikesForMultipleNonZeroStrikesTest) {}

TEST_F(StrikeDatabaseTest, ClearStrikesForMultipleNonZeroStrikesEntriesTest) {}

TEST_F(StrikeDatabaseTest, ClearAllProtoStrikesTest) {}

TEST_F(StrikeDatabaseTest, GetAllStrikeKeysForProject) {}

TEST_F(StrikeDatabaseTest, ClearStrikesForKeys) {}

// Test to ensure that the timestamp of strike being added is logged and
// retrieved correctly.
TEST_F(StrikeDatabaseTest, LastUpdateTimestamp) {}

}  // namespace autofill