chromium/components/metrics/content/subprocess_metrics_provider_unittest.cc

// Copyright 2016 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/content/subprocess_metrics_provider.h"

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

#include "base/metrics/histogram.h"
#include "base/metrics/histogram_flattener.h"
#include "base/metrics/histogram_snapshot_manager.h"
#include "base/metrics/persistent_histogram_allocator.h"
#include "base/metrics/persistent_memory_allocator.h"
#include "base/metrics/sparse_histogram.h"
#include "base/metrics/statistics_recorder.h"
#include "base/test/bind.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

IsEmpty;
UnorderedElementsAre;

namespace metrics {
namespace {

const uint32_t TEST_MEMORY_SIZE =;  // 64 KiB

struct HistogramData {};

class HistogramFlattenerDeltaRecorder : public base::HistogramFlattener {};

// Same as PersistentHistogramAllocator, but will call a callback on being
// destroyed.
class TestPersistentHistogramAllocator
    : public base::PersistentHistogramAllocator {};

}  // namespace

class SubprocessMetricsProviderTest : public testing::Test {};

TEST_F(SubprocessMetricsProviderTest, SnapshotMetrics) {}

TEST_F(SubprocessMetricsProviderTest, SnapshotMetricsAsync) {}

// Verifies that it is fine to deregister an allocator even if background tasks
// that access it are still pending/running.
TEST_F(SubprocessMetricsProviderTest, AllocatorRefCounted) {}

}  // namespace metrics