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

Unified Diff: content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl_unittest.cc

Issue 2812883003: Browser test dry runs with mojo audio streams.
Patch Set: Rebase Created 3 years, 7 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/renderer_host/media/renderer_audio_output_stream_factory_context_impl_unittest.cc
diff --git a/content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl_unittest.cc b/content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl_unittest.cc
index 9d291bf31ea0b2020c2a34fd48e4ae4f685b4dbc..0dd2036cf472cfcbf775f80b6cfe0351737acbe4 100644
--- a/content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl_unittest.cc
+++ b/content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl_unittest.cc
@@ -308,15 +308,17 @@ class RendererAudioOutputStreamFactoryIntegrationTest : public Test {
media_stream_manager_ =
base::MakeUnique<MediaStreamManager>(audio_system_.get());
}
+
~RendererAudioOutputStreamFactoryIntegrationTest() override {
audio_manager_->Shutdown();
}
- void CreateAndBindFactory(AudioOutputStreamFactoryRequest request) {
+ UniqueAudioOutputStreamFactoryPtr CreateAndBindFactory(
+ AudioOutputStreamFactoryRequest request) {
factory_context_.reset(new RendererAudioOutputStreamFactoryContextImpl(
kRenderProcessId, audio_system_.get(), audio_manager_.get(),
media_stream_manager_.get(), kSalt));
- factory_context_->CreateFactory(kRenderFrameId, std::move(request));
+ return factory_context_->CreateFactory(kRenderFrameId, std::move(request));
}
std::unique_ptr<MediaStreamManager> media_stream_manager_;
@@ -342,11 +344,7 @@ TEST_F(RendererAudioOutputStreamFactoryIntegrationTest, StreamIntegrationTest) {
.WillOnce(Return(stream));
AudioOutputStreamFactoryPtr factory_ptr;
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- base::BindOnce(&RendererAudioOutputStreamFactoryIntegrationTest::
- CreateAndBindFactory,
- base::Unretained(this), mojo::MakeRequest(&factory_ptr)));
+ auto factory_handle = CreateAndBindFactory(mojo::MakeRequest(&factory_ptr));
AudioOutputStreamProviderPtr provider_ptr;
base::RunLoop loop;

Powered by Google App Engine
This is Rietveld 408576698