Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(974)

Unified Diff: media/blink/webmediaplayer_impl_unittest.cc

Issue 2734963003: Disable pausing background video-only players on desktop. (Closed)
Patch Set: Cleaner change in WMPI Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl_unittest.cc
diff --git a/media/blink/webmediaplayer_impl_unittest.cc b/media/blink/webmediaplayer_impl_unittest.cc
index ee63fedbcd176d194646f790293cfbb44fbebcb7..b8d9b807bebec3e6e29a2d464528711f9a0192e3 100644
--- a/media/blink/webmediaplayer_impl_unittest.cc
+++ b/media/blink/webmediaplayer_impl_unittest.cc
@@ -866,9 +866,15 @@ TEST_P(WebMediaPlayerImplBackgroundBehaviorTest, VideoOnly) {
// Video is always paused when suspension is on and only if matches the
// optimization criteria if the optimization is on.
+#if defined(OS_ANDROID)
bool should_pause = IsMediaSuspendOn() ||
(IsBackgroundOptimizationOn() && matches_requirements);
EXPECT_EQ(should_pause, ShouldPauseVideoWhenHidden());
+#else
+ // TODO(avayvod): Revert after merging into 58 so we keep getting data on the
+ // background video pause behavior on desktop. See https://crbug.com/699106.
+ EXPECT_FALSE(ShouldPauseVideoWhenHidden());
+#endif
}
TEST_P(WebMediaPlayerImplBackgroundBehaviorTest, AudioVideo) {
@@ -883,10 +889,16 @@ TEST_P(WebMediaPlayerImplBackgroundBehaviorTest, AudioVideo) {
EXPECT_EQ(IsBackgroundOptimizationOn() && matches_requirements,
ShouldDisableVideoWhenHidden());
- // Only pause audible videos on Android if both media suspend and resume
- // background videos is on. On Desktop
+// Only pause audible videos if both media suspend and resume
+// background videos is on.
+#if defined(OS_ANDROID)
EXPECT_EQ(IsMediaSuspendOn() && IsResumeBackgroundVideoEnabled(),
ShouldPauseVideoWhenHidden());
+#else
+ // TODO(avayvod): Revert after merging into 58 so we keep getting data on the
+ // background video pause behavior on desktop. See https://crbug.com/699106.
+ EXPECT_FALSE(ShouldPauseVideoWhenHidden());
+#endif
}
INSTANTIATE_TEST_CASE_P(BackgroundBehaviorTestInstances,
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698