chromium/components/autofill_prediction_improvements/core/browser/autofill_prediction_improvements_manager_unittest.cc

// Copyright 2024 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_prediction_improvements/core/browser/autofill_prediction_improvements_manager.h"

#include "base/test/gmock_move_support.h"
#include "base/test/mock_callback.h"
#include "components/autofill/core/browser/autofill_form_test_utils.h"
#include "components/autofill/core/common/autofill_test_utils.h"
#include "components/autofill/core/common/form_field_data.h"
#include "components/autofill_prediction_improvements/core/browser/autofill_prediction_improvements_features.h"
#include "components/autofill_prediction_improvements/core/browser/autofill_prediction_improvements_filling_engine.h"
#include "components/optimization_guide/core/optimization_guide_decider.h"
#include "components/optimization_guide/proto/features/common_quality_data.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace autofill_prediction_improvements {

namespace {

_;
Eq;
Return;
ReturnRef;
SaveArg;

class MockAutofillPredictionImprovementsClient
    : public AutofillPredictionImprovementsClient {};

class MockOptimizationGuideDecider
    : public optimization_guide::OptimizationGuideDecider {};

class MockAutofillPredictionImprovementsFillingEngine
    : public AutofillPredictionImprovementsFillingEngine {};

}  // namespace

class BaseAutofillPredictionImprovementsManagerTest : public testing::Test {};

class AutofillPredictionImprovementsManagerTest
    : public BaseAutofillPredictionImprovementsManagerTest {};

// Tests that the callback delivering improved predictions is called eventually.
TEST_F(AutofillPredictionImprovementsManagerTest,
       ExtractImprovedPredictionsForFormFields) {}

class ShouldProvideAutofillPredictionImprovementsTest
    : public BaseAutofillPredictionImprovementsManagerTest {};

TEST_F(ShouldProvideAutofillPredictionImprovementsTest,
       DoesNotExtractImprovedPredictionsIfFlagDisabled) {}

TEST_F(ShouldProvideAutofillPredictionImprovementsTest,
       DoesNotExtractImprovedPredictionsIfDeciderIsNull) {}

TEST_F(ShouldProvideAutofillPredictionImprovementsTest,
       ExtractsImprovedPredictionsIfSkipAllowlistIsTrue) {}

TEST_F(ShouldProvideAutofillPredictionImprovementsTest,
       DoesNotExtractImprovedPredictionsIfOptimizationGuideCannotBeApplied) {}

TEST_F(ShouldProvideAutofillPredictionImprovementsTest,
       ExtractsImprovedPredictionsIfOptimizationGuideCanBeApplied) {}

}  // namespace autofill_prediction_improvements