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

Unified Diff: content/browser/web_contents/web_contents_impl_unittest.cc

Issue 1996043002: Split MediaContentType and AudioFocusType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed nits Created 4 years, 4 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
Index: content/browser/web_contents/web_contents_impl_unittest.cc
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
index af25105eaf349a44f5955e59c51cb42aff80c6bb..447c1c04b49f0ef25039b239ef229edc3ae51653 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -3254,7 +3254,8 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// should be created. If audio stream monitoring is available, an audio power
// save blocker should be created too.
rfh->OnMessageReceived(MediaPlayerDelegateHostMsg_OnMediaPlaying(
- 0, kPlayerAudioVideoId, true, true, false, base::TimeDelta()));
+ 0, kPlayerAudioVideoId, true, true, false,
+ media::MediaContentType::Persistent));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
!AudioStreamMonitor::monitoring_available());
@@ -3267,7 +3268,8 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// the power save blockers. The notification should take into account the
// visibility state of the WebContents.
rfh->OnMessageReceived(MediaPlayerDelegateHostMsg_OnMediaPlaying(
- 0, kPlayerVideoOnlyId, true, false, false, base::TimeDelta()));
+ 0, kPlayerVideoOnlyId, true, false, false,
+ media::MediaContentType::Persistent));
EXPECT_FALSE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
!AudioStreamMonitor::monitoring_available());
@@ -3279,7 +3281,8 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// Start another player that only has audio. There should be no change in
// the power save blockers.
rfh->OnMessageReceived(MediaPlayerDelegateHostMsg_OnMediaPlaying(
- 0, kPlayerAudioOnlyId, false, true, false, base::TimeDelta()));
+ 0, kPlayerAudioOnlyId, false, true, false,
+ media::MediaContentType::Persistent));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
!AudioStreamMonitor::monitoring_available());
@@ -3287,7 +3290,8 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// Start a remote player. There should be no change in the power save
// blockers.
rfh->OnMessageReceived(MediaPlayerDelegateHostMsg_OnMediaPlaying(
- 0, kPlayerRemoteId, true, true, true, base::TimeDelta()));
+ 0, kPlayerRemoteId, true, true, true,
+ media::MediaContentType::Persistent));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
!AudioStreamMonitor::monitoring_available());
@@ -3322,7 +3326,8 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// should be created. If audio stream monitoring is available, an audio power
// save blocker should be created too.
rfh->OnMessageReceived(MediaPlayerDelegateHostMsg_OnMediaPlaying(
- 0, kPlayerAudioVideoId, true, true, false, base::TimeDelta()));
+ 0, kPlayerAudioVideoId, true, true, false,
+ media::MediaContentType::Persistent));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
!AudioStreamMonitor::monitoring_available());
« no previous file with comments | « content/browser/media/session/pepper_playback_observer.cc ('k') | content/common/media/media_player_delegate_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698