#include "components/assist_ranker/base_predictor.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/metrics/field_trial_params.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "components/assist_ranker/fake_ranker_model_loader.h"
#include "components/assist_ranker/predictor_config.h"
#include "components/assist_ranker/proto/ranker_example.pb.h"
#include "components/assist_ranker/ranker_model.h"
#include "components/ukm/test_ukm_recorder.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace assist_ranker {
FakeRankerModelLoader;
namespace {
const char kTestModelName[] = …;
const char kTestLoggingName[] = …;
const char kTestUmaPrefixName[] = …;
const char kTestUrlParamName[] = …;
const char kTestDefaultModelUrl[] = …;
const char kTestNavigationUrl[] = …;
const base::flat_set<std::string> kFeatureAllowlist;
BASE_FEATURE(…);
const base::FeatureParam<std::string> kTestRankerUrl{ … };
const PredictorConfig kTestPredictorConfig = …;
class FakePredictor : public BasePredictor { … };
std::unique_ptr<FakePredictor> FakePredictor::Create(
PredictorConfig predictor_config) { … }
}
class BasePredictorTest : public ::testing::Test { … };
void BasePredictorTest::SetUp() { … }
ukm::SourceId BasePredictorTest::GetSourceId() { … }
TEST_F(BasePredictorTest, BaseTest) { … }
TEST_F(BasePredictorTest, QueryDisabled) { … }
TEST_F(BasePredictorTest, GetPredictThresholdReplacement) { … }
}