chromium/components/history_embeddings/ml_embedder_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/history_embeddings/ml_embedder.h"

#include <memory>

#include "base/path_service.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "components/history_embeddings/passage_embeddings_service_controller.h"
#include "components/history_embeddings/vector_database.h"
#include "components/optimization_guide/core/test_model_info_builder.h"
#include "components/optimization_guide/core/test_optimization_guide_model_provider.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "services/passage_embeddings/public/mojom/passage_embeddings.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace history_embeddings {

namespace {

constexpr int64_t kEmbeddingsModelVersion =;
constexpr uint32_t kEmbeddingsModelInputWindowSize =;
constexpr size_t kEmbeddingsModelOutputSize =;

// Returns a model info builder preloaded with valid model info.
optimization_guide::TestModelInfoBuilder GetBuilderWithValidModelInfo() {}

class FakePassageEmbedder : public passage_embeddings::mojom::PassageEmbedder {};

class FakePassageEmbeddingsService
    : public passage_embeddings::mojom::PassageEmbeddingsService {};

class FakePassageEmbeddingsServiceController
    : public PassageEmbeddingsServiceController {};

class TestOptimizationGuideModelProvider
    : public optimization_guide::TestOptimizationGuideModelProvider {};

}  // namespace

class MlEmbedderTest : public testing::Test {};

TEST_F(MlEmbedderTest, RegistersForTarget) {}

TEST_F(MlEmbedderTest, ReceivesValidModelInfo) {}

TEST_F(MlEmbedderTest, ReceivesEmptyModelInfo) {}

TEST_F(MlEmbedderTest, ReceivesModelInfoWithInvalidModelMetadata) {}

TEST_F(MlEmbedderTest, ReceivesModelInfoWithoutModelMetadata) {}

TEST_F(MlEmbedderTest, ReceivesModelInfoWithoutAdditionalFiles) {}

TEST_F(MlEmbedderTest, GeneratesEmbeddings) {}

TEST_F(MlEmbedderTest, ReturnsModelUnavailableErrorIfModelInfoNotValid) {}

TEST_F(MlEmbedderTest, ReturnsExecutionFailure) {}

}  // namespace history_embeddings