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

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

Issue 1570043002: Implement MediaSession on top of the WebMediaPlayerDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_session
Patch Set: Rebase yet again. Created 4 years, 11 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 fef8e5bbc09cd04591c9fa5618ae454015474e38..3bf45c0c31e5abcf874970183ac3e9210c9f5516 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -3236,7 +3236,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// should be created. If audio stream monitoring is available, an audio power
// save blocker should be created too.
rfh->OnMessageReceived(FrameHostMsg_MediaPlayingNotification(
- 0, kPlayerAudioVideoId, true, true, false));
+ 0, kPlayerAudioVideoId, true, true, false, base::TimeDelta()));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
!AudioStreamMonitor::monitoring_available());
@@ -3249,7 +3249,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// the power save blockers. The notification should take into account the
// visibility state of the WebContents.
rfh->OnMessageReceived(FrameHostMsg_MediaPlayingNotification(
- 0, kPlayerVideoOnlyId, true, false, false));
+ 0, kPlayerVideoOnlyId, true, false, false, base::TimeDelta()));
EXPECT_FALSE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
!AudioStreamMonitor::monitoring_available());
@@ -3261,7 +3261,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// Start another player that only has audio. There should be no change in
// the power save blockers.
rfh->OnMessageReceived(FrameHostMsg_MediaPlayingNotification(
- 0, kPlayerAudioOnlyId, false, true, false));
+ 0, kPlayerAudioOnlyId, false, true, false, base::TimeDelta()));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
!AudioStreamMonitor::monitoring_available());
@@ -3269,7 +3269,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// Start a remote player. There should be no change in the power save
// blockers.
rfh->OnMessageReceived(FrameHostMsg_MediaPlayingNotification(
- 0, kPlayerRemoteId, true, true, true));
+ 0, kPlayerRemoteId, true, true, true, base::TimeDelta()));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
!AudioStreamMonitor::monitoring_available());
@@ -3277,26 +3277,26 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// Destroy the original audio video player. Both power save blockers should
// remain.
rfh->OnMessageReceived(
- FrameHostMsg_MediaPausedNotification(0, kPlayerAudioVideoId));
+ FrameHostMsg_MediaPausedNotification(0, kPlayerAudioVideoId, false));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
!AudioStreamMonitor::monitoring_available());
// Destroy the audio only player. The video power save blocker should remain.
rfh->OnMessageReceived(
- FrameHostMsg_MediaPausedNotification(0, kPlayerAudioOnlyId));
+ FrameHostMsg_MediaPausedNotification(0, kPlayerAudioOnlyId, false));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_FALSE(has_audio_power_save_blocker());
// Destroy the video only player. No power save blockers should remain.
rfh->OnMessageReceived(
- FrameHostMsg_MediaPausedNotification(0, kPlayerVideoOnlyId));
+ FrameHostMsg_MediaPausedNotification(0, kPlayerVideoOnlyId, false));
EXPECT_FALSE(has_video_power_save_blocker());
EXPECT_FALSE(has_audio_power_save_blocker());
// Destroy the remote player. No power save blockers should remain.
rfh->OnMessageReceived(
- FrameHostMsg_MediaPausedNotification(0, kPlayerRemoteId));
+ FrameHostMsg_MediaPausedNotification(0, kPlayerRemoteId, false));
EXPECT_FALSE(has_video_power_save_blocker());
EXPECT_FALSE(has_audio_power_save_blocker());
@@ -3304,7 +3304,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// should be created. If audio stream monitoring is available, an audio power
// save blocker should be created too.
rfh->OnMessageReceived(FrameHostMsg_MediaPlayingNotification(
- 0, kPlayerAudioVideoId, true, true, false));
+ 0, kPlayerAudioVideoId, true, true, false, base::TimeDelta()));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
!AudioStreamMonitor::monitoring_available());

Powered by Google App Engine
This is Rietveld 408576698