#include "components/ukm/ukm_recorder_impl.h"
#include <string_view>
#include "base/functional/bind.h"
#include "base/metrics/metrics_hashes.h"
#include "base/test/task_environment.h"
#include "components/ukm/scheme_constants.h"
#include "components/ukm/test_ukm_recorder.h"
#include "components/ukm/ukm_recorder_observer.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_entry_builder.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "services/metrics/public/cpp/ukm_source.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/metrics_proto/ukm/report.pb.h"
#include "url/gurl.h"
namespace ukm {
namespace {
TestEvent1;
const uint64_t kTestEntryHash = …;
const uint64_t kTestMetricsHash = …;
const char kTestEntryName[] = …;
const char kTestMetrics[] = …;
const int32_t kWebDXFeature1 = …;
const int32_t kWebDXFeature2 = …;
const size_t kWebDXFeatureNumberOfFeaturesForTesting = …;
mojom::UkmEntryPtr BlankUkmEntry(SourceId source_id) { … }
std::map<uint64_t, builders::EntryDecoder> CreateTestingDecodeMap() { … }
class TestUkmObserver : public UkmRecorderObserver { … };
}
TEST(UkmRecorderImplTest, IsSampledIn) { … }
TEST(UkmRecorderImplTest, PurgeExtensionRecordings) { … }
TEST(UkmRecorderImplTest, WebApkSourceUrl) { … }
TEST(UkmRecorderImplTest, PaymentAppScopeUrl) { … }
TEST(UkmRecorderImplTest, WebIdentityScopeUrl) { … }
TEST(UkmRecorderImplTest, ObserverNotifiedOnNewEntry) { … }
TEST(UkmRecorderImplTest, ObserverNotifiedOnSourceURLUpdate) { … }
TEST(UkmRecorderImplTest, ObserverNotifiedWhenNotRecording) { … }
TEST(UkmRecorderImplTest, ObserverNotifiedOnPurge) { … }
TEST(UkmRecorderImplTest, ObserverNotifiedOnUkmAllowedStateChanged) { … }
TEST(UkmRecorderImplTest, AddRemoveObserver) { … }
TEST(UkmRecorderImplTest, VerifyShouldDropEntry) { … }
TEST(UkmRecorderImplTest, WebDXFeaturesConsent) { … }
TEST(UkmRecorderImplTest, WebDXFeaturesSampling) { … }
}