chromium/components/reporting/metrics/periodic_collector_unittest.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/reporting/metrics/periodic_collector.h"

#include <memory>
#include <optional>
#include <string>
#include <vector>

#include "base/run_loop.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "components/reporting/metrics/fakes/fake_metric_report_queue.h"
#include "components/reporting/metrics/fakes/fake_reporting_settings.h"
#include "components/reporting/metrics/fakes/fake_sampler.h"
#include "components/reporting/metrics/metric_report_queue.h"
#include "components/reporting/proto/synced/metric_data.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

Eq;

namespace reporting {
namespace {

constexpr char kEnableSettingPath[] =;
constexpr char kRateSettingPath[] =;

constexpr base::TimeDelta interval =;

class PeriodicCollectorTest : public ::testing::Test {};

TEST_F(PeriodicCollectorTest, InitiallyEnabled) {}

TEST_F(PeriodicCollectorTest, InitiallyEnabled_Delayed) {}

TEST_F(PeriodicCollectorTest, NoMetricData) {}

TEST_F(PeriodicCollectorTest, InitiallyDisabled) {}

TEST_F(PeriodicCollectorTest, DefaultEnabled) {}

TEST_F(PeriodicCollectorTest, DefaultDisabled) {}
}  // namespace
}  // namespace reporting