chromium/chrome/browser/ui/webui/metrics_reporter/metrics_reporter_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.

#include "chrome/browser/ui/webui/metrics_reporter/metrics_reporter.h"

#include <optional>

#include "base/gtest_prod_util.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "testing/gmock/include/gmock/gmock.h"

_;
Return;

class MockPageMetrics : public metrics_reporter::mojom::PageMetrics {};

class TestMetricsReporter : public MetricsReporter {};
class WebUIMetricsReporterTest : public BrowserWithTestWindowTest {};

// Should be able to reply OnGetMarks().
TEST_F(WebUIMetricsReporterTest, OnGetMark) {}

// New marks should overrides old marks of same name.
TEST_F(WebUIMetricsReporterTest, OverridesMarks) {}

// HasMark() should check both local and remote marks.
TEST_F(WebUIMetricsReporterTest, HasMark) {}

// HasLocalMark() should check only local marks.
TEST_F(WebUIMetricsReporterTest, HasLocalMark) {}

// ClearMark() should clear both local and remote marks.
TEST_F(WebUIMetricsReporterTest, ClearMark) {}

// Calling both Mark() and Measure() locally should not involve IPC.
TEST_F(WebUIMetricsReporterTest, MarkAndMeasureLocally) {}

// Measure() should accept an optional end mark.
TEST_F(WebUIMetricsReporterTest, MeasureWithEndMark) {}

// Measure() should be able to retrieve marks from remote.
TEST_F(WebUIMetricsReporterTest, MeasureRetrieveRemote) {}