chromium/components/trusted_vault/trusted_vault_degraded_recoverability_handler_unittest.cc

// Copyright 2022 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/trusted_vault/trusted_vault_degraded_recoverability_handler.h"

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "base/test/metrics/histogram_tester.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "components/trusted_vault/features.h"
#include "components/trusted_vault/proto/local_trusted_vault.pb.h"
#include "components/trusted_vault/proto_time_conversion.h"
#include "components/trusted_vault/securebox.h"
#include "components/trusted_vault/test/mock_trusted_vault_connection.h"
#include "components/trusted_vault/trusted_vault_connection.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace trusted_vault {
namespace {

_;
Eq;

CoreAccountInfo MakeAccountInfoWithGaiaId(const std::string& gaia_id) {}

MATCHER_P(DegradedRecoverabilityStateEq, expected_state, "") {}

class MockDelegate
    : public TrustedVaultDegradedRecoverabilityHandler::Delegate {};

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

TEST_F(TrustedVaultDegradedRecoverabilityHandlerTest,
       ShouldRecordTheDegradedRecoverabilityValueOnStart) {}

TEST_F(TrustedVaultDegradedRecoverabilityHandlerTest,
       ShouldPendTheCallbackUntilTheFirstRefreshIsCalled) {}

TEST_F(TrustedVaultDegradedRecoverabilityHandlerTest,
       ShouldInvokeTheCallbackImmediatelyWhenTheFirstRefreshIsAlreadyCalled) {}

TEST_F(TrustedVaultDegradedRecoverabilityHandlerTest,
       ShouldRefreshImmediatelyAndRecordTheReason) {}

TEST_F(TrustedVaultDegradedRecoverabilityHandlerTest,
       ShouldRefreshOncePerShortPeriod) {}

TEST_F(TrustedVaultDegradedRecoverabilityHandlerTest,
       ShouldRefreshOncePerLongPeriod) {}

TEST_F(TrustedVaultDegradedRecoverabilityHandlerTest,
       ShouldSwitchToShortPeriod) {}

TEST_F(TrustedVaultDegradedRecoverabilityHandlerTest,
       ShouldSwitchToLongPeriod) {}

TEST_F(TrustedVaultDegradedRecoverabilityHandlerTest,
       ShouldWriteTheStateImmediatelyWithRecoverabilityDegradedAndCurrentTime) {}

TEST_F(
    TrustedVaultDegradedRecoverabilityHandlerTest,
    ShouldWriteTheStateImmediatelyWithRecoverabilityNotDegradedAndCurrentTime) {}

TEST_F(TrustedVaultDegradedRecoverabilityHandlerTest,
       ShouldComputeTheNextRefreshTimeBasedOnTheStoredState) {}

}  // namespace
}  // namespace trusted_vault