#include "components/optimization_guide/core/model_quality/model_quality_log_entry.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "components/optimization_guide/core/feature_registry/feature_registration.h"
#include "components/optimization_guide/core/feature_registry/mqls_feature_registry.h"
#include "components/optimization_guide/core/model_execution/model_execution_prefs.h"
#include "components/optimization_guide/core/model_quality/model_quality_logs_uploader_service.h"
#include "components/optimization_guide/proto/model_quality_service.pb.h"
#include "components/prefs/testing_pref_service.h"
#include "components/variations/scoped_variations_ids_provider.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace optimization_guide {
class MqlsFeatureMetadata;
namespace {
std::unique_ptr<proto::LogAiDataRequest> BuildComposeLogAiDataRequest() { … }
class TestModelQualityLogsUploaderService
: public ModelQualityLogsUploaderService { … };
}
class ModelQualityLogEntryTest : public testing::Test { … };
TEST_F(ModelQualityLogEntryTest, Initialize) { … }
TEST_F(ModelQualityLogEntryTest, ClientId) { … }
TEST_F(ModelQualityLogEntryTest, UploadOnDestruction) { … }
TEST_F(ModelQualityLogEntryTest, Upload_WithNonEmptyLog_SchedulesAnUpload) { … }
TEST_F(ModelQualityLogEntryTest, Upload_WithEmptyLog_DoesNotScheduleAnUpload) { … }
TEST_F(ModelQualityLogEntryTest, Drop_WithNonEmptyLog_DoesNotScheduleAnUpload) { … }
}