chromium/chrome/browser/ui/tabs/tab_ukm_test_helper.h

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

#ifndef CHROME_BROWSER_UI_TABS_TAB_UKM_TEST_HELPER_H_
#define CHROME_BROWSER_UI_TABS_TAB_UKM_TEST_HELPER_H_

#include <map>
#include <optional>

#include "components/ukm/test_ukm_recorder.h"

// A UKM entry consists of named metrics with int64_t values. Use a map to
// specify expected metrics to test against an actual entry for tests.
// A value of |nullopt| implies a value shouldn't exist for the given metric
// name.
UkmMetricMap;
SourceUkmMetricMap;

// Helper class to check entries have been logged as expected into UKM.
// Tests use this by validating new entries after they are logged. The helper
// skips already-validated entries when checking new entries, and expects new
// entries to be validated in the order they were logged. This ensures
// unexpected entries are not logged in between expected entries.
class UkmEntryChecker {};

#endif  // CHROME_BROWSER_UI_TABS_TAB_UKM_TEST_HELPER_H_