| Index: media/blink/watch_time_reporter_unittest.cc
|
| diff --git a/media/blink/watch_time_reporter_unittest.cc b/media/blink/watch_time_reporter_unittest.cc
|
| index 6ab2957f726c1ff9960e7912af0817e091cc323a..0fc8ef24452c8e33e338a638568c59e62b2be4c3 100644
|
| --- a/media/blink/watch_time_reporter_unittest.cc
|
| +++ b/media/blink/watch_time_reporter_unittest.cc
|
| @@ -246,9 +246,9 @@ TEST_F(WatchTimeReporterTest, WatchTimeReporter) {
|
| wtr_->OnPlaying();
|
| EXPECT_FALSE(IsMonitoring());
|
|
|
| - Initialize(true, false, true, true, kSizeJustRight);
|
| + Initialize(true, false, true, true, gfx::Size());
|
| wtr_->OnPlaying();
|
| - EXPECT_FALSE(IsMonitoring());
|
| + EXPECT_TRUE(IsMonitoring());
|
|
|
| constexpr gfx::Size kSizeTooSmall = gfx::Size(100, 100);
|
| Initialize(true, true, true, true, kSizeTooSmall);
|
| @@ -266,6 +266,18 @@ TEST_F(WatchTimeReporterTest, WatchTimeReporter) {
|
| Initialize(true, true, true, false, kSizeJustRight);
|
| wtr_->OnPlaying();
|
| EXPECT_TRUE(IsMonitoring());
|
| +
|
| + Initialize(true, false, true, true, gfx::Size());
|
| + wtr_->OnPlaying();
|
| + EXPECT_TRUE(IsMonitoring());
|
| +
|
| + Initialize(true, false, false, false, gfx::Size());
|
| + wtr_->OnPlaying();
|
| + EXPECT_TRUE(IsMonitoring());
|
| +
|
| + Initialize(true, false, true, false, gfx::Size());
|
| + wtr_->OnPlaying();
|
| + EXPECT_TRUE(IsMonitoring());
|
| }
|
|
|
| // Tests that basic reporting for the all category works.
|
| @@ -290,6 +302,7 @@ TEST_F(WatchTimeReporterTest, WatchTimeReporterBasic) {
|
| EXPECT_WATCH_TIME(MediaLog::kWatchTimeAudioVideoMse, kWatchTimeLate);
|
| CycleReportingTimer();
|
| }
|
| +
|
| // Tests that starting from a non-zero base works.
|
| TEST_F(WatchTimeReporterTest, WatchTimeReporterNonZeroStart) {
|
| constexpr base::TimeDelta kWatchTime1 = base::TimeDelta::FromSeconds(5);
|
|
|