#include "components/shared_highlighting/core/common/shared_highlighting_metrics.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "components/ukm/test_ukm_recorder.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace shared_highlighting {
namespace {
const char kSearchEngineUrl[] = …;
const char kSourceUkmMetric[] = …;
const char kSuccessUkmMetric[] = …;
const char kErrorUkmMetric[] = …;
class SharedHighlightingMetricsTest : public testing::Test { … };
TEST_F(SharedHighlightingMetricsTest, LogTextFragmentAmbiguousMatch) { … }
TEST_F(SharedHighlightingMetricsTest, LogTextFragmentLinkOpenSource) { … }
TEST_F(SharedHighlightingMetricsTest, LogTextFragmentMatchRate) { … }
TEST_F(SharedHighlightingMetricsTest, LogTextFragmentSelectorCount) { … }
TEST_F(SharedHighlightingMetricsTest, LogLinkGenerationStatus) { … }
TEST_F(SharedHighlightingMetricsTest, LogLinkGenerationErrorReason) { … }
TEST_F(SharedHighlightingMetricsTest, LinkOpenedUkmSuccessSearchEngine) { … }
TEST_F(SharedHighlightingMetricsTest, LinkOpenedUkmFailSearchEngine) { … }
TEST_F(SharedHighlightingMetricsTest, LinkOpenedUkmSuccessUnknownSource) { … }
TEST_F(SharedHighlightingMetricsTest, LinkOpenedUkmFailUnknownSource) { … }
TEST_F(SharedHighlightingMetricsTest, LinkOpenedUkmInvalidSourceId) { … }
TEST_F(SharedHighlightingMetricsTest, LinkOpenedUkmCustomRecorder) { … }
TEST_F(SharedHighlightingMetricsTest, LinkGeneratedUkmSuccess) { … }
TEST_F(SharedHighlightingMetricsTest, LinkGeneratedUkmError) { … }
TEST_F(SharedHighlightingMetricsTest, LinkGeneratedUkmSuccessInvalidSourceId) { … }
TEST_F(SharedHighlightingMetricsTest, LinkGeneratedUkmCustomRecorder) { … }
TEST_F(SharedHighlightingMetricsTest, LinkGeneratedSuccessLatency) { … }
TEST_F(SharedHighlightingMetricsTest, LinkGeneratedErrorLatency) { … }
TEST_F(SharedHighlightingMetricsTest, LogRequestedFailureMetrics) { … }
TEST_F(SharedHighlightingMetricsTest, LogRequestedSuccessMetrics) { … }
TEST_F(SharedHighlightingMetricsTest, LogLinkRequestedBeforeStatus) { … }
TEST_F(SharedHighlightingMetricsTest, LogLinkToTextReshareStatus) { … }
}
}