chromium/components/media_router/browser/media_router_metrics_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/media_router/browser/media_router_metrics.h"

#include <string>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/strcat.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/simple_test_clock.h"
#include "base/time/time.h"
#include "components/media_router/common/media_sink.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

Bucket;
ElementsAre;

namespace media_router {

namespace {

// Tests that calling |recording_cb| with a TimeDelta records it in
// |histogram_name|.
void TestRecordTimeDeltaMetric(
    base::RepeatingCallback<void(const base::TimeDelta&)> recording_cb,
    const std::string& histogram_name) {}

// Tests that calling |recording_cb| with boolean values records them in
// |histogram_name|.
void TestRecordBooleanMetric(base::RepeatingCallback<void(bool)> recording_cb,
                             const std::string& histogram_name) {}

// Tests that |record_cb| records metrics for each MediaRouteProvider in a
// histogram specific to the provider.
void TestRouteResultCodeHistogramsWithProviders(
    base::RepeatingCallback<void(mojom::RouteRequestResultCode,
                                 std::optional<mojom::MediaRouteProviderId>)>
        record_cb,
    mojom::MediaRouteProviderId provider1,
    const std::string& histogram_provider1,
    mojom::MediaRouteProviderId provider2,
    const std::string& histogram_provider2) {}

void TestRouteResultCodeHistograms(
    base::RepeatingCallback<void(mojom::RouteRequestResultCode,
                                 std::optional<mojom::MediaRouteProviderId>)>
        record_cb,
    const std::string& base_histogram_name) {}

}  // namespace

TEST(MediaRouterMetricsTest, RecordMediaRouterDialogActivationLocation) {}

TEST(MediaRouterMetricsTest, RecordMediaRouterDialogLoaded) {}

TEST(MediaRouterMetricsTest, RecordPresentationUrlType) {}

TEST(MediaRouterMetricsTest, RecordMediaSinkType) {}

TEST(MediaRouterMetricsTest, RecordDeviceCount) {}

TEST(MediaRouterMetricsTest, RecordIconStateAtDialogOpen) {}

TEST(MediaRouterMetricsTest, RecordCreateRouteResultCode) {}

TEST(MediaRouterMetricsTest, RecordJoinRouteResultCode) {}

TEST(MediaRouterMetricsTest, RecordTerminateRouteResultCode) {}

}  // namespace media_router