chromium/components/segmentation_platform/internal/selection/segment_result_provider_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/segmentation_platform/internal/selection/segment_result_provider.h"

#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/simple_test_clock.h"
#include "base/test/task_environment.h"
#include "components/prefs/testing_pref_service.h"
#include "components/segmentation_platform/internal/database/mock_signal_database.h"
#include "components/segmentation_platform/internal/database/mock_signal_storage_config.h"
#include "components/segmentation_platform/internal/database/test_segment_info_database.h"
#include "components/segmentation_platform/internal/execution/mock_model_provider.h"
#include "components/segmentation_platform/internal/execution/model_executor_impl.h"
#include "components/segmentation_platform/internal/execution/processing/mock_feature_list_query_processor.h"
#include "components/segmentation_platform/internal/metadata/metadata_writer.h"
#include "components/segmentation_platform/internal/scheduler/execution_service.h"
#include "components/segmentation_platform/internal/signals/signal_handler.h"
#include "components/segmentation_platform/public/local_state_helper.h"
#include "components/segmentation_platform/public/model_provider.h"
#include "components/segmentation_platform/public/segmentation_platform_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace segmentation_platform {
namespace {

RunOnceCallback;
_;
ByMove;
Return;

const SegmentId kTestSegment =;
const SegmentId kTestSegment2 =;

constexpr float kTestScore =;
constexpr float kDatabaseScore =;
constexpr float kTestRank =;
constexpr int kDatabaseRank =;

class TestModelProvider : public DefaultModelProvider {};

class MockModelManager : public ModelManager {};

}  // namespace

class SegmentResultProviderTest : public testing::Test {};

TEST_F(SegmentResultProviderTest, GetServerModelSegmentNotAvailable) {}

TEST_F(SegmentResultProviderTest, GetServerModelSignalNotCollected) {}

TEST_F(SegmentResultProviderTest, GetServerModelExecutionFailedNotIgnoringDb) {}

TEST_F(SegmentResultProviderTest, GetServerModelExecutionFailedIgnoringDb) {}

TEST_F(SegmentResultProviderTest, GetScoreFromDatabaseForServerModel) {}

TEST_F(SegmentResultProviderTest,
       GetScoreFromServerModelExecutionNotIgnoringDb) {}

TEST_F(SegmentResultProviderTest, GetScoreFromServerModelExecutionIgnoringDb) {}

TEST_F(SegmentResultProviderTest, GetDefaultModelSignalsNotCollected) {}

TEST_F(SegmentResultProviderTest, GetDefaultModelFailedExecution) {}

TEST_F(SegmentResultProviderTest, GetScoreFromDatabaseForDefaultModel) {}

TEST_F(SegmentResultProviderTest, GetScoreFromDefaultModelExecution) {}

TEST_F(SegmentResultProviderTest, GetScoreFromDefaultModelExecutionIgnoringDb) {}

TEST_F(SegmentResultProviderTest, MultipleRequests) {}

}  // namespace segmentation_platform