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

// Copyright 2019 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_integrator_test_strike_database.h"

#include <utility>
#include <vector>

#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.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/autofill/core/browser/strike_databases/strike_database_integrator_base.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 {

class StrikeDatabaseIntegratorTestStrikeDatabaseTest : public ::testing::Test {};

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       MaxStrikesLimitReachedTest) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       StrikeDatabaseIntegratorTestNthStrikeAddedHistogram) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       AddStrikeForZeroAndNonZeroStrikesTest) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       ClearStrikesForNonZeroStrikesTest) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       ClearStrikesForZeroStrikesTest) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       NonExpiringStrikesDoNotExpire) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       RemoveExpiredStrikesTest) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       RemoveExpiredStrikesTestLogsUMA) {}

// This test verifies correctness of http://crbug/1206176.
TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       RemoveExpiredStrikesOnlyConsidersCurrentIntegrator) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       GetKeyForStrikeDatabaseIntegratorUniqueIdTest) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       MaxStrikesLimitReachedUniqueIdTest) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       StrikeDatabaseIntegratorUniqueIdTestNthStrikeAddedHistogram) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       StrikeDatabaseIntegratorUniqueIdTestClearAllStrikes) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       AddStrikeForZeroAndNonZeroStrikesUniqueIdTest) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       ClearStrikesForNonZeroStrikesUniqueIdTest) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       ClearStrikesForZeroStrikesUniqueIdTest) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       RemoveExpiredStrikesUniqueIdTest) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest, CountEntries) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest, ClearStrikesForKeys) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest, IdFromKey) {}

TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       LimitTheNumberOfElements) {}

// Test to ensure that `GetStrikeDatabaseDecision` function works correctly with
// the required latency since last strike requirement.
TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       HasRequiredDelayPassedSinceLastStrike) {}

// Test to ensure `ShouldBlockFeature` returns correctly based on
// `GetStrikeDatabaseDecision` for the max strikes limit condition.
TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       ShouldBlockFeature_MaxStrikes) {}

// Test to ensure `ShouldBlockFeature` returns correctly based on
// `GetStrikeDatabaseDecision` for the required delay condition.
TEST_F(StrikeDatabaseIntegratorTestStrikeDatabaseTest,
       ShouldBlockFeature_RequiredDelay) {}

}  // namespace autofill