chromium/components/metrics/structured/structured_metrics_service_unittest.cc

// Copyright 2023 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/metrics/structured/structured_metrics_service.h"

#include <memory>
#include <utility>

#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_refptr.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/test/test_simple_task_runner.h"
#include "components/metrics/log_decoder.h"
#include "components/metrics/metrics_provider.h"
#include "components/metrics/structured/recorder.h"
#include "components/metrics/structured/reporting/structured_metrics_reporting_service.h"
#include "components/metrics/structured/structured_events.h"
#include "components/metrics/structured/structured_metrics_client.h"
#include "components/metrics/structured/structured_metrics_features.h"
#include "components/metrics/structured/structured_metrics_prefs.h"
#include "components/metrics/structured/structured_metrics_recorder.h"
#include "components/metrics/structured/test/test_event_storage.h"
#include "components/metrics/structured/test/test_key_data_provider.h"
#include "components/metrics/test/test_metrics_service_client.h"
#include "components/metrics/unsent_log_store.h"
#include "components/metrics/unsent_log_store_metrics_impl.h"
#include "components/prefs/testing_pref_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace metrics::structured {
namespace {

TestEventOne;
TestEventSeven;

// The name hash of "TestProjectOne".
constexpr uint64_t kProjectOneHash =16881314472396226433);
// The name hash of "TestProjectThree".
constexpr uint64_t kProjectThreeHash =10860358748803291132);

class TestRecorder : public StructuredMetricsClient::RecordingDelegate {};

}  // namespace

class StructuredMetricsServiceTest : public testing::Test {};

TEST_F(StructuredMetricsServiceTest, PurgeInMemory) {}

TEST_F(StructuredMetricsServiceTest, PurgePersisted) {}

TEST_F(StructuredMetricsServiceTest, RotateLogs) {}

TEST_F(StructuredMetricsServiceTest, SystemProfileFilled) {}

TEST_F(StructuredMetricsServiceTest, DoesNotRecordWhenRecordingDisabled) {}

TEST_F(StructuredMetricsServiceTest, FlushOnShutdown) {}

}  // namespace metrics::structured