chromium/components/segmentation_platform/internal/selection/segment_selector_unittest.cc

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

#include <string_view>

#include "base/run_loop.h"
#include "base/test/simple_test_clock.h"
#include "base/test/task_environment.h"
#include "components/segmentation_platform/internal/database/mock_signal_storage_config.h"
#include "components/segmentation_platform/internal/database/segment_info_database.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_execution_status.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_utils.h"
#include "components/segmentation_platform/internal/selection/segment_selector_impl.h"
#include "components/segmentation_platform/internal/selection/segmentation_result_prefs.h"
#include "components/segmentation_platform/public/config.h"
#include "components/segmentation_platform/public/field_trial_register.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
Invoke;
Return;
SaveArg;

namespace segmentation_platform {
namespace proto {
class SegmentInfo;
}  // namespace proto

namespace {

NiceMock;

class MockFieldTrialRegister : public FieldTrialRegister {};

class MockModelManager : public ModelManager {};

std::unique_ptr<Config> CreateTestConfig() {}

class MockResultProvider : public SegmentResultProvider {};

class MockTrainingDataCollector : public TrainingDataCollector {};

}  // namespace

class TestSegmentationResultPrefs : public SegmentationResultPrefs {};

class SegmentSelectorTest : public testing::Test {};

TEST_F(SegmentSelectorTest, FindBestSegmentFlowWithTwoSegments) {}

TEST_F(SegmentSelectorTest, NewSegmentResultOverridesThePreviousBest) {}

TEST_F(SegmentSelectorTest, UnknownSegmentTtlExpiryForBooleanModel) {}

TEST_F(SegmentSelectorTest, DoesNotMeetSignalCollectionRequirement) {}

TEST_F(SegmentSelectorTest,
       GetSelectedSegmentReturnsResultFromPreviousSession) {}

TEST_F(SegmentSelectorTest, GetSelectedSegmentUpdatedWhenUnused) {}

// Tests that prefs are properly updated after calling UpdateSelectedSegment().
TEST_F(SegmentSelectorTest, UpdateSelectedSegment) {}

TEST_F(SegmentSelectorTest, UpdateSelectedSegmentWithoutMapping) {}

TEST_F(SegmentSelectorTest, SubsegmentRecording) {}

}  // namespace segmentation_platform