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

Unified Diff: content/browser/media/audio_stream_monitor_unittest.cc

Issue 896673003: Propagate audible state from player to the containing tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments by Daniel and Min Created 5 years, 10 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/media/audio_stream_monitor_unittest.cc
diff --git a/content/browser/media/audio_stream_monitor_unittest.cc b/content/browser/media/audio_stream_monitor_unittest.cc
index 0d206216db7c6efd763c96f0adc77fad049b1dad..63727e852e3a2f4602037569289b05e2e9476e7c 100644
--- a/content/browser/media/audio_stream_monitor_unittest.cc
+++ b/content/browser/media/audio_stream_monitor_unittest.cc
@@ -52,7 +52,15 @@ class AudioStreamMonitorTest : public RenderViewHostTestHarness {
WebContentsImpl* web_contents = reinterpret_cast<WebContentsImpl*>(
RenderViewHostTestHarness::web_contents());
web_contents->SetDelegate(&mock_web_contents_delegate_);
- monitor_ = web_contents->audio_stream_monitor();
+
+ web_contents->SetAudioStateProviderForTesting(
Tima Vaisburd 2015/03/02 18:37:30 Is it better to keep this test on Android (and add
+ new AudioStreamMonitor(web_contents));
+
+ monitor_ = static_cast<AudioStreamMonitor*>(
+ web_contents->audio_state_provider());
+
+ ASSERT_TRUE(monitor_);
+
const_cast<base::TickClock*&>(monitor_->clock_) = &clock_;
}

Powered by Google App Engine
This is Rietveld 408576698