#include "chrome/browser/media/media_engagement_session.h"
#include "base/memory/ptr_util.h"
#include "base/memory/scoped_refptr.h"
#include "base/test/simple_test_clock.h"
#include "chrome/browser/media/media_engagement_service.h"
#include "chrome/test/base/testing_profile.h"
#include "components/ukm/test_ukm_recorder.h"
#include "content/public/test/browser_task_environment.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "testing/gtest/include/gtest/gtest.h"
class MediaEngagementSessionTest : public testing::Test { … };
TEST_F(MediaEngagementSessionTest, IsSameOrigin) { … }
TEST_F(MediaEngagementSessionTest, RecordShortPlaybackIgnored) { … }
TEST_F(MediaEngagementSessionTest, RegisterAudiblePlayers) { … }
TEST_F(MediaEngagementSessionTest, TotalPlayers) { … }
TEST_F(MediaEngagementSessionTest, Constructor_SetsUkmSourceId) { … }
TEST_F(MediaEngagementSessionTest,
RecordSignificantAudioContextPlayback_SetsBoolean) { … }
TEST_F(MediaEngagementSessionTest,
RecordSignificantMediaElementPlayback_SetsBoolean) { … }
TEST_F(MediaEngagementSessionTest,
RecordSignificantAudioContextPlayback_SetsPendingPlayback) { … }
TEST_F(MediaEngagementSessionTest,
RecordSignificantMediaElementPlayback_SetsPendingPlayback) { … }
TEST_F(MediaEngagementSessionTest,
RecordSignificantPlayback_SetsPendingPlayback) { … }
TEST_F(MediaEngagementSessionTest, CommitPendingData_Reset) { … }
TEST_F(MediaEngagementSessionTest, CommitPendingData_UpdateVisitsAsNeeded) { … }
TEST_F(MediaEngagementSessionTest, CommitPendingData_UpdatePlaybackWhenNeeded) { … }
TEST_F(MediaEngagementSessionTest, CommitPendingData_UpdatePlayersWhenNeeded) { … }
TEST_F(MediaEngagementSessionTest, RecordUkmMetrics) { … }
TEST_F(MediaEngagementSessionTest, DestructorRecordMetrics) { … }
TEST_F(MediaEngagementSessionTest, DestructorCommitDataIfNeeded) { … }
TEST_F(MediaEngagementSessionTest, RestoredSession_SimpleVisitNotRecorded) { … }
TEST_F(MediaEngagementSessionTest, RestoredSession_PlaybackRecordsVisits) { … }