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

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

Issue 2496173003: Communicate audio state to renderer process on Android. (Closed)
Patch Set: Second iteration Created 4 years, 1 month 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 cebebc960fe8a6d475a056ffc74823f14adf60f8..b6d9e70dc0c0924b3cd7aa633fb030cb1f694609 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -3201,7 +3201,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
// The audio power save blocker should not be based on having a media player
// when audio stream monitoring is available.
- if (AudioStreamMonitor::monitoring_available()) {
+ if (AudioStreamMonitor::power_level_monitoring_available()) {
// Send a fake audio stream monitor notification. The audio power save
// blocker should be created.
monitor->set_was_recently_audible_for_testing(true);
@@ -3223,7 +3223,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
media::MediaContentType::Persistent));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
- !AudioStreamMonitor::monitoring_available());
+ !AudioStreamMonitor::power_level_monitoring_available());
// Upon hiding the video power save blocker should be released.
contents()->WasHidden();
@@ -3237,7 +3237,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
media::MediaContentType::Persistent));
EXPECT_FALSE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
- !AudioStreamMonitor::monitoring_available());
+ !AudioStreamMonitor::power_level_monitoring_available());
// Showing the WebContents should result in the creation of the blocker.
contents()->WasShown();
@@ -3250,7 +3250,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
media::MediaContentType::Persistent));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
- !AudioStreamMonitor::monitoring_available());
+ !AudioStreamMonitor::power_level_monitoring_available());
// Start a remote player. There should be no change in the power save
// blockers.
@@ -3259,7 +3259,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
media::MediaContentType::Persistent));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
- !AudioStreamMonitor::monitoring_available());
+ !AudioStreamMonitor::power_level_monitoring_available());
// Destroy the original audio video player. Both power save blockers should
// remain.
@@ -3267,7 +3267,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
MediaPlayerDelegateHostMsg_OnMediaPaused(0, kPlayerAudioVideoId, false));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
- !AudioStreamMonitor::monitoring_available());
+ !AudioStreamMonitor::power_level_monitoring_available());
// Destroy the audio only player. The video power save blocker should remain.
rfh->OnMessageReceived(
@@ -3295,7 +3295,7 @@ TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
media::MediaContentType::Persistent));
EXPECT_TRUE(has_video_power_save_blocker());
EXPECT_EQ(has_audio_power_save_blocker(),
- !AudioStreamMonitor::monitoring_available());
+ !AudioStreamMonitor::power_level_monitoring_available());
// Crash the renderer.
main_test_rfh()->GetProcess()->SimulateCrash();

Powered by Google App Engine
This is Rietveld 408576698