#include "components/segmentation_platform/internal/execution/processing/feature_list_query_processor.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/metrics/metrics_hashes.h"
#include "base/run_loop.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/simple_test_clock.h"
#include "base/test/task_environment.h"
#include "components/segmentation_platform/internal/database/mock_signal_database.h"
#include "components/segmentation_platform/internal/database/segment_info_database.h"
#include "components/segmentation_platform/internal/database/signal_database.h"
#include "components/segmentation_platform/internal/database/signal_storage_config.h"
#include "components/segmentation_platform/internal/database/storage_service.h"
#include "components/segmentation_platform/internal/database/ukm_database_backend.h"
#include "components/segmentation_platform/internal/database/ukm_types.h"
#include "components/segmentation_platform/internal/execution/processing/mock_feature_aggregator.h"
#include "components/segmentation_platform/internal/mock_ukm_data_manager.h"
#include "components/segmentation_platform/public/features.h"
#include "components/segmentation_platform/public/input_delegate.h"
#include "components/segmentation_platform/public/proto/types.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
RunOnceCallbackRepeatedly;
_;
IsEmpty;
Return;
SetArgReferee;
namespace segmentation_platform::processing {
namespace {
constexpr base::TimeDelta kOneSecond = …;
constexpr base::TimeDelta kTwoSeconds = …;
constexpr char kProfileId[] = …;
}
class FeatureListQueryProcessorTest : public testing::TestWithParam<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(FeatureListQueryProcessorTest, InvalidMetadata) { … }
TEST_P(FeatureListQueryProcessorTest, PredictionTimeCustomInput) { … }
TEST_P(FeatureListQueryProcessorTest, DefaultValueCustomInput) { … }
TEST_P(FeatureListQueryProcessorTest, SingleUserAction) { … }
TEST_P(FeatureListQueryProcessorTest, LatestOrDefaultUmaFeature) { … }
TEST_P(FeatureListQueryProcessorTest, UmaFeaturesAndCustomInputs) { … }
TEST_P(FeatureListQueryProcessorTest, UmaFeaturesAndCustomInputsInvalid) { … }
TEST_P(FeatureListQueryProcessorTest, MultipleUmaFeaturesWithOutputs) { … }
TEST_P(FeatureListQueryProcessorTest, SkipCollectionOnlyUmaFeatures) { … }
TEST_P(FeatureListQueryProcessorTest, SkipNoColumnWeightCustomInput) { … }
TEST_P(FeatureListQueryProcessorTest, FilteredEnumSamples) { … }
TEST_P(FeatureListQueryProcessorTest, MultipleUmaFeaturesWithMultipleBuckets) { … }
TEST_P(FeatureListQueryProcessorTest, SingleUmaOutputWithObservationTime) { … }
class FeatureListQueryProcessorNoDbCacheTest
: public FeatureListQueryProcessorTest { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(FeatureListQueryProcessorNoDbCacheTest, MultipleUmaFeaturesWithOutputs) { … }
}