chromium/chrome/browser/extensions/api/metrics_private/metrics_apitest.cc

// Copyright 2012 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 <stddef.h>

#include <map>

#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/statistics_recorder.h"
#include "base/test/metrics/user_action_tester.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "content/public/test/browser_test.h"

namespace extensions {

namespace {

// The tests that are run by this extension are expected to record the following
// user actions, with the specified counts.  If the tests in test.js are
// modified, this array may need to be updated.
struct RecordedUserAction {} g_user_actions[] =;

// The tests that are run by this extension are expected to record the following
// histograms.  If the tests in test.js are modified, this array may need to be
// updated.
struct RecordedHistogram {} g_histograms[] =;

// Represents a bucket in a sparse histogram.
struct Bucket {};

// We expect the following sparse histograms.
struct SparseHistogram {} g_sparse_histograms[] =;

void ValidateUserActions(const base::UserActionTester& user_action_tester,
                         const RecordedUserAction* recorded,
                         int count) {}

void ValidateSparseHistogramSamples(
    const std::string& name,
    const base::HistogramSamples& samples) {}

void ValidateHistograms(const RecordedHistogram* recorded,
                        int count) {}

}  // namespace

ContextType;

class ExtensionMetricsApiTest
    : public ExtensionApiTest,
      public testing::WithParamInterface<ContextType> {};

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

IN_PROC_BROWSER_TEST_P(ExtensionMetricsApiTest, Metrics) {}

}  // namespace extensions